Lecture 8: Combinational Logic — Standard Elements

In this lecture, we move on to a consideration of multiple-input multiple-output logic circuits. We are particularly interested in a range of commonly used logic circuits which tend to find extensive use in larger digital processing systems.

Learning Outcomes:

On completing this lecture, you will be able to

  • design multiple-input multiple-output combinational logic circuits, typically up to four inputs;
  • functionally describe such frequently used elements as decoders, encoders, and the multiplexer;
  • demonstrate the application of the multiplexer to implement a programmable gate.

8.1Combinational Logic

Basically, a combinational logic circuit maps an N-bit input pattern (or combination) onto an M-bit output pattern, ie

For a combinational logic circuit, the output pattern is determined solely by the present input pattern — whereas for a sequential logic circuit, the output pattern depends on a sequence of input patterns. The general combinational logic circuit may in effect be decomposed into M separate logic circuits, each described by its own particular Boolean equation

so that the logic design task is in essence one of designing M individual single-output logic circuits

8.2Code Conversion

We illustrate the design of a general combinational logic circuit with reference to a particular example in which we wish to switch information content from one particular code format to another code, a so-called code converter.

Example 8.1:Design a binary to excess-three code converter for decimal numbers 0 through to 9. It may be assumed that binary codes for ten through to fifteen do not occur. A listing of the codes is given as follows:

Number / X3 / X2 / X1 / X0 / Y3 / Y2 / Y1 / Y0
0 / 0 / 0 / 0 / 0 / 0 / 0 / 1 / 1
1 / 0 / 0 / 0 / 1 / 0 / 1 / 0 / 0
2 / 0 / 0 / 1 / 0 / 0 / 1 / 0 / 1
3 / 0 / 0 / 1 / 1 / 0 / 1 / 1 / 0
4 / 0 / 1 / 0 / 0 / 0 / 1 / 1 / 1
5 / 0 / 1 / 0 / 1 / 1 / 0 / 0 / 0
6 / 0 / 1 / 1 / 0 / 1 / 0 / 0 / 1
7 / 0 / 1 / 1 / 1 / 1 / 0 / 1 / 0
8 / 1 / 0 / 0 / 0 / 1 / 0 / 1 / 1
9 / 1 / 0 / 0 / 1 / 1 / 1 / 0 / 0

Treating the above listing as a truth table for our four-input four-output logic circuit, and noting that states 1010 to 1111 may considered as “don’t cares,” we form the Karnaugh map for each of the four individual functions and the associated minimum Boolean equation:

Rather than consider these as four independent logic circuits, we look for terms (and thus sub-circuits) common to the four equations:

This set of equations yields the following logic circuit:

Clearly there are hardware savings resulting from the common terms.

We now proceed to discuss a number of frequently used combinational logic blocks.

8.3The Multiplexer

The idea behind the multiplexer is one of data selection.

The unit has a number of data inputs Di, usually an integral power of two. If the unit has 2N data lines then it also has N input select lines. The binary pattern on the select lines specifies which one of the data lines is routed through to the single output. This functionality is captured in the following abbreviated truth table:

S1 / S0 / X
0 / 0 / D0
0 / 1 / D1
1 / 0 / D2
1 / 1 / D3

By inspection we have

and the corresponding logic diagram is

We note a structural correspondence between the equation for the multiplexer and the general canonical sum-of-products equation for any two-variable logic function:

By applying the A,B inputs to the data selection nodes S1, S0, and the f3, f2, f1, f0 coefficients to the D3, D2, D1, D0 inputs, the multiplexer can be used to implement any two-variable logic function. In this sense, it can be regarded as an implementation of the two-input fully programmable logic gate.

8.4Other Logic Elements

A decoder is a logic circuit with N inputs and 2N outputs. Only one of the output lines is activated with a 1, that corresponding to the binary code present at the input. Again the following table specifies the function in abbreviated truth table form.

S1 / S0 / X3 / X2 / X1 / X0
0 / 0 / 0 / 0 / O / 1
0 / 1 / 0 / 0 / 1 / 0
1 / 0 / 0 / 1 / 0 / 0
1 / 1 / 1 / 0 / 0 / 0

A set of Boolean equations can be written for the four outputs and the corresponding logic diagram can be determined.

An encoder is the opposite of the decoder; it has 2N inputs and, assuming only one input line is activated (with a 1), it produces at the output the binary code corresponding to that input which is activated. This is captured in the following truth table:

D3 / D2 / D1 / D0 / X1 / X0
0 / 0 / 0 / 1 / 0 / 0
0 / 0 / 1 / 0 / 0 / 1
0 / 1 / 0 / 0 / 1 / 0
1 / 0 / 0 / 0 / 1 / 1

Again, the logic equation and diagram follow directly.

A so-called priority encoder allows for the possibility of more than one input being activated. However, the element will have a prioritising protocol whereby if two or more inputs are activated, only the activated input with the highest priority will have its binary code at the output. Generally, D3 will have higher priority than D2 which will have higher priority than D1, etc.

8.4Conclusion

In this lecture, we have covered the general problem of combinational logic design and introduced a number of standard functional elements such as the multiplexer, decoder, and encoder. When designing integrated circuits, these standard functional elements come as pre-designed standard cells in addition to the primitive gates such as NAND, NOR, etc, thus simplifying the system design task.

8-1