Professional Documents
Culture Documents
Comparators
Objective
Design a combination logic circuit that compares two
binary numbers and determine the relationship of them.
6.1 Theory
A comparator is a combinational circuit that
compares the magnitude of two binary numbers, A and
B, and generates outputs to indicate whether the two
numbers are equal or which input is greater than the
other. Therefore, the circuit has three outputs to
indicate whether (A=B), (A>B) or (A<B). At any given
input quantities, only one output should be equal to
logic 1. Fig (6-1) illustrates the block diagram of the
comparator.
A0
A1
A>B
A=B
B0
A<B
B1
A1 A2 A3 A4 (X<5)
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 0
0 1 1 1 0
1 x x x 0
Decoders
Object:
To examine the decoders operation and the concept of
code conversion will be explained.
6.2 Decoder
A decoder is a combinational circuit that converts
binary information from n input lines to exactly one
output of a maximum of 2n output lines. If n=3 the
output = 23 = 8. The output line whose value is equal
to 1 represents the binary number of presently
available in the input lines. An example is a BCD
(binary coded decimal) to decimal decoder.
Example 6.4:
Design 3-to-8 line decoder circuit?
Solution
This decoder has three inputs and eight outputs, each
of the output representing one of the minterms of the
3-input variables. The truth table of 3-8 decoder is
shown in table (6-1). The outputs of 3-to-8 decoder
are:
Solution
At the first step, the function expresses in sum of
minterm form. So,
F(X,Y,Z) = (X Y).Z + XYZ
F(X,Y,Z) = (XY + XY )Z = XYZ + XYZ + XYZ
F(X,Y,Z) = m3 + m5 + m2
F(X,Y,Z) = (2, 3, 5).
Since there are three input variables, 3-to-8 decoder
will be used to implement this circuit. The
implementation is shown in fig (6-6).
3,6,7)
Solution
At first step, the functions express in a sum of minterm
form.
3,6,7)
=∑(6,7)
Since there are three inputs, 3-to-8 decoder and three
OR gates will used, as showing in the following figure.
6.4 Encoder
An encoder performs a function that is the opposite of
decoding. The encoder circuit has 2n (or less) input
lines and n output lines. The output lines generate the
binary code for the 2n input variables. An example of
encoder is an octal to binary encoder (8 to 3 encoder).
The truth table and the logic circuit of 8-to-3 encoder
are shown in table (6-3) and fig (6-8), respectively
Discussion:
1. Construct a binary to BCD code converter? Write the
truth table of step 1?
2. Design a full adder using a decoder with two or
gates?
3. Implement the following function using a decoder
with three OR gates?
F1(A,B) = X+Y
F2(A,B) = (0,2)
F3(A,B) = Π (0,1)
4. Design 3-to-2 priority encoder?
Fig (6-10)
Fig (6-11)
Fig (6-13)
Multiplexer
Object:
To examine the multiplexer and the demultiplexer and
to explain the concept of the parity generator / checker.
6.6 Theory:
The Multiplexing means transmitting a large numbers
of information over a small number of channels or
lines. A digital multiplexer (MUX) is a combinational
circuit that selects one line of binary information from
many input lines and directs it to a single output line.
The selection of a particular input line is controlled by
a set of selection, control, lines. A MUX with n
selection lines can selected from a maximum of 2n
input lines, as shown in fig (6-14).
Standard MSI package are available as a MUX.
Fig (6-17)
6.7 Demultiplexer
A demultiplexer (DEMUX) is a combinational circuit
that selects binary information from one of many input
lines and transmits this information on one of 2 n
possible output lines. The selection of a specific output
line is controlled by the bit values of n selection lines
at any given time. The decoder with enable (E) input,
fig (6-18-a), can function as a demultiplexer. If the E
line is taken as a data input line and the input lines of
Objective
Understand the structure and size of the ROM.
6.8 Theory
Memories are used for storing binary data. This stored
data can be interpreted as being the implementation of
a combinational circuit. A combinational circuit
expressed as a Boolean function in canonical form that
is implemented in the memory by storing data bits in
appropriate memory locations. Any types of memory
such as ROM (read-only memory), RAM (random
access memory), PROM (programmable ROM),
EPROM (erasable PROM), EEPROM (electrically
erasable PROM), and so on, can be used to implement
combinational circuits.
A block diagram of a ROM is shown in fig (6-20). It
consists of n input lines and m output lines.
place. For F1, the minterm that specify the output 0 will
broken, while the minterm 1 and 3 if F2 will broken.
The implementation is shown in fig (6-23).
Fig (6-24)
Solution
At the first, we derive the truth table for this circuit. It
has 3 inputs and 6 outputs.
Input Output
A2 A1 A0 B5 B4 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1
0 1 0 0 0 0 1 0 0
0 1 1 0 0 1 0 0 1
1 0 0 0 1 0 0 0 0
1 0 1 0 1 1 0 0 1
1 1 0 1 0 0 1 0 0
1 1 1 1 1 0 0 0 1
Fig (6-25)
6.10 Theory
Using ROM to implement a combinational circuit is
very wasteful because usually many locations in the
ROM are not used, don’t care condition. Each storage
location in a ROM represents a minterm. In practice,
only a small number of these minterms are the 1-
minterms for the function being implemented. So, the
ROM implementing the function is usually quite
empty
A B C F1 F2
0 0 0 1 1
0 0 1 1 1
0 1 0 0 0
F1(A,B,C)=∑(0,1,4,5,7)
0 1 1 0 0
1 0 0 1 1 F2(A,B,C)=∑(0,1,4)
1 0 1 1 0
1 1 0 0 0
1 1 1 1 0
Solution:
From truth table, the circuit has three inputs, three product
terms and two outputs
First, F1 and F2 are simplified using karnaugh map