A pattern is one-hot when exactly one of its bits is 1. The value isn't read as a binary number; it's read from where the 1 sits.
With four lines, the one-hot patterns are 0001, 0010, 0100 and 1000. Each means "line 0", "line 1", "line 2" or "line 3".
You meet one-hot signals all over digital design:
- The outputs of a decoder (without enable, or with it on) are always one-hot.
- A plain encoder assumes its inputs are one-hot; with two lines active it gives nonsense.
- Memory word lines and chip selects are one-hot, so only one row or chip responds.
- In a state machine, one-hot state encoding gives each state its own flip-flop.
The trade-off against binary:
- Binary packs N values into ⌈log₂N⌉ bits. One-hot needs N bits.
- One-hot needs no decoding: checking "are we in value 3?" is just reading one wire.
All zeros is not one-hot (no line active), and neither is any pattern with two or more 1s. The mirror idea, exactly one bit 0, is sometimes called one-cold, and it's what decoders with active low outputs produce.