Foundations — Decoders (2 - 4, 3 - 8)
Before you can build or trust a decoder, you must own every symbol the parent note tosses around: bits, MSB/LSB, weights, the overline (NOT), the dot (AND), the plus in logic, minterms, and one-hot. This page builds each from nothing, in the order they depend on each other.
1. A bit — the smallest picture
Picture a light switch on a wall. Down = , up = . That is the entire vocabulary of digital hardware — everything else is just many of these switches side by side.
Why the topic needs it. A decoder's inputs and outputs are all bits. The "binary address" is a row of these switches; each output line is one lamp that is on or off. If you don't picture a bit as a two-state switch, every later symbol is floating.
2. Grouping bits — MSB, LSB, and weights
When you put several bits in a row, you get a binary number. But a row of switches like 1 0 is meaningless until you agree which switch counts more.
Why "" and not something else? Because we count in base 2: each step left is worth twice the one before, exactly like decimal steps are worth ten times more (units, tens, hundreds). We use powers of 2 because a bit has 2 states. Look at the figure: the left column has the tall weight-4 pillar, the right has the short weight-1 pillar; the height is the weight.
3. The three logic operations — NOT, AND, OR
A decoder is built from tiny machines called gates. You need exactly three, and each has a plain-words meaning, a picture, and a symbol.
NOT — the overline
Picture: a switch wired backwards — when you press it down the lamp goes up. The overline is a promise "I inverted this wire".
Why the topic needs it. Look at . Output 0 must fire when both inputs are . To turn a -input into the "yes" signal an AND gate wants (a ), we first flip it with NOT. The overline is how a minterm says "this input should be low here".
AND — the dot
Picture two switches wired in series (one after another) feeding one lamp: the lamp lights only if switch-1 AND switch-2 are both up.
Why the topic needs it. Each decoder output must be picky — it fires for exactly one input pattern. AND is the "all conditions must hold" machine, so it is the natural way to demand " is this AND is that". That's why every output equation is an AND of the (possibly barred) inputs.
OR — the plus
Picture two switches wired in parallel (side by side) to one lamp: either one up lights the lamp.
Why the topic needs it. In Example 3 of the parent, . Once the decoder hands you all the minterms, OR is the glue that says "fire if any of these lines is hot". OR is how a decoder becomes a function-builder.
4. Minterm — the "exactly one row" product
Now we can assemble the star of the whole topic.
How to read/write a minterm from a number :
- Write in binary using the right number of bits.
- For every bit that is , write the variable plain; for every bit that is , write it barred.
- AND them all together.
Example: with 3 bits is , so .
Why the topic needs it. The parent's central claim is "outputs = minterms". Each decoder output line is one minterm, one lock, one key. This is why a decoder needs no simplification — every output is already the single AND term for its row. See Minterms and Maxterms for the full family, and Sum of Products (SOP) for how OR-ing minterms builds any function.
5. One-hot — the shape of the output
Picture a row of lamps where a rule guarantees precisely one glows. The parent's hotel image: address 0110 lights exactly one door.
Why the topic needs it. Because each output is a different minterm, and any given input matches exactly one minterm, the outputs are mutually exclusive — that is the very definition of one-hot. This is the promise a decoder makes to memory rows, display drivers, and dispatch logic: "I will point at exactly one thing." See Memory Address Decoding for the payoff.
6. Enable and active-low — two extra conventions
Why the topic needs them. Enable is what glues two 2:4 decoders into a 3:8 (the MSB enables one half). And real chips (like the 74138) output active-low, so "selected = " — misreading this flips every answer. See Demultiplexers: routing data through the Enable pin turns a decoder into a demux.