Logic
What It Does
Logic gates perform a logical operation on their inputs and produce logical outputs. Examples: OR, AND, NOT, NAND, NOR, XOR and XNOR.
OR gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
With diodes
With transistors
AND gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
With diodes
With transistors
With open collector comparators
NOT gates
A | OUTPUT |
---|---|
0 | 1 |
1 | 0 |
With transistors
With diodes and a LED
With leftover parts
NAND gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
With transistors
With one transistor
NOR gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
With transistors
With one transistor
XOR gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
With diodes & transistors
With NAND gates
XNOR gates
A | B | OUTPUT |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
0010 series
A | B | OUTPUT |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 1 |
1 | 1 | 0 |
- Notice that input data at A only goes to the output when B is low.
- Thus a low B "enables" A.
TIP
I really like these circuits because they allow you to enable and disable signals!
0100 series
A | B | OUTPUT |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 0 |
1101 series
A | B | OUTPUT |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
1011 series
A | B | OUTPUT |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 1 |
1 | 1 | 1 |