In this topic we talk about everything related to logic gates, bitwise operators (AND/OR/XOR/NAND/NOR/XNOR/NOT), boolean algebra and digital electronics. You can give riddles, ask for help, give information, share your circuits and more.
Here's a simple puzzle:
(A AND B) XOR (A AND B) = Z
No variables are defined. What is Z? This puzzle is 100% possible.
Do you know all seven bitwise operators? If not, you won't understand anything in this topic.
Each operator performs a different action on one or two bits (BInary digiTs). Each bit can be either 0 or 1.
A AND B returns 1 only if A and B are both 1. In all other cases it returns 0.
A OR B returns 1 if one or both of the inputs are 1.
A XOR B returns 1 if the two inputs are different.
All operators above have "inverse" counterparts. They are basically the complete opposite.
A NAND B returns 0 only if A and B are both 1. In all other cases it returns 1.
A NOR B returns 0 if one or both of the inputs are 1.
A XNOR B returns 1 if the two inputs are equal.
The NOT operator inverts the input. This operator is used as a logic gate for these lamps that only go on during a power failure - if the power is 1, the lamp is 0. If the power is 0 (failure), the lamp is 1.
Here are the full truth tables, in case you didn't understand the explanations above:
For everyone else, don't get scared by this just because it's algebra. This is actually a much more interesting and far easier form of algebra.
Here's an example of a monster getting reduced to nothing: (each step is in a new line)
{(1 NOR 1) OR [0 NAND (NOT 1 OR 1)]} XNOR {(0 AND 1) XOR [1 AND (0 OR 1)]} =
{(1 NOR 1) OR [0 NAND (0 OR 1)]} XNOR {(0 AND 1) XOR [1 AND (0 OR 1)]} =
{(1 NOR 1) OR [0 NAND 1]} XNOR {(0 AND 1) XOR [1 AND (0 OR 1)]} =
{0 OR 1} XNOR {(0 AND 1) XOR [1 AND (0 OR 1)]} =
{0 OR 1} XNOR {(0 AND 1) XOR [1 AND 1]} =
{0 OR 1} XNOR {0 XOR [1 AND 1]} =
{0 OR 1} XNOR {0 XOR 1} =
1 XNOR {0 XOR 1} =
1 XNOR 1 = 1