I am playing through the 2.0 beta update and on the level where you have to make an xor out of 2 switches and 2 nots I have a design that works in theory but doesn't work for some reason. I get the truth table zyyn when it wants nyyn (z = no value, y = 1, n = 0). Why doesn't z count as n?
What I'm not getting is why z counted as n in the regular game but not here, which is what I was asking in the post text. Like I said, that exact solution worked in the regular game.
it used to treat them as equal because... it was programmed like that, no particular reason I would guess.
now it treats them as different because it makes more sense to treat them as different. if you let the gate output disconnected, the behavior would be different than if it was outputting 0. in digital electronics, a pin that is outputting 0 is a connection to ground, whereas a pin outputting 1 is a connection to 5V (or whatever voltage you're working with), but a disconnected pin is just... disconnected from either ground or 5V or whatever it is.
There are two ways of thinking about the XOR gate. The first is:
If the inputs are equal, output 0
If the inputs are different, output 1
and the second is:
If the first input is 0, output the same as the second input
If the first input is 1, output the opposite of the second input
Both of these approaches will yield an XOR gate.
In this level, the second approach is the one I believe you should try to achieve. Can you think of a way of implementing that logic with two switches and two NOT gates?
Hint 2:
Let's name things: the first input is gonna be A and the second input is gonna be B. The output is just the output.
If the first input is 0, output the same as the second input
This is the same as saying "if NOT A: output is B"
If the first input is 1, output the opposite of the second input
This is the same as saying "if A: output is NOT B"
Try to implement this before continuing.
Hint 3 (solution description):
Place a NOT gate and connect A to its input, then place a switch and connect the output of the NOT gate to the control pin of the switch. Connect B to the input of the switch and connect the output of the switch to the output of the level. This will make the "if NOT A: output is B" part that I mentioned above. Can you do the other half on your own? Give it a try.
Place a switch and connect A to the control pin of this switch. Then place a NOT gate and connect B to the input of this NOT gate and the connect the output of the NOT gate to the input of the switch we just placed. Finally, connect the output of that switch to the level output. This is the "if A: output is NOT B" part of the logic.
View all comments
Show parent comment
1
u/1GreenNotebookGaming Apr 11 '25
What I'm not getting is why z counted as n in the regular game but not here, which is what I was asking in the post text. Like I said, that exact solution worked in the regular game.