Chapter 4
Chapter 4
1
4-2. Analysis procedure
To obtain the output Boolean functions from a
logic diagram, proceed as follows:
1. Label all gate outputs that are a function of input
variables with arbitrary symbols. Determine the Boolean
functions for each gate output.
2
4-2. Analysis procedure
3. Repeat the process outlined in step 2 until the outputs of
the circuit are obtained.
3
Example
F2 = AB + AC + BC; T1 = A + B + C; T2 = ABC; T3 = F2’T1;
F1 = T3 + T2
F1 = T3 + T2 = F2’T1 + ABC = A’BC’ + A’B’C + AB’C’ + ABC
4
Derive truth table from logic
diagram
We can derive the truth table in Table 4-1 by using
the circuit of Fig.4-2.
5
4-4. Adder-Half Adder
A combinational circuit that performs the addition of two
bits is called a half adder.
The truth table for the half adder is listed below:
S: Sum
C: Carry
S = x’y + xy’
C = xy
6
Implementation of Half-Adder
7
Full-Adder
One that performs the addition of three bits(two
significant bits and a previous carry) is a full adder.
8
Simplified Expressions
10
Another implementation
Full-adder can also implemented with two half
adders and one OR gate (Carry Look-Ahead adder).
S = z ⊕ (x ⊕ y)
= z’(xy’ + x’y) + z(xy’ + x’y)’
= xy’z’ + x’yz’ + xyz + x’y’z
C = z(xy’ + x’y) + xy = xy’z + x’yz + xy
11
Binary adder
This is also called
Ripple Carry
Adder ,because of
the construction
with full adders are
connected in
cascade.
12
Carry Propagation
Fig.4-9 causes a unstable factor on carry bit, and produces
a longest propagation delay.
The signal from Ci to the output carry Ci+1, propagates
through an AND and OR gates, so, for an n-bit RCA, there
are 2n gate levels for the carry to propagate from input to
output.
13
Carry Propagation
Because the propagation delay will affect the output signals
on different time, so the signals are given enough time to
get the precise and stable outputs.
The most widely used technique employs the principle of
carry look-ahead to improve the speed of the algorithm.
14
Boolean functions
Pi = Ai ⊕ Bi steady state value
Gi = AiBisteady state value
Output sum and carry
Si = Pi ⊕ Ci
Ci+1 = Gi + PiCi
Gi : carry generate Pi : carry propagate
C0 = input carry
C1 = G0 + P0C0
C2 = G1 + P1C1 = G1 + P1G0 + P1P0C0
C3 = G2 + P2C2 = G2 + P2G1 + P2P1G0 + P2P1P0C0
16
Binary subtractor
M = 1subtractor ; M = 0adder
17
Overflow
It is worth noting Fig.4-13 that binary numbers in the
signed-complement system are added and subtracted by the
same basic addition and subtraction rules as unsigned
numbers.
Overflow is a problem in digital computers because the
number of bits that hold the number is finite and a result
that contains n+1 bits cannot be accommodated.
18
Overflow on signed and unsigned
When two unsigned numbers are added, an overflow is
detected from the end carry out of the MSB position.
When two signed numbers are added, the sign bit is treated
as part of the number and the end carry does not indicate
an overflow.
An overflow cann’t occur after an addition if one number is
positive and the other is negative.
An overflow may occur if the two numbers added are both
positive or both negative.
19
4-5 Decimal adder
BCD adder can’t exceed 9 on each input digit. K is the carry.
20
Implementation of BCD adder
A decimal parallel
adder that adds n
decimal digits needs
n BCD adder stages.
The output carry
from one stage
If =1
must be connected
to the input carry of
0110
the next higher-
order stage.
21
4-6. Binary multiplier
Usually there are more bits in the partial products and it is necessary to
use full adders to produce the sum of the partial products.
And
22
4-bit by 3-bit binary multiplier
For J multiplier bits and K
multiplicand bits we need
(J X K) AND gates and (J −
1) K-bit adders to produce
a product of J+K bits.
K=4 and J=3, we need 12
AND gates and two 4-bit
adders.
23
4-8. Decoders
The decoder is called n-to-m-line decoder, where
m≤2n .
the decoder is also used in conjunction with other
code converters such as a BCD-to-seven_segment
decoder.
3-to-8 line decoder: For each possible input
combination, there are seven outputs that are
equal to 0 and only one that is equal to 1.
24
Implementation and truth table
25
Decoder with enable input
Some decoders are constructed with NAND gates, it becomes
more economical to generate the decoder minterms in their
complemented form.
As indicated by the truth table , only one output can be equal
to 0 at any given time, all other outputs are equal to 1.
26
Demultiplexer
A decoder with an enable input is referred to as a
decoder/demultiplexer.
The truth table of demultiplexer is the same with
decoder. A B
D0
Demultiplexer D1
E
D2
D3
27
3-to-8 decoder with enable
implement the 4-to-16 decoder
28
Implementation of a Full Adder
with a Decoder
From table 4-4, we obtain the functions for the combinational circuit in
sum of minterms:
S(x, y, z) = ∑(1, 2, 4, 7)
C(x, y, z) = ∑(3, 5, 6, 7)
29
BCD To 7-Segment Decoder
30
BCD To 7-Segment Decoder
Step 1: Construct Truth Table
31
Step 2:
From the above truth table, the Boolean
b = F2 (A, B, C, D) = ∑m (0, 1, 2, 3, 4, 7, 8, 9)
c = F3 (A, B, C, D) = ∑m (0, 1, 3, 4, 5, 6, 7, 8,
9)
32
d = F4 (A, B, C, D) = ∑m (0, 2, 3, 5, 6, 8)
e = F5 (A, B, C, D) = ∑m (0, 2, 6, 8)
f = F6 (A, B, C, D) = ∑m (0, 4, 5, 6, 8, 9)
g = F7 (A, B, C, D) = ∑m (2, 3, 4, 5, 6, 8, 9)
33
Step 3:
The third step involves constructing the
34
35
36
37
Step 4: The final step involves drawing a
combinational logic circuit for each output
signal. Once the task was accomplished, a
combinational logic circuit can be drawn
using 4 inputs (A,B,C,D)and a 7- segment
display (a,b,c,d,e,f,g) as output.
38
39
4-9. Encoders
An encoder is the inverse operation of a decoder.
We can derive the Boolean functions by table 4-7
z = D 1 + D3 + D5 + D7
y = D2 + D3 + D6 + D7
x = D4 + D5 + D6 + D7
40
Priority encoder
If two inputs are active simultaneously, the output produces
an undefined combination. We can establish an input
priority to ensure that only one input is encoded.
Another ambiguity in the octal-to-binary encoder is that an
output with all 0’s is generated when all the inputs are 0;
the output is the same as when D0 is equal to 1.
The discrepancy tables on Table 4-7 and Table 4-8 can
resolve aforesaid condition by providing one more output to
indicate that at least one input is equal to 1.
41
Priority encoder
V=0no valid inputs
V=1valid inputs
42
4-input priority encoder
0
Implementation of 0
table 4-8 0
0
x = D2 + D3
y = D3 + D1D’2
V = D0 + D1 + D2 + D3
43
Multiplexers
S = 0, Y = I0 Truth Table S Y Y = S’I0 + SI1
S = 1, Y = I1 0 I0
1 I1
44
4-to-1 Line Multiplexer
45