3.3.7 · D1Combinational Circuits

Foundations — Encoders and priority encoders

2,205 words10 min readBack to topic

Before you can read a single equation like , you must be fluent in the small alphabet of symbols it is built from. This page defines every one of them, from absolute zero, in the order they build on each other. Nothing here assumes you have seen digital logic before.


1 · A wire that is ON or OFF — the bit

The picture. Think of a light switch on a wall. It is either down (dark, ) or up (lit, ). There is no "half on". Every input line and every output line on the parent page is exactly one of these switches.

Why the topic needs it. An encoder is entirely made of these two-state wires. "One input active" simply means "exactly one of these switches is up." If you cannot picture a wire as an up/down switch, nothing else will make sense.

Figure — Encoders and priority encoders

2 · Writing numbers with only 0 and 1 — binary

The picture. Ordinary numbers use columns worth . Binary uses columns worth . To read a binary number, add up the column-values wherever there is a .

Why the topic needs it. The whole job of an encoder is to output the binary code of an input's index. When the parent says " active gives output ", it means the number written in binary. Without binary, "the outputs give the index in binary" is a meaningless sentence.

Figure — Encoders and priority encoders

3 · Naming the wires — subscripts and

The picture. Think of numbered lockers: is locker 0, is locker 3. The name and the number are painted right on the door.

  • Inputs are named (for Input): .
  • Outputs are named : is the least significant bit (the s column), the next (s column), and so on up to .

Why the topic needs it. Every equation on the parent page is written with these subscripted names. only means something once you know is one specific output wire and are two specific input wires.


4 · The power notation

The picture. Each extra output wire doubles how many inputs you can label. With output wire you can name inputs; with wires, inputs; with wires, inputs. A branching tree that splits in two at every level.

Why the topic needs it. A "-to- encoder" says: output wires can name input wires. For that is a -to- encoder; for an -to-. The whole naming scheme rests on this doubling.


5 · The reverse question —

The picture. goes "wires → how many inputs." goes backwards: "how many inputs → how many wires do I need?" It is the undo button for the power.

Why this tool and not another? The parent asks: "8 buttons — how few wires carry which one?" That is exactly " to what power is ?" — a question. We use (not division, not subtraction) because information capacity doubles per wire, and is the only operation that inverts doubling.


6 · Logic OR — the symbol

0 0 0
0 1 1
1 0 1
1 1 1

The picture. Two switches wired in parallel to one lamp: press either switch and the lamp lights. Only if both are down is the lamp dark.

Why the topic needs it. Every encoder equation is a chain of ORs: literally means "valid if input 0 OR input 1 OR input 2 OR input 3 is on." See Boolean algebra simplification for how these expressions get tidied.

Figure — Encoders and priority encoders

7 · Logic AND — writing symbols side by side

The picture. Two switches wired in series — like two gates on a fence, both must be open for you to walk through. If either is shut, no path.

Why the topic needs it. The priority term means "input 1 is on AND input 2 is off." That AND is how one input gets suppressed by a higher one.


8 · Logic NOT — the overbar

The picture. An inverter: feed a switch through it and up becomes down, down becomes up. A little upside-down mirror for a single wire.

Why the topic needs it. is the phrase " is not active." In , the bar is what makes input 1 step aside whenever the higher-priority input 2 is present. Remove the bar and priority breaks.


9 · Don't-care — the symbol

The picture. A blank in a form you were told to leave empty. It is not and not — it is "irrelevant, skip it."

Why the topic needs it. In the priority truth table, once a high input is on, the lower inputs are marked because they change nothing — the higher one already decided the answer. And when nothing is on, the outputs are because tells us to ignore them entirely. Don't-cares are also what let Karnaugh maps simplify the logic so cleanly.


10 · The truth table itself

The picture. A full menu: every combination of orders on the left, the exact dish served on the right — with nothing left unspecified.

Why the topic needs it. The parent derives the encoder equations by reading a truth table. You look down each output column and ask "which input rows make this a ?" — then OR those together. The table is the source of truth from which all equations flow.

Figure — Encoders and priority encoders

11 · The valid signal

The picture. A tiny "occupied" lamp above the whole device: lit means "yes, a real answer is on the output wires"; dark means "ignore the outputs, nobody is here."

Why the topic needs it. Output is ambiguous — it could mean "input 0 is active" or "nothing at all." resolves this: with means input 0; means empty. It is the fix for the all-zero failure case.


Prerequisite map

Bit ON or OFF

Binary numbers

Indexed names I0 Y0

Power 2 to the n

Log base 2

OR plus

AND side by side

NOT overbar

Dont care X

Truth table

Valid bit V

Encoders and priority encoders


Equipment checklist

A wire in digital logic can be in how many states, and what do we call them?
Two — /LOW/OFF and /HIGH/ON.
What is in ordinary (base-ten) numbers?
(one plus one ).
In the name , what does the mean, and is the second or third wire?
It is the index (position from 0); is the third wire because counting starts at .
What does equal, and what does equal?
and — they are inverse operations.
In Boolean logic, what is ?
— the means OR, not arithmetic addition.
What does mean?
NOT : it is when is and vice versa.
What does writing (symbols side by side) mean?
AND: is on AND is off.
What does mean in a truth table?
Don't-care — the value is irrelevant and may be or .
What is the truth table's job?
To list every input combination and the exact required output for each — the complete definition of the circuit.
What does the valid bit tell you about the output wires?
Ignore them — no input is active, the output code is meaningless.

Connections