Home   >   Textbooks   >   Basic Electronics   >   Combinational Logic   >   Binary Decoder   >

Combinational Logic

# Binary Decoder

Computers and other processing devices are generally designed to operate on data (digits) which is in the binary coded form. A binary-coded decimal digit, for example, can be represented by a combination of four binary bits (signals). It is not usually desirable to present the final computer output in binary form as this requires too much time in reading and interpreting. Thus it is necessary to perform conversion to more conventional form. A unit that translates a combination of binary signals into one discrete signal representing that combination is called a binary decoder.

Sometimes a computing system will use more than one form of code. In this case it may be necessary to change data from one coded form to another inside the system. The unit which changes data from one code to another is called a translator.

For an example, let us suppose that four flip-flops are used to hold the coded combination of a decimal digit. The digit in the four flip-flops might be any one of the ten decimal digits 0 ... 9, expressed in a binary code. Suppose we want to recognize the pulse combination for the numeral 6, which in binary is 1001. No single flip-flop can tell us whether or not the pulse combination is 6. To discover this we must consult all four flip-flops. The combination equals 6 only if

The decoding of the combination 6, therefore, can be done by an AND gate, which inspects the 4 flip-flops for the proper combination, as shown below. When the combination is 1001, all of the inputs to this AND gate are high, and it will produce a high output. If there is any other combination in the flip-flops, some one of the inputs will be low, and will prevent the AND gate from developing a high output. This AND gate is a decoder for the combination 6 because it provides a discrete signal in place of a combination of signals.

The AND gate as a decoder.

The AND gate shown here is only good for decoding the combination representing 6. To decode any other numerals, we would have to provide a separate AND gate for each one of them. To decode the ten decimal digits 0 ... 9 would require ten decoding AND gates.

## A Simple Decoder

Let us take the simple case of decoding a two-stage binary counter. Such a counter is capable of holding four counts (numbers): 00, 01, 10, and 11. To decode all four counts would require four AND gates. Below is an example, using four AND gates and two inverters (for obtaining complementary signals).

2-input decoder.