Professional Documents
Culture Documents
Department of Ece Ec T45 - Digital Circuits Unit - 3
Department of Ece Ec T45 - Digital Circuits Unit - 3
DEPARTMENT OF ECE
EC T45 – DIGITAL CIRCUITS
UNIT - 3
Combinational Logic Design: Half adder - Full adder– Parallel Adder- Carry Look Ahead
Adder – BCD Adder – Magnitude Comparator – Encoders and Decoders – Multiplexers – Code
converters – Parity generator, Parity checker- Combinational circuit implementation using
multiplexers and decoders.
Programmable Logic Devices: PROM – EPROM – EEPROM- Programmable Logic Array
(PLA) – Programmable Array Logic (PAL) -Realization of combinational circuits using PROM,
PLA and PAL.
Introduction
A digital systems consists of two types of circuits namely
Combinational Logic Circuit
Sequential Logic Circuit
If any logic circuit output depends only the present input, that type of logic circuit called
as a combinational logic circuit e.g., arithmetic circuits, code converter, multiplexer,
encoder/decoder, etc.
On the other hand, if the output of the logic circuit depends not only the present input and
also on the past outputs, this type of logic circuit is called as sequential logic circuit e.g.,
counters, shift registers etc,.
44
EC T45 / DIGITAL CIRCUITS UNIT 3
Half Adder
A half-adder is an arithmetic circuit block that can be used to add two bits. Such a
circuit thus has two inputs (A and B) that represent the two bits to be added and two
outputs, with one producing the Sum output and the other producing the Carry.
The truth table shows all possible input combinations and the corresponding outputs.
The Boolean expressions for the Sum and Carry outputs are given by the equations
below.
Sum (S) = A (XOR) B = AB‟ + A‟B
Carry (C) = AB
The figure below shows the logic diagram for half circuit
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
45
EC T45 / DIGITAL CIRCUITS UNIT 3
46
EC T45 / DIGITAL CIRCUITS UNIT 3
Parallel Adder
A full binary adder performs addition of any single bit of one binary number, same
significant or same position bit of another binary numbers and carry comes from result
of addition of previous right side bits of both binary numbers.
But a single full adder cannot add more than one bits binary number instantly. This can
be done only by connecting as many full adders as the number of bits of the binary
numbers whose addition is to be performed.
This parallel combination of full adders which performs addition of specific bits binary
numbers is called binary parallel adder. For adding two 4 bit binary numbers we have to
47
EC T45 / DIGITAL CIRCUITS UNIT 3
connect 4 full adders to make 4 bit parallel adder. The inter connection of 4 full adder in
4bit parallel adder is shown below.
48
EC T45 / DIGITAL CIRCUITS UNIT 3
BCD Adder
A BCD 1-digit adder is a circuit that adds two BCD digits in parallel and also produces
the Sum digit in BCD along with the necessary correction logic.
The conventional implementation of addition as mentioned above is shown in Figure
below.
49
EC T45 / DIGITAL CIRCUITS UNIT 3
It can be seen that a 4-bit binary adder is used initially to add two BCD digits (each
digit expressed using 4 bits) with a carry-input.
An overflow detection circuit is used (to check if the „Sum‟ of the BCD digit has
exceeded 9) which is designed using two 2-input AND gates and a 3-input OR gate.
Finally, another 4-bit binary adder is used as a correction stage, which comes in the path
of final Sum computation. Thus, the critical path in this circuit consists of a 4-bit binary
adder, overflow logic and one more 4-bit binary adder.
Assuming, in the best case, that the 4-bit binary adder is a carry look-ahead adder, a
gate level analysis would indicate that it consists of 4-gates in the critical path.
It can be observed from figure above that the overflow detection circuit comes into
picture only after the topmost 4-bit binary adder performs its operation and it consists of
2 gates in the critical path.
Thus, a minimum of a 10-gate delay can be expected in conventional implementation.
The above design can however be optimized by removing those gates that are
completely redundant in their operation.
Such a modification is shown in Figure below which results in a smaller critical path.
Magnitude Comparator
A magnitude digital Comparator is a combinational circuit that compares two digital
or binary numbers in order to find out whether one binary number is equal, less than
or greater than the other binary number.
We logically design a circuit for which we will have two inputs one for A and other for
B and have three output terminals,
one for A > B condition,
one for A = B condition and
one for A < B condition.
51
0 0 0 1 0
0 1 1 0 0
1 0 0 0 1
1 1 0 1 0
52
53
EC T45 / DIGITAL CIRCUITS UNIT 3
The truth table for a 2-bit comparator is given below.
54
EC T45 / DIGITAL CIRCUITS UNIT 3
Decoder
The process of taking some type of code and determining what it represents in terms of
a recognizable number or character is called decoding.
A decoder is a combinational logic circuit that performs the decoding function, and
produce an output that indicates the (meaning) of the input code.
The decoder is an important part of the system which selects the cells to be read from
and write into.
This particular circuit is called a decoder matrix, or simply a decoder, and has a
characteristic that for each of the possible 2n binary input number which can be taken
by the n input cells, the matrix will have a unique one of its 2n output lines selected.
55
EC T45 / DIGITAL CIRCUITS UNIT 3
The decoder is called n to m where m < 2n for example two to four line decoder, figure
shows a two to four line decoder and its truth table.
X2 X1 W0 W1 W2 W3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Encoder
An encoder is a combinational logic circuit that generate n output lines from 2n (or less)
inputs. It has the reverse function of the decoder.
56
EC T45 / DIGITAL CIRCUITS UNIT 3
An encoder accepts digit on its inputs, such as a decimal or octal digit, and converts it to
a coded output, such as a binary or BCD. Encoder can also be devised to encode various
symbol and alphabetic characters.
This process of converting from familiar symbols or numbers to a coded format is
called encoding. Figure below shown a four to two line encoder and its truth table.
A3 A2 A1 A0 F1 F0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
Multiplexers
Multiplex means “Many into One”. A multiplexer is a combinational
circuit with many inputs but only one output. By applying control signals,
we can steer any input to the output.
It has 2n input lines and n selection lines, Multiplexer are called as data
selector or because the output bit depends on the input data bit that is
selected.
57
Truth Table
Logic Diagram
Applications of Multiplexer:
They are used as a data selector to select “one to many” data inputs.
They can be used to implement combinational circuit
They are used in time multiplexing systems.
They are used in frequency multiplexing systems.
They are used in A/D and D/A convertor.
58
EC T45 / DIGITAL CIRCUITS UNIT 3
Demultiplexer
Demultiplexer means “one into many”. A demultiplexer is a combinational
logic circuit with “one input and many outputs”. It is also called as data
distributor or serial-to-parallel converter.
Logic Symbol
Truth Table
Enable S1 S0 Din Y0 Y1 Y2 Y3
0 X X X 0 0 0 0
1 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0
1 0 1 0 0 0 0 0
1 0 1 1 0 1 0 0
1 1 0 0 0 0 0 0
1 1 0 1 0 0 1 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 1
59
EC T45 / DIGITAL CIRCUITS UNIT 3
Logic Diagram
Applications of Multiplexer:
It can be used as a decoder.
It can be used as a data distributer.
It is used in time division multiplexing at the receiving end as a data separator.
It can be used to implement Boolean expressions.
Code Converters
A code converter is a logic circuit that changes data presented in one type of binary
code to another type of binary code. The following are some of most commonly used
code converters.
Binary to Gray Code
Gray to Binary code
BCD to Excess – 3 Codes
Excess – 3 to BCD code
60
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0
G3 = B3
61
EC T45 / DIGITAL CIRCUITS UNIT 3
G2 = B3 XOR B2
G1 = B1 XOR B2
G0 = B1 XOR B0
62
EC T45 / DIGITAL CIRCUITS UNIT 3
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0
0 0 1 0 0 0 1 1
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
0 1 0 1 0 1 1 0
0 1 0 0 0 1 1 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 1 1 0 1 0
1 1 1 0 1 0 1 1
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 0 0 1 1 1 1 0
1 0 0 0 1 1 1 1
63
EC T45 / DIGITAL CIRCUITS UNIT 3
64
EC T45 / DIGITAL CIRCUITS UNIT 3
67
Excess – 3 to BCD code
The truth table, K – map, and logic diagram for Excess – 3 to BCD code is given below.
E3 E2 E1 E0 B3 B2 B1 B0
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 1
1 0 0 1 0 1 1 0
1 0 1 0 0 1 1 1
1 0 1 1 1 0 0 0
1 1 0 0 1 0 0 1
EC T45 / DIGITAL CIRCUITS UNIT 3
68
EC T45 / DIGITAL CIRCUITS UNIT 3
X Y Z P
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
69
EC T45 / DIGITAL CIRCUITS UNIT 3
X Y Z P C
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0
70
EC T45 / DIGITAL CIRCUITS UNIT 3
If the bottom minterm is circled and top is not circled, apply A to the corresponding
multiplexer input.
If the top minterm is circled and bottom is not circled, apply A‟ to the
corresponding multiplexer input.
4. Draw the multiplexer implementation diagram.
Example: Implement the following function using a multiplexer.
F (A, B, C) = ∑(1, 3, 5, 6)
Solution
Variables, n = 3 (A, B, C)
Selection lines = n -1 = 2 (S0, S1)
2n to 1 MUX (i.e) 22 to 1 MUX = 4 to 1 MUX
Input lines = 2n – 1 = 22 = 4 (I0, I1, I2, I3)
Implementation Table
I0 I1 I2 I3
A’ 1 3
0 2
A 5 6
4 7
0 1 A A‟
I0= 0, I1=1 I2 = A I3 = A‟
Multiplexer Implementation
71
EC T45 / DIGITAL CIRCUITS UNIT 3
Multiplexer Implementation
72
EC T45 / DIGITAL CIRCUITS UNIT 3
73
EC T45 / DIGITAL CIRCUITS UNIT 3
74
EC T45 / DIGITAL CIRCUITS UNIT 3
75
EC T45 / DIGITAL CIRCUITS UNIT 3
It has diodes in every bit position; therefore, the output is initially all 0s.
Each diode however has a fusible link in series with it.
The fuse uses material like nichrome and polycrystalline. For blowing the
fuse it is necessary to pass around 20 to 50 mA of current for period 5 to
20ps.
The PROM programmer selectively burns the fuses according to the bit
pattern to be stored. This process is also known as burning of PROM.
The PROMs are one time programmable. Once programmed, the information
stored is permanent.
76
EC T45 / DIGITAL CIRCUITS UNIT 3
77
EC T45 / DIGITAL CIRCUITS UNIT 3
78
EC T45 / DIGITAL CIRCUITS UNIT 3
79
EC T45 / DIGITAL CIRCUITS UNIT 3
The third set of fuses in the output inverters allows the output function to be
generated either in the AND-OR form or in the AND-OR-INVERT form.
When inverter is bypassed by link we get AND-OR implementation. To get
AND-OR-INVERTER implementationinverter link has to be
disconnected.
Input Buffer
Input buffers are provided in the PLA to limit loading of the sources that
drive the inputs. They also provide inverted and non-inverted form of inputs
at its output.
Output Buffer
The driving capacity of PLA is increased by providing buffers at the output.
They are usually TTL compatible.
The tri-state, TTL compatible output buffer. The output buffer may provide
totem-pole, open collector or tri-state output.
80
EC T45 / DIGITAL CIRCUITS UNIT 3
Truth table
K-Map Simplification
BC - 1 1 1 -
A 1 0 - - 1
82
EC T45 / DIGITAL CIRCUITS UNIT 3
83
EC T45 / DIGITAL CIRCUITS UNIT 3
84