| A | B | C optional | D optional | Q answer |
|---|
The daily logic gates game!
| A | B | C optional | D optional | Q answer |
|---|
Each day is a new circuit! Fill in the truth table for Q to submit. C and D are optional. Click a cell to cycle: Empty → 0 → 1.
There's a lot of websites that explain it better, so definitely check those out first.
But essentially, everything has two distinct states: True/False, High/Low, 1/0. These inputs then pass through gates that determine an output.
In my opinion, I think the simplest to understand is the NOT gate, denoted by a circle, ○. It has one input and one output. All it does is flip whatever comes in.
So a 1 becomes a 0, and a 0 becomes a 1. The equation would be Q = A where A is the input and Q is the output.
The bar over A just means its notted, or flipped.
Below are all the different types of gates you'll encounter each with two inputs and one output:
AND — Q = AB
Both inputs must be 1 for the output to be 1. 0 x 1 still equals 0. Only 1 x 1 = 1!
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR — Q = A + B
At least one input must be 1 for the output to be 1. 0 + 1 still equals 1!
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NAND — Q = AB
This is just an AND gate followed by a NOT gate, so take the answer for an AND gate and flip it!
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR — Q = A + B
This is just an OR gate followed by a NOT gate, so take the answer for an OR gate and flip it!
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
XOR — Q = A ⊕ B
Exclusive OR. The inputs must be different for the output to be 1.
| A | B | Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR — Q = A ⊕ B
This is just an XOR gate followed by a NOT gate. So the inputs must be the same for the output to be 1.
| A | B | Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |