Decoding a Binary Choice to One Output
A decoder maps an input code to a signal on one selected output line when enabled.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Read two input bits
With active-high output convention, input 10 to a two-to-four decoder activates output line two. Line numbering follows the unsigned binary numeral. Other lines are low in this enabled state.
Check the enable input
When disabled, many decoder designs keep every output inactive. This creates an all-zero state separate from ordinary selection. One-hot encoding describes the enabled pattern, and polarity determines which level counts as active.[1]
Follow which output line becomes asserted
A two-bit selection 01 activates output Y1 of a two-to-four active-high decoder. The other three are low. With an enable signal, disabling the block can keep all outputs low regardless of selection. See one-hot internal states.
With outputs listed Y3 Y2 Y1 Y0
Code 00 → 0001
Code 01 → 0010
Code 10 → 0100
Code 11 → 1000
Check signal polarity and decoding conditions
In an active-low decoder, one output may be low when selected and the others high. A test for exactly one high would then be wrong. Verify the enable behavior and compare the pattern using the output ordering in the interface.