Do you know?
[SE] Logic gates and K-map - part 1
- Fact 1 of 12๐
AND gate: output 1 only when ALL inputs are 1
Like two switches in series on a scooter: both must be ON to run. Output is 1 only if every input is 1. Recall: When is AND output 1? All inputs 1.
- Fact 2 of 12๐
OR gate: output 1 when ANY input is 1
Like a bus bell pressed from either door: one press is enough. Output is 1 if at least one input is 1. Recall: When is OR output 1? Any input 1.
- Fact 3 of 12๐
NOT gate: flips the input
NOT inverts a single input: 1 becomes 0, and 0 becomes 1. It is the only basic gate with one input. Recall: NOT of 0 is? 1.
- Fact 4 of 12โ
NAND gate: NOT AND, output 0 only when all 1
NAND = NOT AND, so the output is 0 only when all inputs are 1, otherwise 1. Exam word: NAND is the inverse of AND. Recall: NAND output is 0 when? All inputs 1.
- Fact 5 of 12๐
NOR gate: NOT OR, output 1 only when all 0
NOR = NOT OR, so the output is 1 only when all inputs are 0. Exam word: it is the inverse of OR. Recall: NOR output is 1 when? All inputs 0.
- Fact 6 of 12๐งฑ
NAND is a universal gate
NAND alone can build AND, OR and NOT, so any logic circuit can be made from NAND gates. Why it matters: chips can use one gate type. Recall: Which gate is universal? NAND.
- Fact 7 of 12๐ง
NOT made from NAND
Tie both inputs of a NAND gate together and it works as a NOT gate. This is how one gate type replaces several. Recall: NAND with inputs tied is? NOT.
- Fact 8 of 12๐
XOR gate: output 1 when inputs differ
XOR gives 1 only when the two inputs are different. Used in adders and parity checks, exam favourite. Recall: XOR of 1 and 1 is? 0.
- Fact 9 of 12โ๏ธ
XNOR gate: output 1 when inputs match
XNOR gives 1 when both inputs are the same, so it is the inverse of XOR. It is also called the equivalence gate. Recall: XNOR of 0 and 0 is? 1.
- Fact 10 of 12๐
De Morgan's law flips AND to OR
De Morgan's law: NOT (A AND B) = (NOT A) OR (NOT B). Exam word: negation passes through and turns AND into OR. Recall: De Morgan turns AND into? OR.
- Fact 11 of 12๐ฏ
Identity law: adding 0 or ANDing 1 changes nothing
A OR 0 = A, and A AND 1 = A. Like adding nothing to a bag, the value stays the same. Recall: A AND 1 equals? A.
- Fact 12 of 12๐งฎ
Complement law: a value and its opposite
A OR (NOT A) = 1, and A AND (NOT A) = 0. A switch cannot be ON and OFF at the same time. Recall: A AND NOT A equals? 0.
