Lecture 2 Combinational Logic Circuit Design
Lecture 2 Combinational Logic Circuit Design
1- Introduction
There are two classes of logic circuits:
1. Combinational Circuits
2. Sequential Circuits
A Sequential circuit consists of logic gates and memory output depends on current inputs
and previous ones (stored in memory) memory defines the state of the circuit.
Combinational Logic Circuits are memory less digital logic circuits whose output at
any instant in time depends only on the combination of its inputs. The outputs
of Combinational Logic Circuits are only determined by the logical function of their
current input state, logic “0” or logic “1”, at any given instant in time.
The result is that combinational logic circuits have no feedback, and any changes to the
signals being applied to their inputs will immediately have an effect at the output. In
other words, in a Combinational Logic Circuit, the output is dependant at all times on
the combination of its inputs. Thus a combinational circuit is memory less.
Examples are gates, parallel adders, decoders, encoders, comparators. Combinational logic
circuits can be very simple or very complicated. Combinational circuit can be
implemented with only NAND and NOR gates as these are classed as “universal” gates.
The three main ways of specifying the function of a combinational logic circuit are:
1
1. Boolean Algebra – This forms the algebraic expression showing the operation of
the logic circuit for each input variable either True or False that results in a logic
“1” output.
2. Truth Table – A truth table defines the function of a logic gate by providing a
concise list that shows all the output states in tabular form for each possible
combination of input variable that the gate could encounter.
3. Logic Diagram – This is a graphical representation of a logic circuit that shows
the wiring and connections of each individual logic gate, represented by a specific
graphical symbol that implements the logic circuit.
All three of these logic circuit representations are shown below in Fig. 1.
Fig. 1
2- Design procedure
The design procedure for combinational logic circuits starts with the problem specification
and comprises the following steps:
2
Eample1 1:
Design a logic circuit that has a 3-bit binary input A, B, and C and a single output Z
specified as follows:
Solution:
Step 1:
Truth Table 1
A B C Z
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Step2:
Z = A * ~B * C + A * B * ~C + A * B * C
3
Use Boolean Algebra to simplify the Boolean expression to:
Z = (B + C) * A
Step: 3
Fig. 2 diagram that represents the simplified Boolean expression for example1
Example 2:
Design a logic circuit for half adder. The circuit has a 2-bit binary input A, and B with A
as MSB and B as LSB. The circuit has two outputs sum(S) and carry (C). Drive sum-of-
product expression for outputs S and C. Draw a logic diagrams for the outputs.
Solution
A basic module used in binary arithmetic elements is the half adder. The function of the
half adder is to add two binary digits, producing a sum and carry according to binary
addition rules shown in table 2. Figure 3 shows a design for a half adder. There are two
inputs to the half adder, designated as A and B in Figure 3, and two outputs, designated as
S (for sum) and C (for carry). If either of the inputs is a 1, but not both, the output on the S
line will be a 1. If both of the inputs are 1’s, the output on C line will be a 1, for all other
states there will be a 0 output on the carry line. These relationships may be written in
Boolean form as follows:
4
Truth Table 2:
5
Example 3:
Design a logic circuit for full adder. The circuit has a 3-bit binary input A, B, and Cin with
A as MSB and Cin as LSB. The circuit has two outputs sum(S) and carry (Cout). Drive
sum-of- product expression for outputs S and C. Draw a logic diagrams for the simplified
outputs expressions using Boolean Algebra rules.
Solution:
Computers and calculators perform the addition operation on two binary numbers at a
time, where each binary number can have several binary digits. The full adder circuit has
three inputs: an A bit, a B bit, and a Cin bit. It also produces two outputs: a sum bit and a
carry bit.
To design a full adder, we must construct a truth table showing the various input and
output values for all possible cases. Figure 4 shows the truth table having three inputs A,
B, and CIN, and two outputs S and COUT. There are eight possible cases for the three
inputs, and for each case the desired output values are listed. For example, consider the
case A = 1, B = 0, and CIN = 0. The full adder (hereafter abbreviated FA) must add these
bits to produce a sum (S) of 0 and a carry (COUT) of 1.
Since there are two outputs, we will design the circuitry for each output individually,
starting with the S output. The truth table shows that there are four cases where S is to be a
1. Using the sum-of-product method, we can write the expression for sum as
6
We can try to simplify this expression by Factoring. Unfortunately, none of the terms in
the expression has two variables in common with any of the other terms. However, A can
be factored from the first two terms, and A can be factored from the last two terms.
Which is simply the EX-OR of A and X, replacing the expression for X, we have
Consider the output COUT, in the truth table of Figure 4. We can write the sum-of-product
expression for COUT as follows:
This expression can be simplified by factoring. We will employ the trick introduced in
chapter 2, whereby we will use AB CIN term three times since it has common factors with
each of the other terms. Hence,
This expression can not be simplified future. Expression 1 and expression 2 can be
implemented as shown in Figure 5. Several other implementations can be used to produce
the same expressions for S and COUT none of which has any particular advantage over
those shown.
7
Fig. 5 Complete circuitry for a Full- Adder
8
Example 4:
Design BCD-to-Seven-Segment Decoder which accepts a decimal digit in BCD (input) and
generates appropriate outputs for the segments to display the input decimal digit (output). A
seven-segment display is digital readout found in electronic devices like clocks, TVs, etc.
Made of seven light-emitting diodes (LED) segments; each segment is controlled
separately.
Solution:
Step 1: (Specification):
4 inputs (A, B, C, D)
7 outputs (a, b, c, d, e, f, g)
Step 2:
To design BCD-to-Seven-Segment Decoder, we must construct a truth table showing the
various input and output values for all possible cases.
9
Step 3:
Simplify the output expressions using K-map
10
Example 5:
A logic circuit has 3-inputs A, B, and C, with A as MSB and C as LSB. The circuit has
4-outputs X, Y, Z, and W, with X as MSB and W as LSB. The output can be obtained by
subtracting (1001)2 from its input, Determine the following: -
1- Develop the product-of-sum for the output expressions.
3. Simplify the output expressions using Boolean algebra rules.
4. Draw logic circuits to implement the simplified output expressions using
NOR gates only.
Solution:
Step 1: Truth Table
11
Step 2: output Product-of-sum Expressions
12
Problems
1- A logic circuit has 3-inputs X, Y, and Z with Z as the LSB and X as the MSB. The
circuit has 3-outputs C, B, and A with A as the LSB and C as the MSB. The output will
be incremented for its input if the input is even or zero, and will be decremented if the
input is odd.
1- Develop the product-of - sum expressions for C, B, and A outputs.
2- Simplify the output expressions using Boolean algebra rules.
3- Draw the circuit that implements the simplified expression for the output expressions
using only NOR gates.
2- A logic circuit has 3-inputs A, B, and C, with A as MSB and C as LSB. The circuit has
3-outputs X, Y, and Z, with X as MSB and Z as LSB. The output can be obtained by
incrementing the negative of the input if the input is odd, also the output can be
obtained by decrementing the negative of the input if the input is zero or even.
Determine the following: -
1. Develop the product-of-sum for the output expressions X, Y, and Z.
2. Simplify the output expressions using Boolean algebra rules.
3. Draw logic circuits for the simplified output expressions using NOR gates only.
3- With the aid of a circuit diagrams and truth tables design a full adder and a half-adder,
and do the following: -
1- Use a full-adder to design a 4-bit parallel adder.
2- Design a correction circuit so that a parallel adder can be used as BCD adder. Describe
the sequence of operation if the sum is greater than, less than or equal to (1001)2.
3- How a full-adder can be constructed from two half-adders .
4- A logic circuit has 3-inputs A, B, and C, with A as MSB and C as LSB. The circuit has
3-outputs X, Y, and Z with X as MSB and Z as LSB. The output can be obtained by
subtracting (111)2 from its input.
1. Develop the sum-of-product for the output expressions.
2. Simplify the output expressions using Boolean algebra rules.
3. Draw a logic circuit for the simplified X output expression using NOR gates only.
13