Title: Computer Architecture I: Digital Design
1Computer Architecture I Digital Design Dr.
Robert D. Kent
Logic Design Medium Scale Integration
and Programmable Logic Devices Part II
2Review
- At the outset of designing a complex system, such
as a modern computer or network, it is clear that
design is extraordinarily difficult and
computationally challenging when performed at the
level of fundamental Boolean logic gates. - For these reasons modern design approaches are
based on hierarchical, component based methods. - Leading to simplified, localized component
design, - lowering of design costs,
- shifting some aspects of design to the component
interface (the compatibility problem). - We now continue our study of MSI circuits to
better understand this process of MSI design.
3Goals
- We continue our study of simple, but functional
Combinational circuits - we continue constructing a small library of
useful components - through study of the solution process using
Boolean algebra and Boolean calculus
(simplification, etc.) we better understand the
meaning of SSI design - we seek to identify these components for their
re-use potential - through our study we will better understand how
MSI increases the level of abstraction in solving
problems - SSI design is relatively concrete.
4Circuit 4 Binary Subtractor
5Circuit 4 Binary Subtractor
- Before proceeding to design a subtractor circuit,
consider a few examples of the operation D X -
Y - Example 1
- Example 1
- X 0 0 1 1
- Y 0 0 0 1
-
- D 0 0 1 0
Considered easy because 1-1 0 is easy 1-0
1 is easy 0-0 0 is easy But .....
6Circuit 4 Binary Subtractor
- Example 2
- This is not straightforward it requires the
concept of borrowing from the column on the
left. - Use a trick add zero! Introduce a borrow
constant, B. For an L-bit representation, B 2L.
- Example 2
- B 1 0 0 0 0
- X 0 0 1 1
- Y 0 1 0 1
-
- D 1 1 1 0
This is not a mathematical zero. Rather, it is a
practical zero since we only use the low-order 4
bits.
7Circuit 4 Binary Subtractor
- Example 2
- This is not straightforward it requires the
concept of borrowing from the column on the
left. - Use a trick add zero! Introduce a borrow
constant, B. For an L-bit representation, B 2L.
- Example 2
- B 1 0 0 0 0
- X 0 0 1 1
- Y 0 1 0 1
-
- D 1 1 1 0
Instead of XK YK, we have recast this in the
form BK XK YK. NOTE By borrowing from
the left, each successive borrow digit becomes a
1 until the column which forces the first borrow.
This specific borrow digit has the value 2
(binary 10).
B 0 1 2 0 0
8Circuit 4 Binary Subtractor
- Example 2
- This is not straightforward it requires the
concept of borrowing from the column on the
left. - Use a trick add zero! Introduce a borrow
constant, B. For an L-bit representation, B 2L.
Now we note that we have already borrowed from
this column (in the next-to-right column). But
we also had to borrow from the next-to-left
column. Hence, we borrow a 2 from the left,
then borrow 1 from this 2 to the right, the
net result is to add 1 to the current column.
The rest of the subtraction (2-10-0)1 is easy.
- Example 2
- B 1 0 0 0 0
- X 0 0 1 1
- Y 0 1 0 1
-
- D 1 1 1 0
B 0 1 2 0 0
9Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1
10Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0
11Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0
12Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 0
13Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 0
14Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 1
2
15Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1
16Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1
2
17Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1
18Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1
2
19Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0
20Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
0 1 0 0
21Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
0 1 0 0 1 1 0 0 0
22Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
0 1 0 0 1 1 0 0 0 1 1 1
1 1
2
23Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
0 1 0 0 1 1 0 0 0 1 1 1
1 1 - The circuit expressions for the outputs are
derived
24Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
0 1 0 0 1 1 0 0 0 1 1 1
1 1 - The circuit expressions for the outputs are
derived DK XKYKBK XKYKBK XKYKBK
XKYKBK
25Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 0 1 1 0
1 1 0 0 1 0 1 0
1 0 0 1 1 0 0 0 1 1 1 1
1 - The circuit expressions for the outputs are
derived DK XKYKBK XKYKBK XKYKBK
XKYKBK BK xor XK xor YK
26Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 DK BK xor XK
xor YK 0 1 1 0 1 1 0
0 1 0 1 0 1 0 0 1 1 0
0 0 1 1 1 1 1 - The circuit expressions for the outputs are
derived
27Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 DK BK xor XK
xor YK 0 1 1 0 1 1 0
0 1 0 1 0 1 0 0 1 1 0
0 0 1 1 1 1 1 - The circuit expressions for the outputs are
derivedBK1 XKYKBK XKYKBK XKYKBK
XKYKBK
28Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 DK BK xor XK
xor YK 0 1 1 0 1 1 0
0 1 0 1 0 1 0 0 1 1 0
0 0 1 1 1 1 1 - The circuit expressions for the outputs are
derivedBK1 XKYKBK XKYKBK XKYKBK
XKYKBK XKYK(BK BK) XK(YK YK)BK
(XK XK)YKBK
29Circuit 4 Binary Subtractor
- We begin the design by constructing a
3-input/2-output truth tableXK YK BK DK
BK1 0 0 0 0 0 0 0 1 1 10
1 0 1 1 DK BK xor XK
xor YK 0 1 1 0 1 1 0
0 1 0 1 0 1 0 0
BK1 XKYK XKBK YKBK 1 1 0 0 0
1 1 1 1 1 - The circuit expressions for the outputs are
derivedBK1 XKYKBK XKYKBK XKYKBK
XKYKBK XKYK(BK BK) XK(YK YK)BK
(XK XK)YKBK
30Circuit 4 Binary Subtractor
- This leads to the expressions DK BK xor XK
xor YK BK1 XKYK XKBK YKBK - These have the logic gate realizations
31Circuit 4 Binary Subtractor
- This leads to the expressions DK BK xor XK
xor YK BK1 XKYK XKBK YKBK - These have the logic gate realizations
32Circuit 4 Binary Subtractor
- This leads to the expressions DK BK xor XK
xor YK BK1 XKYK XKBK YKBK - These have the logic gate realizations
33Circuit 4 Binary Subtractor
- We can now employ the 1-bit Full Subtractor to
construct a multi-bit subtractor - we use a FS with B0 0 for the first bit.
- this can be replaced with a specialized
Half-Subtractor circuit.
34Circuit 4 Binary Subtractor
- We can now employ the 1-bit Full Subtractor to
construct a multi-bit subtractor - we use a FS with B0 0 for the first bit. (This
can be replaced with a specialized
Half-Subtractor circuit).
35Circuit 4 Binary Subtractor
- We can now employ the 1-bit Full Subtractor to
construct a multi-bit subtractor - we use a FS with B0 0 for the first bit. This
can be replaced with a specialized
Half-Subtractor circuit.
36Circuit 4 Binary Subtractor
- Note that the Full Adder and Full Subtractor are
identical, except for a single inverter applied
to the first input (A or X)
37Circuit 4 Binary Subtractor
- There are alternative methods to performing
subtraction, based on 1s and 2s complement
representations.
38Circuit 4 Binary Subtractor
- There are alternative methods to performing
subtraction, based on 1s and 2s complement
representations. - Since (X - Y) is the same as (XY1) using 2s
complement arithmetic, we can use the adder to
perform subtraction by adding inverters to the Y
inputs and setting the input carry bit to 1.
39Circuit 4 Binary Subtractor
- There are alternative methods to performing
subtraction, based on 1s and 2s complement
representations. - Since (X - Y) is the same as (XY1) using 2s
complement arithmetic, we can use the adder to
perform subtraction by adding inverters to the Y
inputs and setting the input carry bit to 1.
40Circuit 5 Binary Adder/Subtractor
41Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gate
42Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A
43Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1
44Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1A xor 0 A
45Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1A xor 0 A Proof 0 xor
0 0 1 xor 0 1
46Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1A xor 0 A Proof 0 xor
0 0 1 xor 0 1 - These properties of the xor gate allow us to
construct a circuit that can perform either
addition or subtraction
47Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1A xor 0 A Proof 0 xor
0 0 1 xor 0 1 - These properties of the xor gate allow us to
construct a circuit that can perform either
addition or subtraction
48Circuit 5 Binary Adder/Subtractor
- Finally, we note the following facts about the
xor gateA xor 1 A Proof 0 xor 1 1 0
1 xor 1 0 1A xor 0 A Proof 0 xor
0 0 1 xor 0 1 - These properties of the xor gate allow us to
construct a circuit that can perform either
addition or subtraction
The input carry bit is used as a toggle to
control the choice of addition or subtraction.
/- /- /- /-
49Circuit 5 Binary Adder/Subtractor
- Now that it has been demonstrated that
subtraction can be carried out using addition
circuits, we may henceforth treat only addition
cases, without any loss of generality.
/- /- /- /-
50Circuit 6 Carry Lookahead Adder
51Circuit 6 Carry Lookahead Adder
- The representation of the Carry-out circuit for
the full adder is CK1 XK YK CK XK CK YK
XK YK CK (XK YK)
52Circuit 6 Carry Lookahead Adder
- The representation of the Carry-out circuit for
the full adder is CK1 XK YK CK XK CK YK
XK YK CK (XK YK) - Define terms gK XK YK and, pK (XK
YK) - We may now write CK1 gK CK pK
53Circuit 6 Carry Lookahead Adder
- The representation of the Carry-out circuit for
the full adder is CK1 XK YK CK XK CK YK
XK YK CK (XK YK) - Define terms gK XK YK and, pK (XK
YK) - We may now write CK1 gK CK pK
- Also, recall that the sum bit is generated using
the expression SK CK xor AK xor BK
54Circuit 6 Carry Lookahead Adder
- Using the expressions CK1 gK CK pK SK
CK xor AK xor BK We define the Sigma-block
circuit
55Circuit 6 Carry Lookahead Adder
- Using the expressions CK1 gK CK pK SK
CK xor AK xor BK We define the Sigma-block
circuit - This may be abbreviated as the MSI component
56Circuit 6 Carry Lookahead Adder
- Using the expressions CK1 gK CK pK SK
CK r AK r BK We define the Sigma-block
circuit - This may be abbreviated as the MSI component
Note that both P and G only require evaluation of
one logic gate.
SIG
57Circuit 6 Carry Lookahead Adder
- These results suggest that the previous
ripple-adder circuit may be replaced by the
following circuit, using Sigma-blocks
SIG
SIG
SIG
SIG
58Circuit 6 Carry Lookahead Adder
- Expanding the carry terms for a 4-bit adder
C1 g0 C0 p0 C2 g1 C1 p1 g1
(g0 C0 p0 )p1 g1 g0 p1 C0 p0 p1 C3
g2 C2 p2 g2 g1 p2 g0 p1 p2 C0 p0
p1 p2 C4 g3 C3 p3 g3 g2 p3 g1
p2 p3 g0 p1 p2 p3 C0 p0 p1 p2 p3
59Circuit 6 Carry Lookahead Adder
- Expanding the carry terms for a 4-bit adder
Note that all the carry expressions require only
two evaluation stages (one for the and, the other
for the or).
C1 g0 C0 p0 C2 g1 C1 p1 g1
(g0 C0 p0 )p1 g1 g0 p1 C0 p0 p1 C3
g2 C2 p2 g2 g1 p2 g0 p1 p2 C0 p0
p1 p2 C4 g3 C3 p3 g3 g2 p3 g1
p2 p3 g0 p1 p2 p3 C0 p0 p1 p2 p3
60Circuit 6 Carry Lookahead Adder
- These results can now be used to complete the
Carry lookahead network portion of the 4-bit
adder
C0
Carry lookahead network
C4
SIG
SIG
SIG
SIG
61Circuit 6 Carry Lookahead Adder
- These results can now be used to complete the
Carry lookahead network portion of the 4-bit
adder
62Circuit 6 Carry Lookahead Adder
Now it is clear that evaluation of each carry
requires, at most, 3 logic gates. Thus, each sum
digit requires at most 4 logic gates.
- These results can now be used to complete the
Carry lookahead network portion of the 4-bit
adder
63Circuit 6 Carry Lookahead Adder
- This brings us back to the basic, 4-bit MSI
Adder/Subtractor, which may now be assumed to be
optimized with carry lookahead circuits. - These may be used, in turn, to develop more
powerful multi-bit adder/subtractors.
64Circuit 7 Decimal Adder
65Circuit 7 Decimal Adder
- There are many situations where it is useful to
employ decimal arithmetic on decimal
representations (e.g. BCD 8421). - BCD 0 1 2 7
8 9 0000, 0001, 0010, , 0111,
1000, 1001
Remind yourself that BCD uses a 4-bit
representation to store the values of digits
0..9, but this leaves wastage of some bit
patterns (unused patterns).
66Circuit 7 Decimal Adder
- There are many situations where it is useful to
employ decimal arithmetic on decimal
representations (e.g. BCD 8421). - BCD 0 1 2 7
8 9 0000, 0001, 0010, , 0111,
1000, 1001 - To illustrate some of the issues we consider one
example of decimal addition of single digits,
leading to a full decimal adder. - This design will be based on the use of the
binary adder.
67Circuit 7 Decimal Adder
- Note that the problem of adding two decimal
digits together, in general, also requires
accounting for an input carry and an output
carry.Minimum Sum Maximum Sum 0 (No
carry) 1 (Carry) 0 9
0 9 0 19(No Carry
out) DECIMAL ARITHMETIC (Carry out) - Note also that the maximum number of distinct
sums is 20.
68Circuit 7 Decimal Adder
Consider the example Carry 1110 999
99 Sum 1998
- Note that the problem of adding two decimal
digits together, in general, also requires
accounting for an input carry and an output
carry.Minimum Sum Maximum Sum 0 (No
carry) 1 (Carry) 0 9
0 9 0 19 DECIMAL
ARITHMETIC (Carry out) - Note that the maximum number of distinct sums is
20.
69Circuit 7 Decimal Adder
- We can obtain the sumsin two stages.
70Circuit 7 Decimal Adder
Direct sum of decimal digits,ranging from 0 to
1910, represented in 5-bit form with high-order
bit K.
- We can obtain the sumsin two stages.
- First, list all possible outputs from the direct
sum of the decimaldigits, then ..
71Circuit 7 Decimal Adder
- We can obtain the sumsin two stages.
- First, list all possible outputs from the direct
sum of the decimaldigits, then .. - Beside each sum placethe expected values ofthe
sum bits and thecarry out bit.
Expected outputs, with sum bits SJ and carry-out
bit C.
72Circuit 7 Decimal Adder
- The first-stage sumsdivide into two groups
- the first ten sumsproduce the correctfinal sum
and carrybit patterns
73Circuit 7 Decimal Adder
- The first-stage sumsdivide into two groups
- the first ten sumsproduce the correctfinal sum
and carrybit patterns - the last ten sumsare all incorrect bythe same
amount,they should have 6 added to them to
produce the correctfinal bit patterns.
74Circuit 7 Decimal Adder
- The first-stage sumsdivide into two groups
- the first ten sumsproduce the correctfinal sum
and carrybit patterns - the last ten sumsare all incorrect bythe same
amount,they should have 6 added to them to
produce the correctfinal bit patterns.
6
6
75Circuit 7 Decimal Adder
- The condition used to identify and control the
correction process isexpressed in terms of the
carry-out bit, CC K P3 P2 P3 P1
76Circuit 7 Decimal Adder
- The condition used to identify and control the
correction process isexpressed in terms of the
carry-out bit, CC K P3 P2 P3 P1 - Thus, if C 0 then nocorrection is applied.
77Circuit 7 Decimal Adder
- The condition used to identify and control the
correction process isexpressed in terms of the
carry-out bit, CC K P3 P2 P3 P1 - Thus, if C 0 then nocorrection is applied.
- If C 1, then 6 is addeddirectly to the initial
sumbits PJ .
This is referred to as the Excess-64 technique
for BCD addition.
6
6
78Circuit 7 Decimal Adder
- The condition used to identify and control the
correction process isexpressed in terms of the
carry-out bit, CC K P3 P2 P3 P1 - A decimal full-adder circuit follows usinga
two-stage 4-bit binaryadder MSI circuit and - Uses the carry bit valuedirectly to generate
thevalue 610, or 01102.
79Circuit 7 Decimal Adder
- This MSI circuit is used to form the basis for a
multi-decade decimal adder.
80Time out for some Design Philosophy!
81Time out for some Philosophy!
- In software design and construction the
programmer/analyst becomes familiar with
identifying different aspects of the problem in
terms of abstract models. - Some of these models are quite concrete
(bottom-up design) while others are relatively
more abstract and require gradual expression of
their detail (top-down design).
82Time out for some Philosophy!
- Increasingly, modern Software Design is expressed
in terms of components (functions,
classes/objects, templates, metaprogramming) and
focuses on software component re-use. - One critical problem of software re-use lies in
the proper, robust, flexible and standards-based
design of the component interfaces. - Other issues arise in the contexts of software
complexity, performance, cost and other factors.
83Time out for some Philosophy!
- Differential layering of abstraction in design
also has its place in hardware design.SSI
Boolean algebra / Simplification / Logic gates
MSI Interconnection networks / Iterative
re-use / Components - These differences have been demonstrated in each
of the circuits/components that we have
considered so far.
84Time out for some Philosophy!
- Differential layering of abstraction in design
also has its place in hardware design.SSI
Boolean algebra / Simplification / Logic gates
MSI Interconnection networks / Iterative
re-use / Components - These differences have been demonstrated in each
of the circuits/components that we have
considered so far.
85Circuit 8 Comparator
86Circuit 8 Comparator
- The comparison of two (binary) numbers is of
considerable importance. - if ( A lt B ) then
- while ( A gt B ) do ...
87Circuit 8 Comparator
- The comparison of two (binary) numbers is of
considerable importance. - if ( A lt B ) then
- while ( A gt B ) do ...
- It is possible to design a comparator circuit
that establishes whether two input binary
strings, A and B, satisfy the conditions
A B A gt B A lt
B
88Circuit 8 Comparator
- The comparison of two (binary) numbers is of
considerable importance. - if ( A lt B ) then
- while ( A gt B ) do ...
- It is possible to design a comparator circuit
that establishes whether two input binary
strings, A and B, satisfy the conditions
A B A gt B A lt
BThese conditions may be encoded using 3 flag
bits E 1 G
1 L 1
89Circuit 8 Comparator
- One strategy is to perform the comparison
bit-wise and from right to left.
90Circuit 8 Comparator
- One strategy is to perform the comparison
bit-wise and from right to left. - Express the two bit strings to be compared, A and
BAN AK AK-1 A1 A0 and BN BK
BK-1 B1 B0
91Circuit 8 Comparator
- One strategy is to perform the comparison
bit-wise and from right to left. - Express the two bit strings to be compared, A and
BAN AK AK-1 A1 A0 and BN BK
BK-1 B1 B0 - Now, restrict attention to the substringsAK
AK-1 A1 A0 and BK BK-1 B1 B0
92Circuit 8 Comparator
- We begin with three distinct, possible
assumptions
93Circuit 8 Comparator
- We begin with three distinct, possible
assumptions AK-1 A1 A0 BK-1 B1 B0
EK-1 1 , GK-1 0 , LK-1 0
94Circuit 8 Comparator
- We begin with three distinct, possible
assumptions AK-1 A1 A0 BK-1 B1 B0
EK-1 1 , GK-1 0 , LK-1 0 AK-1 A1 A0 gt
BK-1 B1 B0 EK-1 0 , GK-1 1 , LK-1 0
95Circuit 8 Comparator
- We begin with three distinct, possible
assumptions AK-1 A1 A0 BK-1 B1 B0
EK-1 1 , GK-1 0 , LK-1 0 AK-1 A1 A0 gt
BK-1 B1 B0 EK-1 0 , GK-1 1 , LK-1
0 AK-1 A1 A0 lt BK-1 B1 B0 EK-1 0 ,
GK-1 0 , LK-1 1
96Circuit 8 Comparator
- We begin with three distinct, possible
assumptions AK-1 A1 A0 BK-1 B1 B0
EK-1 1 , GK-1 0 , LK-1 0 AK-1 A1 A0 gt
BK-1 B1 B0 EK-1 0 , GK-1 1 , LK-1
0 AK-1 A1 A0 lt BK-1 B1 B0 EK-1 0 ,
GK-1 0 , LK-1 1 - Note that only one of EK-1, GK-1 or LK-1 may have
value 1 at a time.
97Circuit 8 Comparator
- We begin with three distinct, possible
assumptions AK-1 A1 A0 BK-1 B1 B0
EK-1 1 , GK-1 0 , LK-1 0 AK-1 A1 A0 gt
BK-1 B1 B0 EK-1 0 , GK-1 1 , LK-1
0 AK-1 A1 A0 lt BK-1 B1 B0 EK-1 0 ,
GK-1 0 , LK-1 1 - Note that only one of EK-1, GK-1 or LK-1 may have
value 1 at a time. - Our goal is to derive expressions for outputs EK,
GK and LK based on the inputs AK , BK , EK-1 ,
GK-1 and LK-1 .
98Circuit 8 Comparator
- Construct an abbreviated truth-tableAK BK
EK-1 GK-1 LK-1 EK GK LK 0 0 0 0
1 0 0 10 0 0 1 0 0
1 00 0 1 0 0 1 0 00 1
0 0 1 0 0 10 1 0 1 0
0 0 10 1 1 0 0 0 0
11 0 0 0 1 0 1 01 0 0
1 0 0 1 01 0 1 0 0
0 1 01 1 0 0 1 0 0 11
1 0 1 0 0 1 01 1 1 0 0
1 0 0 - Note that all other (missing) rows are
represented using dont care output values.
99Circuit 8 Comparator
- Construct an abbreviated truth-tableAK BK
EK-1 GK-1 LK-1 EK GK LK 0 0 0 0
1 0 0 10 0 0 1 0 0
1 00 0 1 0 0 1 0 00 1
0 0 1 0 0 10 1 0 1 0
0 0 10 1 1 0 0 0 0
11 0 0 0 1 0 1 01 0 0
1 0 0 1 01 0 1 0 0
0 1 01 1 0 0 1 0 0 11
1 0 1 0 0 1 01 1 1 0 0
1 0 0 - Note that all other (missing) rows are
represented using dont care output values.
Condition is not altered when AK BK
Condition is not altered when AK BK
100Circuit 8 Comparator
- Construct an abbreviated truth-tableAK BK
EK-1 GK-1 LK-1 EK GK LK 0 0 0 0
1 0 0 10 0 0 1 0 0
1 00 0 1 0 0 1 0 00 1
0 0 1 0 0 10 1 0 1 0
0 0 10 1 1 0 0 0 0
11 0 0 0 1 0 1 01 0 0
1 0 0 1 01 0 1 0 0
0 1 01 1 0 0 1 0 0 11
1 0 1 0 0 1 01 1 1 0 0
1 0 0 - Note that all other (missing) rows are
represented using dont care output values.
Condition LK 1 always applies when AK lt BK
101Circuit 8 Comparator
- Construct an abbreviated truth-tableAK BK
EK-1 GK-1 LK-1 EK GK LK 0 0 0 0
1 0 0 10 0 0 1 0 0
1 00 0 1 0 0 1 0 00 1
0 0 1 0 0 10 1 0 1 0
0 0 10 1 1 0 0 0 0
11 0 0 0 1 0 1 01 0 0
1 0 0 1 01 0 1 0 0
0 1 01 1 0 0 1 0 0 11
1 0 1 0 0 1 01 1 1 0 0
1 0 0 - Note that all other (missing) rows are
represented using dont care output values.
Condition GK 1 always applies when AK gt BK
102Circuit 8 Comparator
- This leads to Boolean expressions for the outputs
(using dont cares)AK BK EK-1 GK-1 LK-1
EK GK LK 0 0 0 0 1 0 0
10 0 0 1 0 0 1 00 0 1
0 0 1 0 00 1 0 0 1
0 0 10 1 0 1 0 0 0 10
1 1 0 0 0 0 11 0 0 0 1
0 1 01 0 0 1 0 0 1
01 0 1 0 0 0 1 01 1 0
0 1 0 0 11 1 0 1 0
0 1 01 1 1 0 0 1 0 0
103Circuit 8 Comparator
- The 1-bit comparator circuit is expressed
104Circuit 8 Comparator
- The 1- bit comparator circuit is expressed in MSI
form
105Circuit 8 Comparator
- The 1- bit comparator circuit is expressed in MSI
form
106Summary - Part II
- We continue to study logic design in the contexts
of Small Scale Integration (SSI) and Medium Scale
Integration (MSI) of gate devices and
programmable logic devices (PLD). - We have studied the design of a number of
specific, practical functional circuits with a
view to re-using those circuits as components in
MSI design. Adders
Subtractors Comparator - We note the differing design approaches, or
emphases, effected by differential layering of
abstraction. (The same design issue arises in
the context of software engineering as well.)
SSI Boolean algebra / Simplification /
Logic gates MSI Interconnection
networks / Iterative re-use / Components