Abstract
Encoders and Decoders are fundamental code-converting combinational circuits. A Binary Encoder compresses input lines into an -bit binary code under the operational assumption that at most one input is active. Conversely, an -to- Decoder expands an -bit binary select input into one-hot active output lines governed by an enable signal ( or ). Decoders serve as the backbone of memory address decoding, device assertion, and minterm generation.
Binary Encoders
An Encoder performs the reverse operation of a decoder. It accepts input lines () and converts the active input index into an -bit binary output code .

Binary Encoder Symbol and Internal Logic Structure
Functional Assumption & Active Output Flag
A basic binary encoder assumes that at most one input is HIGH () at any given time. An auxiliary Active Flag () output signals whether at least one input line is currently asserted.
Mathematical Definition
For an enabled encoder ():

Detailed Logic Schematics for a 4-to-2 Binary Encoder
Decoders ()
A Decoder decodes an -bit binary input code (referred to as Select inputs ) to activate exactly one of output lines.

N-to-2^N Decoder Block Diagram with Enable Line
One-Hot Output Behavior
When the enable signal is active ( or ), the decoder outputs operate in a one-hot configuration: exactly one output line is asserted HIGH (), while all other output lines remain LOW ().
Enable Line ( / ) Gating
If (or ), all outputs are forced to , disabling the driven devices regardless of the select inputs.

Logic Truth Table for Standard Decoders
Decoder Logic Equations & Architectures
The enable signal acts as a product factor across all output minterm equations:
1:2 Decoder ( Select, Outputs)
2:4 Decoder ( Selects, Outputs)
3:8 Decoder ( Selects, Outputs)
Decoder Applications
Decoders are fundamental building blocks in computer memory architectures and bus controllers:

- Memory Address Decoding: Converts an -bit memory address from the CPU bus into a single active word line select signal in RAM/ROM chips.
- Device Assertion / Chip Select (CS): Routes control signals to assert specific peripheral devices connected to a shared system bus.
- Universal Minterm Generator: Because each decoder output line generates a unique minterm , any arbitrary -variable Boolean function can be implemented by feeding the relevant decoder output lines into an OR gate.