Share this

A Brief Discussion on Combinational Logic Chip Decoders and Encoders

2026-04-06 06:24:16 · · #1

1. Decoder

In complex and multifunctional digital circuit systems (such as computers, CNC systems, and satellite communications), there are numerous chips, including registers, controllers, I/O interfaces, and ADCs/DACs. These chips share the system's address bus, data bus, and control bus, and the central processing unit (CPU) uses addressing methods to locate them and exchange data with them, or between chips. Each chip has a fixed and unique address, and the task of assigning addresses to each chip is handled by the decoder chip.

A decoder is a combinational logic circuit chip that translates a set of codes into corresponding output signals.

If a digital circuit system requires addressing a large number of chips, then the address bus will also need to be long. For example, a 16-bit address bus can allocate 2ⁿ (n=16) = 65536 addresses. Since it's impossible to manufacture 65536 address lines on an integrated circuit board, and decoder chips cannot be made in the same way, related chips are often grouped together, such as 2ⁿ (n=3) = 8 chips per group, requiring only 3 address lines. This is easier to implement on an integrated circuit board. For a 32-bit address bus, only 10 decoder chips are needed, forming 10 groups. The remaining 2 address lines can be used by chips with built-in decoding circuitry.

At any given time, only one chip is addressed after the decoder decodes. When the enabled pin of the addressed chip is active, it is equivalent to the door being opened. Only that chip can receive data on the data bus, or it can transmit its internal data to the data bus, where the CPU receives and processes it.

Types of decoders

1. Variable decoder

Common types include two-input four-output; three-input eight-output; and four-input sixteen-output.

2. Code conversion decoder

Common binary-to-decimal decoders; Excess-3 code to decimal decoders; cyclic to binary decoders, etc.

3. Display decoder

Early Glow LED decoders; BCD seven-segment display decoders; LCD decoders, etc.

Second, encoder

An encoder is a chip that corresponds to a decoder. The encoder has 2ⁿ bits (root wires) of input and n bits (root wires) of output. Its function is to encode the input signal into a combinational logic circuit that outputs different codes. It is commonly used in keyboards (with encoders generating ASCII codes), disk drives, printers, dial switches, other peripheral interfaces, and photoelectric encoders and hand pulse encoders in CNC systems.

Each key input on the keyboard used by computers and CNC systems is encoded into a corresponding ASCII code output by an encoder; 101 keys result in 101 ASCII codes. When a key is pressed, the CPU knows the input key from the code and performs the corresponding processing. Similarly, other peripherals obtain a unique identity through the encoder. When a peripheral needs to input data into the system or requests data, the CPU learns this through a peripheral request interrupt or software scan, and then exchanges and processes data with the peripheral based on the identity code provided by the encoder.

Encoder types

1. Ordinary encoder

To prevent encoder output errors, ordinary encoders only allow one valid encoded signal to be received at any given time, resulting in poor interference resistance and susceptibility to bit errors. For example, the common 8421 BCD encoder uses combinational logic circuits to convert 0-9 digits into BCD code for output.

2. Priority Encoder

To overcome the shortcomings of ordinary encoding, priority encoders allow two or more valid encoded signals. When multiple signals occur simultaneously, they are encoded according to a convention, such as priority level, larger number, or first-come-first-served principle. Examples include 8-3 priority encoders (74LS148), 4-2 priority encoders, 10-4 priority encoders (74LS147), 16-4 priority encoders, and 8421BCD priority encoders.

By combining different types of encoders and decoders, along with other gate circuits, Gray code, ASCII code, ISO code, 8421 code, 5211 code, 2421 code, Excess-3 code, complement code, and inverse code can be implemented.

Read next

CATDOLL Q 88CM TPE Doll

Height: 88cm Weight: 11.5kg Shoulder Width: 25cm Bust/Waist/Hip: 49/45/51cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm Ana...

Articles 2026-02-22