Short notes

Decoder and Encoder Short Notes

In a memory address decoding circuit for an 8085 system, the 74138 3-to-8 decoder activates exactly one chip-select line for every valid 3-bit address on its inputs. Connect A15, A14, A13 to the 74138 inputs and each of the eight output lines maps to an 8 KB page of the memory map — that's the decoder doing real work in a real system. Encoders do the reverse: the 74148 priority encoder watches eight input lines and converts the active one into a 3-bit binary code.

EEE, ECE, EI

How it works

The 74138 has three active-low enable inputs (G1 active-high, G2A and G2B active-low) that must all be satisfied before any output fires. For input CBA = 101, output Y5 goes LOW while all other outputs stay HIGH. The output is always active-low because the internal AND gates drive open-collector-compatible pull-downs. In the 74148 priority encoder, if both input 5 and input 3 are active simultaneously, input 5 wins because it has higher priority, and the output code becomes 010 (the complement of 5 in active-low logic).

Key points to remember

A decoder with n inputs produces 2ⁿ outputs, each representing one minterm — that's why decoders are used to implement sum-of-minterms Boolean expressions directly. The 74138 output propagation delay is about 25 ns on a 5V supply. Priority encoders like the 74148 include a GS (group select) output that goes LOW when any input is active, distinguishing a genuine zero-code output from an all-inputs-inactive state. An encoder with 2ⁿ inputs needs n output lines, while a decoder needs the opposite mapping.

Exam tip

Every Anna University paper has a question on implementing a full adder or a Boolean function using a 74138 decoder with external OR gates — draw the minterm connections clearly and label every output pin.

More Digital Electronics notes