Foundations — XOR, NAND, NOR, XNOR gates
Before you can read a single line about XOR or NAND, you need a small toolbox of symbols. This page hands you each tool, one at a time, and never uses a symbol before it is built. Read top to bottom.
0. The atom: a bit (the values and )
The picture: think of a single light switch. It is either up or down — never halfway. That is a bit. The whole of digital hardware is built from millions of these switches.
Why the topic needs it: every input and output in a logic gate is a bit. When the parent note writes a truth table full of s and s, each of those is one switch state. If "two values only" is not rock-solid, nothing else lands.
1. Inputs and outputs — the letters ,
The picture: a box with two wires coming in on the left (labelled and ) and one wire leaving on the right. The left wires carry the input bits; the right wire carries the answer.
Why the topic needs it: the formulas , , all describe what the box does to and . Without names for the inputs we could not write any rule down.
2. The three primitive rules: NOT, AND, OR
Everything else is built from these three. Learn them as actions on bits, not as spells.
2a. NOT — the flipper (the overbar )
| 0 | 1 |
| 1 | 0 |
The picture: press an inverter and the switch snaps to the opposite position.
Why the topic needs it: the "N" in NAND and NOR is this bar — NAND is "NOT of AND", written with a bar over the whole AND. XOR's formula is full of bars. If you cannot read as "the opposite of ", the parent note is unreadable.
2b. AND — the "both" rule (the dot )
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The picture: two switches wired in series (one after the other) on the same line. Current reaches the bulb only if both switches are closed.
Why the topic needs it: NAND is literally . To understand NAND you must first know what gives on every row.
2c. OR — the "at least one" rule (the plus )
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The picture: two switches wired in parallel (side by side, two paths to the bulb). Closing either path lights the bulb.
Why the topic needs it: NOR is , and both XOR and XNOR formulas OR their terms together. The sign appears everywhere in the parent note.
3. Reading a truth table
The picture: a grid. Walk down it row by row; each row is one "what if the switches were like this?" scenario, and the last column tells you the light's state.
Why the topic needs it: every gate in the parent note is defined by its truth table. To "know a gate" simply means "be able to fill in its output column".
4. The compound symbols the topic introduces
Now the toolbox from sections 2 and 3 lets us read the new symbols without fear.
Why order matters (the bar's reach): in the bar sits over both letters, so you compute first, then flip the single result. Compare , where each letter is flipped first, then ANDed. These are different circuits — that is the whole point of De Morgan's theorem the parent note relies on.
5. Two facts you will lean on constantly
Why the topic needs it: the trick "tie both NAND inputs together to make NOT" uses exactly this: . Without idempotence that first step is a mystery.
Why the topic needs it: this is exactly how the parent note derives . Deeper treatment lives in Sum of Products (SOP).
6. How these foundations feed the topic
Equipment checklist
Cover the right side and answer aloud — if any stalls, reread that section before the parent note.
What are the only two values a bit can take?
What does the overbar do to a bit?
When is (AND) equal to ?
When is (OR) equal to ?
What is in Boolean OR?
How many rows does a 2-input truth table have, and why?
In , which do you compute first?
Is the same as ?
What does equal, and why does it matter?
What does the symbol mean in words?
What does the SOP recipe do?
Connections
- ↑ Parent topic — the gates these symbols build
- AND, OR, NOT gates — the three primitives defined here in full
- Boolean Algebra Laws — De Morgan and idempotence proved properly
- Sum of Products (SOP) — the row-reading recipe in depth
- Universal Gates — why NAND alone rebuilds all of the above
- Half Adder and Full Adder — first place these gates get combined
- 3.1.06 XOR, NAND, NOR, XNOR gates (Hinglish) — same ideas in Hinglish