Chapter 4 Combinational Logic Circuit
Chapter 4 Combinational Logic Circuit
Chapter 4 Combinational Logic Circuit
University of Gondar
Institute of Technology
Department of Electrical Engineering
Digital Logic Design:
Chapter 4: Combinational Logic Circuit
By:
Habtamu Maru
Outline
1 Introduction
It react to the value of the signals at their inputs and produce the
value of the output signal, transforming binary information from
the given input data to a required output data.
A block diagram of a combinational circuit is shown in Fig. below,
The ”n” input binary variables come from an external source; the
”m” output variables are produced by the intend combinational.
For ”n” input variables, there are 2n possible binary input combina-
tions. For each possible input combinations, there is one possible
output value.
Thus a combinational circuit can be specified with a truth table
that lists the output value for each combination of input variables.
A combinational circuit also can be described by ”m” Boolean func-
tion, one for each output variable. Each output function is ex-
pressed in terms of the ”n” input variable.
Adders
Adders are important in computers and other types of digital systems in
which numerical data are processed.
Half Adder
Half adder is a combinational logic circuit with two inputs and two out-
puts.
The half adder circuit is designed to add two single bit binary number A
and B and having two outputs carry and sum. It is the basic building block
for addition of two single bit numbers.
The SUM output is the LSB of the result, while the CARRY output is the
MSB of the result, indicating whether there was a carry-over from the
addition of the two inputs.
The half adder can be implemented using basic gates such as XOR and
AND gates.
Habtamu M. Digital Logic Design March 15, 2023 7 / 50
Digital Logic Design
Common Combinational Logic Circuit
Arithmetic and logical Function
Full Adder
The full-adder accepts two input bits (A and B) and an input carry (Cin )
and generates a sum output (∑) and an output carry (Cout ).
Figure: Block diagram of a n+1-bit parallel adder circuit using full adders.
Half Subtraction
A half subtractor is a digital logic circuit that performs binary sub-
traction of two single-bit binary numbers.
It has two inputs, A and B, and two outputs, DIFFERENCE and BOR-
ROW. The DIFFERENCE output is the difference of the two input
bits, while the BORROW output indicates whether borrowing was
necessary during the subtraction.
Full Subtraction
The disadvantage of a half subtractor is overcome by full subtrac-
tor.
The full subtractor is a combinational circuit with three inputs A,B
,Bin and two output D and Bout ’. A is the ’minuend’, B is ’subtra-
hend’, Bin is the ’borrow’ produced by the previous stage, D is the
difference output and Bout is the borrow output.
As shown in the figure, the first full adder has a control line directly
as its input(input carry Cin), The input A0 (The LSB of A) is directly
input in the full adder. The third input is the XOR of B0 and K. The
two outputs produced are Sum/Difference (S0) and Carry (C0).
If the value of K (Control line) is 1, the output of B0(XOR)K=B0.
Thus the operation would be A+B0. Now 2’s complement sub-
traction for two numbers A and B is given by A+B0+Cin. This sug-
gests that when K=1, the operation being performed on the four-
bit numbers is subtraction.
Similarly If the Value of K=0, B0 (XOR)K=B0. The operation is A+B
which is simple binary addition. This suggests that When K=0, the
operation is performed on the four-bit numbers in addition.
Comparators
The basic function of comparator is to compare the magnitude of two
binary quantities to determine the relationship of those quantities.
The simplest form a comparator circuit determines whether two num-
bers are equal or not.
The outcome of the comparison is specified by three binary variables that
indicate whether A > B, A = B, or A < B.
Equality
The equality of the two numbers A and B is displayed in a combinational
circuit by an output binary variable that we designate by the symbol (A=B).
This binary variable is equal to ”1” if the input numbers ,A and B, are equal,
otherwise is equal to “0” .
The equality of each pair of bits can expressed logically with an XNOR
function .
Habtamu M. Digital Logic Design March 15, 2023 17 / 50
Digital Logic Design
Common Combinational Logic Circuit
Arithmetic and logical Function
Inequality
I To determine whether A is greater or less than B, we inspect the
relative magnitudes of pairs of significant digits, starting from the
MSB position.
I If the two digits of a pair are equal, we compare the next lower sig-
nificant pair of digits.
Habtamu M. Digital Logic Design March 15, 2023 18 / 50
Digital Logic Design
Common Combinational Logic Circuit
Arithmetic and logical Function
Decoders
A decoder is a combinational circuit that converts binary informa-
tion from n input lines to a maximum of 2n unique output lines.
If the m-bit coded information has unused combinations, the de-
coder may have fewer than 2n output.
A decoder detects the presence of a specified combination of bits
(code) on its inputs and indicates the presence of that code by a
specified output level.
In its general form, a decoder has n input lines to handle n bits
and forms one to 2n output lines to indicate the presence of one
or more n-bit combinations.
The decoders presented here are called n-to-m-line decoders, where
m ≤ 2n Their purpose is to generate the 2n (or fewer) minterms of
n input variable.
Habtamu M. Digital Logic Design March 15, 2023 20 / 50
Digital Logic Design
Common Combinational Logic Circuit
Data Transmission
2-to-4 decoders
Enable Inputs
The n-to-2n decoder, apart from this, there is also a single line
connected to the decoder called enable line.
Some decoders have one or more ENABLE inputs that are used to
control the operation of the decoder.
The enable input are no logical operation, but is only responsible
for making the decoder ACTIVE or INACTIVE.
If the enable ”E” is:
I 0 , then all outputs are zero regardless of the input values.
I 1, then the decoder performs its normal operation.
Habtamu M. Digital Logic Design March 15, 2023 23 / 50
Digital Logic Design
Common Combinational Logic Circuit
Data Transmission
Decoder Expansion
It is possible to build larger decoders using two or more smaller ones.
Construct a 3-to-8 decoder using two 2-to-4 decoders with enable inputs.
Two 2-to-4 line are combined to build a 3-to-8 line decoder.
I The two LSBs (i.e. A1 and A0 ) are connected to both decoders
I MSB (A2 ) is connected to the enable input of one decoder.
I The complement of MSB (A2 ) is connected to the enable of the other
decoder.
I When A2 =0, upper decoder is enabled, while the lower is disabled.
Thus, the outputs of the upper decoder correspond to minterms D0
through D3 .
I When A2 = 1, upper decoder is disabled, while the lower is enabled.
Thus, the outputs of the lower decoder correspond to minterms D4
through D7 .
Habtamu M. Digital Logic Design March 15, 2023 24 / 50
Digital Logic Design
Common Combinational Logic Circuit
Data Transmission
BCD-to-Decimal Decoder
This type of decoder is probably the most widely used in all digital
systems because it changes the inherent binary codes used within
the system to the decimal code used by the human operators.
Four input lines represent the decimal numbers 0 through 9. This
type of decoder is often used in combination with decade coun-
ters and with decimal displays.
The BCD-to-decimal converts each BCD code into one of ten pos-
sible decimal digit indications.
Encoders
An encoder performs the inverse operation of a decoder.
It has 2n inputs, and n output lines.
Only one input can be logic 1 at any given time (active input). All
other inputs must be 0’s.
Output lines generate the binary code corresponding to the active
input.
Encoders can also be devised to encode various symbols and al-
phabetic characters.
The process of converting from familiar symbols or numbers to a
codded format is called encoding.
Priority Encoder
This is a special type of encoder. Priority is given to the input lines.
If two or more input line are 1 at the same time, then the input line
with highest priority will be considered.
For example consider octal to binary encoder, if D3 and D6 are 1
simultaneously, the output of the encoder will be 111 because all
three outputs are equal to 1. The output 111 does not represent
either binary 3 or binary 6.
To resolve this limitation, encoder circuits must establish an input
priority to ensure that only one input is encoded.
If we establish a higher priority for inputs with higher subscript
numbers, and if both D3 and D6 are 1 at the same time, the output
will be 110 because D6 has higher priority than D3 .
Habtamu M. Digital Logic Design March 15, 2023 34 / 50
Digital Logic Design
Common Combinational Logic Circuit
Data Transmission
Decimal-to-BCD Encoder
This types of encoder has ten inputs-one for each decimal digit-
and four outputs corresponding to the BCD code. This is a basic
10- to-4 line encoder.
It has 10 inputs and 4 outputs corresponding to the BCD code.
B3 =G3 ;
B2 =G2 B3 =G2 G3
L L
B1 =G1 B2 = G1 G2 G3 ;
L L L
B0 =G0 B1 = G0 G1 G2 G3
L L L L
!! !
OU
K Y
A N
T H
Habtamu M. Digital Logic Design March 15, 2023 50 / 50