Professional Documents
Culture Documents
Chapter 0 1 Chapter 0 2
3,100,000
First generation: ENIAC and other vacuum tube computers (1940s - 1950s)
10,000,000 80
• First generation: Vacuum tube computers (1940s - 1950s) Parameters
1,200,000
• 70
66
Second generation (1950s): Transistors Transistors
275000
Clock speed (MHz)
•
130,000
50
Fourth generation (late 1970s through present): LSI and VLSI 50
Number of transistors
– Personal computers, computer networks, WWW, etc.
100,000 40
•
29,000
33
– New user interfaces (voice activation, etc.) 30
6,500
– New computational paradigm (parallel processing, neural network, etc.)
16
4,500
10,000 20
2,300
10
8
10
programming, gigabit networks, etc.
0.74
3
1,000 0
4004 8080 8085 8086/8088 80286 80386 80486 Pentium
(1971) (1974) (1976) (1978) (1980) (1986) (1988) (1993)
Chapter 0 3 Chapter 0 4
Digital Systems - Analog vs. Digital Digital Systems - Design Hierarchy (1)
• Analog vs. Digital: Continuous vs. discrete. • System level - Register level - Gate level - Transistor and physical design level
(a) Analog form (b) Sampled analog form (c) Digital form
Adder
Magnetic tape contaning analog and digital forms of a signal. Compute the sum of
a sequence of
input numbers
• Digital computers replaced analog computers: Register A
Clear
Store
– More flexible (easy to program), faster, more precise.
– Storage devices are easier to implement. Total Total
Chapter 0 5 Chapter 0 6
Digital Systems - Design Hierarchy (2) Digital Systems - Design Hierarchy (3)
• Gate level: Collection of logic gates. • Transistor and physical design level: Each logic gate is implemented by a
lower-level transistor circuit.
x1
G1
• Electronic Technologies:
x2
Technology Power Speed Packaging
G4
Inputs Combinational Outputs (Device Type) Consumption
x1
logic RTL (Bipolar junction) High Low Discrete
x3 G2 G6 f(x1, x2, x3, x4, x5) network DTL (Bipolar junction) High Low Discrete, SSI
x4
G5
TTL (Bipolar junction) Medium Medium SSI, MSI
ECL (Bipolar junction) High High SSI, MSI, LSI
x2 Memory
G3 pMOS (MOSFET) Medium Low MSI, LSI
x3
nMOS (MOSFET) Medium Medium MSI, LSI, VLSI
CMOS (MOSFET) Low Medium SSI, MSI, LSI, VLSI
A combinational logic circuit with six gates. Sequential logic circuit.
GaAs (MOSFET) High High SSI, MSI, LSI
Chapter 0 7 Chapter 0 8
Organization of a Digital Computer - Organization of a Digital Computer -
Four Major Components Instruction Cycle
• Control unit: Follows the stored list of instructions and supervises the flow of • Fetch the next instruction into the control unit.
information among other components. • Decode the instruction.
• Arithmetic/logic unit (ALU): Performs various operations. • Fetch the operands from memory or input devices.
• Memory unit: Stores programs, input, output, and intermediate data. • Perform the operation.
• I/O devices: Printers, monitors, keyboard, etc. • Store the results in the memory (or send the results to an output device).
Control
unit Instruction cycle of a stored program computer.
Chapter 0 9 Chapter 0 10
Chapter 0 11 Chapter 0 12
Organization of a Digital Computer - Software Chapter 1 Number Systems and Codes
• Programming: The process of designing a list of instructions.
• Application programs: Word processor, spreadsheet, drawing programs,
inventory management programs, accounting programs, etc.
• System programs: Operating systems, language translation programs, utility
programs, performance monitoring programs, etc.
High-level
language Compiler
program
Machine
language
program
Assembly
language Assembler
program
Chapter 1 1
Chapter 0 13
Chapter 1 2 Chapter 1 3
Number Systems (3) Arithmetic (1)
– Subtraction
6 10 4 10 Borrows
7 4 5 1 Minuend
- 5 6 4 3 Subtrahend
1 6 0 6 Difference
Chapter 1 6 Chapter 1 7
Arithmetic (4) Arithmetic (5)
9 10 A 10 Borrows
A 5 B 9 Minuend
+ 5 8 0 D Subtrahend
4 D A C Difference
Chapter 1 8 Chapter 1 9
– Conversion Procedure
16 315 B LSD
1. Divide (NI)B by (B)A, producing Q1 and R0. R0 is the least significant 16 19 3
digit, d0, of the result. 16 1 1 MSD
2. Compute di, for i = 1 … n - 1, by dividing Qi by (B)A, producing Qi+1 0
and Ri, which represents di.
3. Stop when Qi+1 = 0.
Chapter 1 12 Chapter 1 13
• Two's complement of (N)2 = (101001)2 • Algorithm 1.4 Find [N]r given (N)r .
[N]2 = 26 - (101001)2 = (1000000)2 - (101001)2 = (010111)2 – Copy the digits of N, beginning with the LSD and proceeding toward the
MSD until the first nonzero digit, ai, has been reached
• (N)2 + [N]2 = (101001)2 + (010111)2 = (1000000)2 – Replace ai with r - ai .
If we discard the carry, (N)2 + [N]2 = 0. – Replace each remaining digit aj , of N by (r - 1) - aj until the MSD has
Hence, [N]2 can be used to represent -(N)2. been replaced.
• [ [N]2 ]2 = [(010111)2]2 = (1000000)2 - (010111)2 = (101001)2 = (N)2.
• Example: 10's complement of (56700)10 is (43300)10
• Two's complement of (N)2 = (1010)2 for n = 6 • Example: 2's complement of (10100)2 is (01100)2.
[N]2 = (1000000)2 - (1010)2 = (110110)2. • Example: 2’s complement of N = (10110)2 for n = 8.
– Put three zeros in the MSB position and apply algorithm 1.4
• Ten's complement of (N)10 = (72092)10 – N = 00010110
[N]10 = (100000)10 - (72092)10 = (27908)10. – [N]2 = (11101010)2
• The same rule applies to the case when N contains a radix point.
Chapter 1 20 Chapter 1 21
Radix Complement Number Systems (3) Radix Complement Number Systems (4)
• Algorithm 1.5 Find [N]r given (N)r . • Two's complement number system (See Table 1.6):
– First replace each digit, ak , of (N)r by (r - 1) - ak and then add 1 to the – Positive number :
resultant. • N = +(an-2, ..., a0)2 = (0, an-2, ..., a0)2cns,
• For binary numbers (r = 2), complement each digit and add 1 to the result. where 0 N 2 1.
n 1
– Negative number:
• Example: Find 2’s complement of N = (01100101)2 . • N = (an-1, an-2, ..., a0)2
N = 01100101 • -N = [an-1, an-2, ..., a0]2 (two's complement of N),
10011010 Complement the bits where 1 N 2 n 1 .
+1 Add 1
[N]2 = (10011011)10 – Example: Two's complement number system representation of (N)2
• Example: Find 10’s complement of N = (40960)10 when (N)2 = (1011001)2 for n = 8:
N = 40960 • +(N)2 = (0, 1011001)2cns
59039 Complement the bits • -(N)2 = [+(N)2]2 = [0, 1011001]2 = (1, 0100111)2cns
+1 Add 1
[N]2 = (59040)10
Chapter 1 22 Chapter 1 23
Radix Complement Number Systems (5) Radix Complement Arithmetic (1)
• Example: Two's complement number system representation of -(18)10 , n = 8: • Radix complement number systems are used to convert subtraction to addition,
– +(18)10 = (0, 0010010)2cns which reduces hardware requirements (only adders are needed).
– -(18)10 = [0, 0010010]2 = (1, 1101110)2cns • A - B = A + (-B) (add r’s complement of B to A)
• Example: Decimal representation of N = (1, 1101000)2cns • Range of numbers in two’s complement number system:
– N = (1, 1101000)2cns = -[1, 1101000]2 = -(0, 0011000)2cns = -(24)2 . 2n 1 N 2n 1 1 , where n is the number of bits.
• 2n-1 -1 = (0, 11 ... 1)2cns and -2n-1 = (1, 00 ... 0)2cns
• If the result of an operation falls outside the range, an overflow condition is
said to occur and the result is not valid.
• Case 1: A = B + C • Case 2: A = B - C
– (A)2 = (B)2 + (C)2 – A = (B)2 + (-(C)2) = (B)2 + [C]2 = (B)2 + 2n - (C)2 = 2n + (B - C)2
– If A > 2n-1 -1 (overflow), it is detected by the nth bit, which is set to 1. – If B C, then A 2n and the carry is discarded.
– So, (A)2 = (B)2 + [C]|carry discarded
– Example: (7)10 + (4)10 = ? using 5-bit two’s complement arithmetic. – If B < C, then A = 2n - (C - B)2 = [C - B]2 or A = -(C - B)2 (no carry in this
• + (7)10 = +(0111)2 = (0, 0111)2cns case).
• + (4)10 = +(0100)2 = (0, 0100)2cns – No overflow for Case 2.
• (0, 0111)2cns + (0, 0100)2cns = (0, 1011)2cns = +(1011)2 = +(11)10
• No overflow. – Example: (14)10 - (9)10 = ?
– Example: (9)10 + (8)10 = ? • Perform (14)10 + (-(9)10)
• + (9)10 = +(1001)2 = (0, 1001)2cns • (14)10 = +(1110)2 = (0, 1110)2cns
• + (8)10 = +(1000)2 = (0, 1000)2cns • -(9)10 = -(1001)2 = (1, 0111)2cns
• (0, 1001)2cns + (0, 1000)2cns = (1, 0001)2cns (overflow) • (14)10 - (9)10 = (0, 1110)2cns + (1, 0111)2cns = (0, 0101)2cns + carry
= +(0101)2 = +(5)10
Chapter 1 26 Chapter 1 27
Radix Complement Arithmetic (4) Radix Complement Arithmetic (5)
Chapter 1 30 Chapter 1 31
Diminished Radix Complement Number systems (1) Diminished Radix Complement Number systems (2)
• Diminished radix complement [N]r-1 of a number (N)r is: • Example: Nine’s complement of (40960)
[N]r-1 = rn - (N)r - 1 (1.10) [N]2-1 = 105 - (40960)10 - 1
= (100000)10 - (40960)10 - (00001)10
• One’s complement (r = 2): = (59040)10 - (00001)10
[N]2-1 = 2n - (N)2 - 1 (1.11) = (59039)10
• Example: One’s complement of (01100101)2 • Algorithm 1.6 Find [N]r-1 given (N)r .
[N]2-1 = 28 - (01100101)2 - 1 Replace each digit ai of (N)r by r - 1 - a. Note that when r = 2, this simplifies
= (100000000)2 - (01100101)2 - (00000001)2 to complementing each individual bit of (N)r .
= (10011011)2 - (00000001)2
= (10011010)2 • Radix complement and diminished radix complement of a number (N):
[N]r = [N]r-1 + 1 (1.12)
Chapter 1 32 Chapter 1 33
Diminished Radix Complement Arithmetic (1) Diminished Radix Complement Arithmetic (2)
• Operands are represented using diminished radix complement number system. • Example: Add -(1001)2 and -(0011)2 .
• The carry, if any, is added to the result (end-around carry). One’s complement of the operands are: 10110 and 11100
10110 + 11100 = 110010 (carry)
• Example: Add +(1001)2 and -(0100)2 . Correct result is 10010 + 1 = 10011.
One’s complement of +(1001) = 01001
One’s complement of -(0100) = 11011 • Example: Add +(75)10 and -(21)10 .
01001 + 11011 = 100100 (carry) Nine’s complements of the operands are: 075 and 978
Add the carry to the result: correct result is 00101. 075 + 978 = 1053 (carry)
Correct result is 053 + 1 = 054
• Example: Add +(1001)2 and -(1111)2 .
One’s complement of +(1001) = 01001 • Example: Add +(21)10 and -(75)10 .
One’s complement of -(1111) = 10000 Nine’s complements of the operands are: 021 and 924
01001 + 10000 = 11001 (no carry, so this is the correct result). 021 + 924 = 945 (no carry, so this is the correct result).
Chapter 1 34 Chapter 1 35
Computer Codes (1) Computer Codes (2)
• Code is a systematic use of a given set of symbols for representing • Excess or Biased Representation
information. – An excess-K representation of a code C: Add K to each code word C.
• Example: Traffic light (Red: stop, Yellow: caution, Blue: go). – Frequently used for the exponents of floating-point numbers.
– Excess-8 representation of 4-bit two’s complement code: Table 1.8
• Numeric Codes
– To represent numbers.
– Fixed-point and floating-point number.
• Fixed-point Numbers
– Used for signed integers or integer fractions.
– Sign magnitude, two’s complement, or one’s complement systems are
used.
– Integer: (Sign bit) + (Magnitude) + (Implied radix point)
– Fraction: (Sign bit) + (Implied radix point) + (Magnitude)
Chapter 1 36 Chapter 1 37
Chapter 1 38 Chapter 1 39
Floating Point Numbers (3) Floating Point Numbers (4)
• Example: M = +(1101.0101)2
Sign of mantissa
M = +(1101.0101)2
= (0.11010101)2 24 (1.22)
= (0.011010101)2 2 5 (1.23) – Typical extended-precision format
= (0.0011010101)2 2 6 (1.24)
… SM Exponent E Mantissa M (most significant part)
• Normalization is used for a unique representation: mantissa has a nonzero
value in its MSD position.
• Eq. 1.22 gives the normalization representation of M. Mantissa M (least significant part)
Chapter 1 40 Chapter 1 41
• Example: N = (101101.101)2, where n + m = 10 and e = 5. Assume that a • To represent information as strings of alpha-numeric characters.
normalized sign magnitude fraction is used for M and that Excess-16 two’s
complement is used for E. • Binary Coded Decimal (BCD)
– Used to represent the decimal digits 0 - 9.
– N = (101101.101)2 = (0.101101101)2 26 – 4 bits are used.
– M = +(0.1011011010)2 = (0.1011011010)2sm – Each bit position has a weight associated with it (weighted code).
– Weights are: 8, 4, 2, and 1 from MSB to LSB (called 8-4-2-1 code).
– E = +(6)10 = +(0110)2 = (00110)2cns – BCD Codes:
– Add the bias 16 = (10000)2 to E 0: 0000 1: 0001 2: 0010 3: 0011 4: 0100
E = 00110 + 10000 = 10110 5: 0101 6: 0110 7: 0111 8: 1000 9: 1001
So, E = (1, 0110)excess-16 – Used to encode numbers for output to numerical displays
– Used in processors that perform decimal arithmetic.
– Combining M and E, we have
N = (0, 1, 0110, 1011011010)fp – Example: (9750)10 = (1001011101010000)BCD
Chapter 1 42 Chapter 1 43
Characters and Other Codes (2) Characters and Other Codes (3)
Chapter 1 44 Chapter 1 45
Error Detection Codes and Correction Codes(1) Error Detection Codes and Correction Codes(2)
• Relationship between the minimum distance between code words and the • Simple Parity Code
ability to detect and correct errors: – Concatenate (|) a parity bit, P, to each code word of C.
01011000
0
1
0
dmin= 4 dmin= 5 1 Information
1 tracks
(c) (SEC and DED) or TED (d) DEC, (SEC and 3ED), or 4E
0
0
0
1 Parity track
Chapter 1 48 Chapter 1 49
– Example: Odd-parity code for ASCII code characters: • Multiple check bits are employed.
• Each check bit is defined over (or covers) a subset of the information bits.
Character ASCII Code Odd-parity Code
• Subsets overlap so that each information bit is in at least two subsets.
0 0110000 10110000
• dmin is equal to the weight of the minimum-weight nonzero code word.
X 1011000 01011000
= 0111100 1111100
• Hamming Code 1 (Table 1.14)
BEL 0000111 00000111
– dmin = 3, single error correction code.
– Let the set of all code words: C
– Error detection: Check whether a code word has the correct parity. an error word with single error: ce
– Single-error detection code (dmin = 2). the correct code word for the error word: c
then, d(ce,c) = 1 and d(ce, w) > 1 for all other w C (see Table 1.15)
• Two-out-of-Five Code – So, a single error can be detected and corrected by finding out the code
– Each code word has exactly two 1’s and three 0’s. word which differs in 1 bit position from the error word.
– Detects single errors and multiple errors in adjacent bits.
Chapter 1 50 Chapter 1 51
Hamming Codes (2) Hamming Codes (3)
– A code word consists of 4 information bits and 3 check bits: – Decoding can be done using the parity-check matrix, H:
c = (i3 i2 i1 i0 c2 c1 c0)
– Each check bit covers: p11 p21 p31 p41100 1110100 (1.28)
c2: i3, i2, i1 c1: i3, i2, i0 c0: i3, i1, i0 H p12 p22 p32 p42 010 1101010
– This relationship is specified by the generating matrix, G: p13 p23 p33 p43 001 1011001
1000111 1000 p11 p12 p13 • H matrix is can be derived from G matrix.
0100110 0100 p p p
– An n-tuple c is a code word generated by G if and only if
G 21 22 23 (1.26)
0010101 0010 p31 p32 p33 HcT = 0 (1.29)
0001011 0001 p41 p42 p43 – Let d be a data word corresponding to a code word c, which has been
corrupted by an error pattern e. Then
d=c+e (1.30)
– Encoding of an information word i to produce a code word, c: – Decoding:
c = iG (1.27) • Compute the syndrome, s, of d using H matrix.
• s tells the position of the erroneous bit.
Chapter 1 52 Chapter 1 53
Odd-weight-column code:
• H matrix has an odd number of ones in each column.
• Example: Hamming Code 2.
• Has many properties; single-error correction, double-error detection,
multiple-error detection, low cost encoding and decoding, etc.
Chapter 1 54 Chapter 1 55
Hamming Codes (6) Hamming Codes (7)
• Hamming codes are most easily designed by specifying the H matrix. • Example: A Hamming code for encoding five (k = 5) information bits.
• For any positive integer m 3, there exists an (n, k) SEC Hamming code with – Four check bits are required (m = 4). So, n = 9.
the following properties: – A (9, 5) code can be obtained by deleting six columns from the (15,11)
– Code length: n = 2m - 1 code shown above.
– Number of information bits: k = 2m - m - 1 – The H and G matrices are:
– Number of check bits: n - k = m
100001111
– Minimum distance: dmin = 3 111101000
• The H matrix is an n m matrix with all nonzero m-tuples as its column. 111010100 010001110
• H (1.36) G 001001101 (1.37)
A possible H matrix for a (15, 11) Hamming code, when m = 4: 110110010
000101011
101110001 000010111
111101110001000
111011001100100
H (1.35)
110110100110010
101110011010001
Chapter 1 56 Chapter 1 57
Chapter 2
Algebraic Methods for the Analysis and Fundamentals of Boolean Algebra (1)
Chapter 2 3 Chapter 2 4
• Theorem 6 • Theorem 7
(a) ab + ab' = a (b) (a + b)(a + b') = a (a) ab + ab'c = ab + ac (b) (a + b)(a + b' + c) = (a + b)(a + c)
• Examples: • Examples:
– ABC + AB'C = AC [T6(a)] – wy' + wx'y + wxyz + wxz' = wy' + wx'y + wxy + wxz' [T7(a)]
– (W' + X' + Y' + Z')(W' + X' + Y' + Z)(W' + X' + Y + Z')(W' + X' + Y + Z) = wy' + wy + wxz' [T7(a)]
= (W' + X' + Y')(W' + X' + Y + Z')(W' + X' + Y + Z) [T6(b)] = w + wxz' [T7(a)]
= (W' + X' + Y')(W' + X' + Y) [T6(b)] =w [T7(a)]
= (W' + X') [T6(b)] – (x'y' + z)(w + x'y' + z') = (x'y' + z)(w + x'y') [T7(b)]
Chapter 2 5 Chapter 2 6
Fundamentals of Boolean Algebra (6) Fundamentals of Boolean Algebra (7)
Chapter 2 7 Chapter 2 8
• Theorem 9 (Consensus) • Switching algebra: Boolean algebra with the set of elements K = {0, 1}
(a) ab + a'c + bc = ab + a'c (b) (a + b)(a' + c)(b + c) = (a + b)(a' + c) • If there are n variables, we can define 22 switching functions.
n
• Shows the value of a function for all possible input combinations. • Truth tables for f(A,B,C) = AB + A'C + AC' (Table 2.5)
• Truth tables for OR, AND, and NOT (Table 2.4):
Chapter 2 11 Chapter 2 12
Algebraic Forms of Switching Functions (1) Algebraic Forms of Switching Functions (2)
• Literal: A variable, complemented or uncomplemented. • A minterm is a product term in which all the variables appear exactly
• Product term: A literal or literals ANDed together. once either complemented or uncomplemented.
• Sum term: A literal or literals ORed together. • Canonical Sum of Products (canonical SOP):
– Represented as a sum of minterms only.
• SOP (Sum of Products): – Example: f1(A,B,C) = A'BC' + ABC' + A'BC + ABC (2.1)
• ORing product terms • Minterms of three variables:
• f(A, B, C) = ABC + A'C + B'C Minterm Minterm Code Minterm Number
A'B'C' 000 m0
• POS (Product of Sums) A'B'C 001 m1
• ANDing sum terms A'BC' 010 m2
• f (A, B, C) = (A' + B' + C')(A + C')(B + C') A'BC 011 m3
AB'C' 100 m4
AB'C 101 m5
ABC' 110 m6
ABC 111 m7
Chapter 2 13 Chapter 2 14
Algebraic Forms of Switching Functions (3) Algebraic Forms of Switching Functions (4)
• Compact form of canonical SOP form: • Example: Given f(A,B,Q,Z) = A'B'Q'Z' + A'B'Q'Z + A'BQZ' + A'BQZ, express
f1(A,B,C) = m2 + m3 + m6 + m7 (2.2) f(A,B,Q,Z) and f '(A,B,Q,Z) in minterm list form.
• A further simplified form:
f1(A,B,C) = S m (2,3,6,7) (minterm list form) (2.3) f(A,B,Q,Z) = A'B'Q'Z' + A'B'Q'Z + A'BQZ' + A'BQZ
• The order of variables in the functional notation is important. = m0 + m1 + m6 + m7
• Deriving truth table of f1(A,B,C) from minterm list: = S m(0, 1, 6, 7)
Algebraic Forms of Switching Functions (5) Algebraic Forms of Switching Functions (6)
• A maxterm is a sum term in which all the variables appear exactly • f2(A,B,C) = M0M1M4M5 (2.8)
once either complemented or uncomplemented. = PM(0,1,4,5) (maxterm list form) (2.9)
• Canonical Product of Sums (canonical POS):
– Represented as a product of maxterms only. • The truth table for f2(A,B,C):
– Example: f2(A,B,C) = (A+B+C)(A+B+C')(A'+B+C)(A'+B+C') (2.7)
• Maxterms of three variables: Rwo No. Inputs M0 M1 M4 M5 Outputs
(i) ABC A+B+C A+B+C' A'+B+C A'+B+C' f2(A,B,C)
Maxterm Maxterm Code Maxterm Number 0 000 0 1 1 1 0
A+B+C 000 M0 1 001 1 0 1 1 0
A+B+C' 001 M1 2 010 1 1 1 1 1
A+B'+C 010 M2 3 011 1 1 1 1 1
A+B'+C' 011 M3 4 100 1 1 0 1 0
A'+B+C 100 M4 5 101 1 1 1 0 0
A'+B+C' 101 M5 6 110 1 1 1 1 1
A'+B'+C 110 M6 7 111 1 1 1 1 1
A'+B'+C' 111 M7
Chapter 2 17 Chapter 2 18
Algebraic Forms of Switching Functions (7) Algebraic Forms of Switching Functions (8)
• Truth tables of f1(A,B,C) of Eq. (2.3) and f2(A,B,C) of Eq. (2.7) are identical. • Relationship between minterm mi and maxterm Mi:
• Hence, f1(A,B,C) = S m (2,3,6,7) – For f(A,B,C), (m1)' = (A'B'C)' = A + B + C' = M1
= f2(A,B,C) – In general, (mi)' = Mi (2.11)
= PM(0,1,4,5) (2.10) (Mi)' = ((mi)')' = mi (2.12)
• Example: Given f(A,B,C) = ( A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C'),
construct the truth table and express in both maxterm and minterm form.
– f(A,B,C) = M1M3M5M7 = PM(1,3,5,7) = S m (0,2,4,6)
Row No. Inputs Outputs
(i) ABC f(A,B,C)= PM(1,3,5,7) = Sm(0,2,4,6)
0 000 1 m0
1 001 0 M1
2 010 1 m2
3 011 0 M3
4 100 1 m4
5 101 0 M5
6 110 1 m6
Chapter 2 7 111 0 M7 19 Chapter 2 20
Algebraic Forms of Switching Functions (9) Algebraic Forms of Switching Functions (10)
• Example: Relationship between the maxterms for a function and its – From the truth table
complement. f '(A,B,C) = PM(0,2,4,6) and f(A,B,C) = PM(1,3,5,7)
– For f(A,B,C) = ( A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C') – Since f(A,B,C) f '(A,B,C) = 0,
– The truth table is: (M0M2M4M6)(M1M3M5M7) = 0 or M 0
2 3 1
i
i 0
– In general, M 0
2 n 1
(2.13)
Row No. Inputs Outputs Outputs i
Chapter 2 21 Chapter 2 22
Derivation of Canonical Forms (1) Derivation of Canonical Forms (2)
• Derive canonical POS or SOP using switching algebra. • Alternative: Use Theorem 6 to add missing literals.
• Theorem 10. Shannon's expansion theorem • Example: f(A,B,C) = AB + AC' + A'C to canonical SOP form.
(a). f(x1, x2, …, xn) = x1 f(1, x2, …, xn) + (x1)' f(0, x2, …, xn) – AB = ABC' + ABC = m6 + m7
(b). f(x1, x2, …, xn) = [x1 + f(0, x2, …, xn)] [(x1)' + f(1, x2, …, xn)] – AC' = AB'C' + ABC' = m4 + m6
– A'C = A'B'C + A'BC = m1 + m3
• Example: f(A,B,C) = AB + AC' + A'C – Therefore,
– f(A,B,C) = AB + AC' + A'C = A f(1,B,C) + A' f(0,B,C) f(A,B,C) = (m6 + m7) + (m4 + m6) + (m1 + m3) = Sm(1, 3, 4, 6, 7)
= A(1B + 1C' + 1'C) + A'(0B + 0C' + 0'C) = A(B + C') + A'C
– f(A,B,C) = A(B + C') + A'C = B[A(1+C') + A'C] + B'[A(0 + C') + A'C] • Example: f(A,B,C) = A(A + C') to canonical POS form.
= B[A + A'C] + B'[AC' + A'C] = AB + A'BC + AB'C' + A'B'C – A = (A+B')(A+B) = (A+B'+C')(A+B'+C)(A+B+C')(A+B+C)
– f(A,B,C) = AB + A'BC + AB'C' + A'B'C = M3M2M1M0
= C[AB + A'B1 + AB'1' + A'B'1] + C'[AB + A'B0 + AB'0' + A'B'0] – (A+C')= (A+B'+C')(A+B+C') = M3M1
= ABC + A'BC + A'B'C + ABC' + AB'C' – Therefore,
f(A,B,C) = (M3M2M1M0)(M3M1) = PM(0, 1, 2, 3)
Chapter 2 23 Chapter 2 24
• A switching function may be incompletely specified. • Electrical Signals and Logic Values
• Some minterms are omitted, which are called don't-care minterms.
• Don't cares arise in two ways:
Electric Signal Logic Value
– Certain input combinations never occur. Positive Logic Negative Logic
– Output is required to be 1 or 0 only for certain combinations. High Voltage (H) 1 0
• Don't care minterms: di Don't care maxterms: Di Low Voltage (L) 0 1
• Example: f(A,B,C) has minterms m0, m3, and m7 and don't-cares d4 and d5. – A signal that is set to logic 1 is said to be asserted, active, or true.
– Minterm list is: f(A,B,C) = Sm(0,3,7) + d(4,5) – An active-high signal is asserted when it is high (positive logic).
– Maxterm list is: f(A,B,C) = PM(1,2,6)·D(4,5) – An active-low signal is asserted when it is low (negative logic).
– f '(A,B,C) = Sm(1,2,6) + d(4,5) = PM(0,3,7)·D(4,5)
– f (A,B,C)= A'B'C' + A'BC + ABC + d(AB'C' + AB'C)
= B'C' + BC (use d4 and omit d5)
Chapter 2 25 Chapter 2 26
Electronic Logic Gates (2) Electronic Logic Gates (3)
Vcc 4B 4A 4Y 3B 3A 3Y Vcc 4Y 4B 4A 3Y 3B 3A
14 13 12 11 10 9 8 14 13 12 11 10 9 8
a a &
AND f(a, b) =ab AND f(a, b) =ab
b b
³
a a 1
OR f(a, b) =a + b OR f(a, b) =a + b
b b
a 1
NOT a f(a) =a NOT f(a) =a
b 1 2 3 4 5 6 7 1 2 3 4 5 6 7
a a 1A 1B 1Y 2A 2B 2Y GND 1Y 1A 1B 2Y 2A 2B GND
NAND f(a, b) =ab NAND & f(a, b) =ab 7400:Y =AB 7402:
Y =A + B
b b Quadruple two-input NAND gates Quadruple two-input NOR gates
³
a a 1
NOR f(a, b) =a + b NOR f(a, b) =a + b Vcc 6A 6Y 5A 5Y 4A 4Y Vcc 4B 4A 4Y 3B 3A 3Y
b b
14 13 12 11 10 9 8 14 13 12 11 10 9 8
a
EXCLUSIVE f(a, b) =a b a
EXCLUSIVE =1 f(a, b) =a b
OR b OR b
1 2 3 4 5 6 7 1 2 3 4 5 6 7
1A 1Y 2A 2Y 3A 3Y GND 1A 1B 1Y 2A 2B 2Y GND
7404:Y =A 7408:Y =AB
Hex inverters Quadruple two-input AND gates
Chapter 2 27 Chapter 2 28
Vcc NC H G NC NC Y Vcc 4B 4A 4Y 3B 3A 3Y
14 13 12 11 10 9 8 14 13 12 11 10 9 8
Vcc 1C 1Y 3C 3B 3A 3Y Vcc 2D 2C NC 2B 2A 2Y
14 13 12 11 10 9 8 14 13 12 11 10 9 8
1 2 3 4 5 6 7 1 2 3 4 5 6 7
A B C D E F GND 1A 1B 1Y 2A 2B 2Y GND
7430:
Y =ABCDEFGH 7432:Y =A + B
8-input NAND gate Quadruple two-input OR gates
Vcc 4B 4A 4Y 3B 3A 3Y
14 13 12 11 10 9 8
1 2 3 4 5 6 7 1 2 3 4 5 6 7
1A 1B 2A 2B 2C 2Y GND 1A 1B NC 1C 1D 1Y GND
7410:Y =ABC 7420: Y =ABCD 1 2 3 4 5 6 7
Triple three-input NAND gates Dual four-input NAND gates 1A 1B 1Y 2A 2B 2Y GND
7486:Y =A Å B
Quadruple two-input exclusive-OR gates
Chapter 2 29 Chapter 2 30
Basic Functional Components (1) Basic Functional Components (2)
• AND • OR
A
a b fAND(a, b) =ab A B Y Y
B A
0 0 0 L L L (c) a b fOR(a, b) =a + b A B Y Y
B
0 1 0 L H L (c)
1 0 0 H L L A & 0 0 0 L L L
Y 0 1 1 L H H
1 1 1 H H H B A
1 0 1 HL H Y
(a) (b) (d) 1 1 1 HH H B
(a) (b) (d)
(a) AND logic function.
(b) Electronic AND gate. (a) OR logic function.
(c) Standard symbol. (b) Electronic OR gate.
(d) IEEE block symbol. (c) Standard symbol.
(d) IEEE block symbol.
Chapter 2 31 Chapter 2 32
A Y
00 0 False 0 0 1 L H A 1 Y
1 0 H L
01 1 True 1
(a) (b) (d)
10 1 True 1
11 2 True 1
(a) NOT logic function.
(b) Electronic NOT gate.
(c) Standard symbol.
(d) IEEE block symbol.
Chapter 2 33 Chapter 2 34
Basic Functional Components (5) Basic Functional Components (6)
A B Y a
y =a +b
Positive Logic Negative Logic 1 1 1 b
1 0 1 A
Y (c)
1 is represented by High Voltage Low Voltage 0 1 1 B
0 0 0 a
0 is represented by Low Voltage High Voltage (a) (b) y = ab
b
(d)
– (a) AND gate truth table (L = 1, H = 0)
– (b) Alternate AND gate symbol (in negative logic)
– (c) Preferred usage
– (d) Improper usage
– y = a·b = (2.14)
a b a b fOR(a , b )
– (2.15)
y (a ) (b ) a b fOR(a, b)
Chapter 2 35 Chapter 2 36
• OR Gate Usage in Negative Logic • Example 2.32: Building smoke alarm system
– Components: two smoke detectors, a sprinkler, and an automatic
A B Y a telephone dialer
y = ab
1
1
1
0
1
0 A
b – Behavior:
Y (c)
0
0
1
0
0
0
B • Sprinkler is activated if either smoke detector detects smoke.
a
(a) (b)
b
y =a +b • When both smoke detector detect smoke, fire department is called.
(d) – Signals:
– (a) OR gate truth table(L = 1, H = 0) • D1, D 2 : Active-low outputs from two smoke detectors.
– (b) Alternate OR gate symbol (in negative logic) • : Active-low input to the sprinkler
SPK
– (c) Preferred usage • DIAL : Active-low input to the telephone dialer.
– (d) Improper usage – Logic equations
– (2.16) • SPK D1 D2 (2.18)
y a b a b a b fAND(a , b )
– (2.17) • (2.19)
DIAL D1 D 2
y (a ) (b ) a b fAND(a, b)
Chapter 2 37 Chapter 2 38
Basic Functional Components (9) Basic Functional Components (10)
a b fNAND(a, b) =ab A B Y
0 0 1 L L H
0 1 1 L H H
1 0 1 H L H
Smoke 1 1 0 H H L
detectors (a) (b)
Sprinkler
D1 D1 + D2
G1
D2 A A A &
SPK Y Y Y
B B B
Chapter 2 39 Chapter 2 40
• Matching signal polarity to NAND gate inputs/outputs • AND, OR, and NOT gates constructed exclusively from NAND gates
– (a) Preferred usage (b) Improper usage
a a
y y a ab a f(a, a) = aa = a
b b f(a, b) =ab= ab
b
• AND, OR, and NOT gates constructed exclusively from NOR gates. • Exclusive-OR (XOR)
– fXOR(a, b) = a b = a b ab (2.24)
a a +b
f(a, b) =a + b a f(a, a) =a + a = a ab fXOR(a, b) = a b AB Y
b 00 0 LL L
01 1 LH H
OR gate NOT gate 10 1 HL H
11 0 HH L
a a (a) XOR logic function (b) Electronic XOR gate
f(a, b) =ab= ab
b A A
Y =1 Y
b B B
Chapter 2 45 Chapter 2 46
Basic Functional Components (16) Basic Functional Components (17)
• POS of XOR • Output of XOR gate is asserted when the mathematical sum of inputs is one:
a b a b ab
a a a b a b bb [P2(a), P6(b)]
a ( a b) b ( a b)
[P5(b)] ab sum(a, b) sum(a, b) = 1? f(a, b) = a b
[P5(b)] 00 0 False 0
(a b )(a b) 01 1 True 1
• Some other useful relationships 10 1 True 1
11 2 False 0
– aa=0 (2.25)
– a a =1 (2.26)
– a0=a (2.27) • The output of XOR is the modulo-2 sum of its inputs.
– a1= a (2.28)
– a b a b (2.29)
– ab=ba (2.30)
– a (b c) = (a b) c (2.31)
Chapter 2 47 Chapter 2 48
Chapter 2 49 Chapter 2 50
Analysis of Combinational Circuits (1) Analysis of Combinational Circuits (2)
• Digital Circuit Design: • Algebraic Method: Use switching algebra to derive a desired form.
– Word description of a function
a set of switching equations • Example 2.33: Find a simplified switching expressions and logic network for
hardware realization (gates, programmable logic devices, etc.) the following logic circuit (Fig. 2.21a).
• Analysis is used a
f (a, b, c)
c P2
– To determine the behavior of the circuit
– To verify the correctness of the circuit b P3
• Write switching expression for each gate output: • Example 2.34: Find a simplified switching expressions and logic network for
– P ab, P a c, P3 b c , P4 P1 P2 ab (a c) the following logic circuit (Fig. 2.22).
1 2
• The output is: f (a, b, c) P P (b c ) ab (a c)
3 4
• Simplify the output function using switching algebra:
a a b
f (a, b, c) (b c ) ab a c b
(a b)(b c)
bc b c ab a c [Eq. 2.24]
b
bc b c (a b )ac [T8]
c b c
f (a, b, c)
[T5(b)]
bc b c ab c a
[T4(a)] a +b
bc b c b
f (a, b, c) = b c [Eq. 2.32]
Therefore, f (a,b,c) = (b c)' = b c a a +b +a +c
c a +c
b f (a, b, c)
Given circuit
c
Chapter 2 53 Chapter 2 54
Analysis of Combinational Circuits (5) Analysis of Combinational Circuits (6)
• Derive the output expression: • Truth Table Method: Derive the truth table one gate at a time.
f(a,b,c)
= (a b)(b c) (a b a c) • The truth table for Example 2.34:
= (a b)(b c) a b a c) [T8(b)]
= (a b)(b c) (a b )(a c) [T8(a)]
= (ab a b)(bc b c) (a b )(a c) [Eq. 2.24] abc ac a b f(a,b,c)
= ab bc ab b c a bbc a bb c a a a c ab b c [P5(b)] 000 0 0 0
= ab c a bc a c ab b c [P6(b), T4(a)] 001 1 0 1
010 0 1 1
= a bc a c ab b c [T4(a)]
011 1 1 1
= a bc a c ab [T9(a)] 100 0 1 1
a
= a b a c ab c
[T7(a)] 101 0 1 1
f (a, b, c)
= ac a b [Eq. 2.24] 110 0 0 0
a
b
111 0 0 0
Simplified circuit
Chapter 2 55 Chapter 2 56
• Analysis of Timing Diagrams • Example 2.35: Derivation of truth table from a timing diagram
– Timing diagram is a graphical representation of input and output signal
relationships over the time dimension.
– Timing diagrams may show intermediate signals and propagation delays.
A
A
B Y = fa (A, B, C) B
C
Inputs
Outputs
Z = fb (A, B, C) Y = fa (A, B, C)
Z = fb (A, B, C)
C
t0 t1 t2 t3 t4 t5 t6 t7
(a)
(b)
Inputs Outputs
Time ABC fa(A, B, C) fb(A, B, C)
t0 000 0 0
t1 001 1 1
t2 010 1 0
t3 011 0 1
t4 100 0 0
t5 101 0 1
t6 110 1 1
t7 111 1 0
Chapter 2 57 Chapter 2 (c) 58
Analysis of Combinational Circuits (9) Analysis of Combinational Circuits (10)
• Power consumption a
b
c
• Size and weight b c
– Propagation delay: The delay between the time of an input change and the a a
corresponding output change.
b b
– Typical two propagation delay parameters:
• tPLH = propagation delay time, low-to-high-level output
c c
tPD tPD tPLH tPHL
• tPHL = propagation delay time, high-to-low-level output (c)tPD = tPLH= tPHL (d)tPLH<tPHL
– Approximation:
• t t PLH t PHL
PD
2
Chapter 2 59 Chapter 2 60
• Power dissipation and propagation delays for several logic families (Table 2.7) • Propagation delays of primitive 74LS series gates (Table 2.8)
Chapter 2 61 Chapter 2 62
Analysis of Combinational Circuits (13) Synthesis of Combinational Logic Circuits (1)
• Example 2.36: Given a circuit diagram and the timing diagram, find the truth • AND-OR and NAND Networks
table and minimum switching expression. – Switching expression must be in SOP form.
D – Example: f ( p, q, r, s) pr qrs ps
C F
A ABC f (A, B, C)
Bubbles
Òcancel
Y = f (A, B, C) 0 0 0 0 Ó
0 0 1 1
p p p
E 0 1 0 0 x1 x1
B G r r r
0 1 1 0
1 0 0 1 q fd (p, q, r, s) q x2 fd (p, q, r, s) q x2 fd (p, q, r, s)
1 0 1 1 r r r
1 1 0 1 s s s
A
1 1 1 0 p p x3 p x3
B s s s
(a) AND-OR network (b) NAND network (c) NAND network (preferred form
C
D f ( A, B, C)
–
E
m(1,4,5,6) f ( p, q, r , s ) pr qrs ps [T3]
pr qrs ps
F
A B C AB C AB C AB C [T8(a)]
G
f (A, B, C) AC B C x1 x2 x3
t0 t1 t3 t4 t5 t6 t7
t1 + 2t2 t2 + 2 t4 + 3
t4 + 2
t7 + 3
t7 + 2 where x pr , x qrs, and x ps
t1 + 1 t2 + 1 t4 + 1 t7 + 1 1 2 3
Chapter 2 63 Chapter 2 64
Synthesis of Combinational Logic Circuits (2) Synthesis of Combinational Logic Circuits (3)
• Circuits with more than two levels are often needed due to fan-in constraints. • Example 2.37: NAND implementation of f (X,Y,Z) = Sm(0,3,4,5,7)
1. f (X,Y,Z) = Sm(0,3,4,5,7)
a
2. f (X,Y,Z) = m0 + m3 + m4 + m5 + m7
b
c
d
f = abcde XYZ XYZ XYZ XYZ XYZ
e 3. f ( X , Y , Z ) YZ YZ XZ [T6(a)]
(a) A single five-input AND gate
4a. f ( X , Y , Z ) YZ YZ XZ [T4]
a
a b
b
or
c
c 4b. f ( X , Y , Z ) YZ YZ XZ [T3]
d
d f = abcde
f = abcde Y Z YZ XZ [T8(a)]
e e
(b) Three-level network of two-input gates (c) Four-level network of two-input gates.
Y
Z
Y f (X, Y, Z)
Z
X
Z
(a) NAND implementation
Chapter 2 67 Chapter 2 68
Synthesis of Combinational Logic Circuits (6) Synthesis of Combinational Logic Circuits (7)
Vcc B
connection
H G Y
• More difficult to design
A
• Slower
14 13 12 11 10 9 8 Y1
B
C
• Example 2.39:
Y2
D
Y
Output f ( A, B, C, D) AB AD AC A( B D C ) A( BCD)
E
Y3
F
A
Y4
G B A f (A, B, C, D)
H
A f (A, B, C, D)
D B
C
1 2 3 4 5 6 7
A D
A C D E F NC GND Enable lines
C
(a) 7454 circuit package (top view) (b) 7454 used as a 4-to-1 multiplexe
Chapter 2 69 Chapter 2 (a) Original form (b) After factoring 70
Synthesis of Combinational Logic Circuits (8) Synthesis of Combinational Logic Circuits (9)
• Example 2.40: f (a,b,c,d) = Sm(8,13) with only two-input AND and OR gates. • Example 2.41: A burglar alarm with four control switches, each of which
– Write the canonical SOP form: produces logic 1 when:
f (a,b,c,d) = Sm(8,13) = ab c d abc d (2.34) Switch A: Secret switch is closed
Two four-input AND gates and one two-input OR gate are needed. Switch B: Safe is in its normal position in the closet
– Apply factoring: Switch C: Clock is between 1000 and 1400 hours
(2.35) Switch D: Closet door is closed.
f (a, b, c, d ) ab c d abc d (ac )(bd b d )
Write the equations of the control logic that produces logic 1 when
the safe is moved AND the secret switch is closed,
b
OR
d
the closet is opened after banking hours,
f = (a, b, c, d)
OR
the closet is opened with the control switch open.
c f ( A, B, C , D) AB C D A D
a
Chapter 2 71 Chapter 2 72
Synthesis of Combinational Logic Circuits (10) Synthesis of Combinational Logic Circuits (11)
• Example 2.42: The Doe family voter: • Example 2.43: Logic equations for a circuit that adds two 2-bit binary
– Vote for either hamburgers (0) or chicken (1). numbers (A1A0)2 and (B1B0)2, and produces sum bits (S1S0)2 and carry bit C1;
– Majority wins.
– If Mom and Dad agree, they win. A1A0
– John (Dad): A, Jane (Mom):B, Joe: C, Sue: D. + B1B0
– The logic function is: C1S1S0
C
D
f (A, B, C, D)
Chapter 2 73 Chapter 2 74
Synthesis of Combinational Logic Circuits (12) Synthesis of Combinational Logic Circuits (13)
Synthesis
– CAD tools are available for design optimization and transformation of
Design Design Test
optimization database vectors
design from abstract form to a physical realization.
Logic
simulation – Model can represent different levels of design abstraction.
Analysis
Fail Results
?
Pass
Level Abstraction
Realization
Implementation Behavioral Algorithms to be realized
Register Structure of modules
Physical
design
Transfer Data flow among modules and control algorithm
Testing
Test
Gate Structure of primitive logic gates
Transistor Structure of transistors and low-level components
Finished circuit Layout Geometric patterns of materials for IC layout
Chapter 2 77 Chapter 2 78
Computer-aided Design (3) Computer-aided Design (4)
Chapter 2 79 Chapter 2 80
• VHDL behavioral model of a full adder circuit (Figure 2.38) • Structural models of a full-adder circuit:
– Entity defines the interface between the circuit and the outside world. (a) schematic diagram, (b) netlist
– Architecture defines the function implemented within the circuit. a
– Multiple architectures may be defined for a given entity.
I1 x1
b X1 s
I2 X2 O1
cin
I3 I1 IN a
• Structural model a1
I2
I3
IN
IN
b
cin
A1
– Interconnection of components. X1
X2
XOR2 x1
XOR2 s
a
x1
b
cin
– Behavior is deduced from the behavioral models of individual components A2
a2
R1
cout
O2
A1
A2
AND2 a1
AND2 a2
a
a
b
cin
and their interconnection. A3 AND2 a3 b cin
R1 OR3 cout a1 a2 a3
– Represented by: A3
a3 O1
O2
OUT s
OUT cout
• Logic or schematic diagram (a) (b)
• Netlist (textual representation of schematic diagram) – In a netlist, each circuit element is defined as follows:
• HDL description of circuit structures. gate_name, gate_type, output, input1, input2, …, inputN
– VHDL structural model of a full-adder circuit: Figure 2.40.
Chapter 2 81 Chapter 2 82
Computer-aided Design (7) Computer-aided Design (8)
– Mixed-mode model of the full-adder circuit: (a) full-adder block diagram, HDL model Truth tableLogic equations
(b) circuit for sum function, (c) truth table for carry function.
Function Automatic Automatic
library synthesis synthesis Structural models
Carry 1 0 1 1 Schematic
cout 1 1 0 1
module
1 1 1 1 Optimized
Back logic Netlist
annotation equations generation
(a) (c)
a Component
Map design
onto circuit
b s library elements
cin
Circuit
(b) netlist
Chapter 2 83 Chapter 2 84
Parts Library
DRAWING AREA
ZOOM ZOOM
SELECT
OUT
DELETE
and2
and3
or2
draws a logic diagram. COPY MOVE or3
nand2
nand3
PLACE DRAW
COMP NET nor2
nor3
NAMEPARAM xor2
not
OPEN SAVE in
SHEET SHEET out
(a) (b)
(c) (d)
Chapter 2 85 Chapter 2 86
Computer-aided Design (11) Computer-aided Design (12)
Chapter 2 89 Chapter 2 90
Computer-aided Design (15) Computer-aided Design (16)
b
Time a b cin s Time a b cin n1 n2 n3 n4 s
a n1
0 0 0 0 X X X X X c
0 0 0 0 X 1 0 0 0 1 1 X 1 X
n2
b 3 0 0 0 1 2 0 0 0 1 1 0 1 X d
s
3 0 0 0 1 1 0 1 1 e
n3
5 0 1 0 1 5 0 1 0 1 1 0 1 1
cin 10 1 1 0 1 10 1 1 0 1 1 0 1 1
12 1 1 0 1 1 1 1 1
n4 13 1 1 0 0 13 1 1 0 1 1 1 1 0 f
15 1 0 0 1 1 1 1 0 a e
15 1 0 0 0 17 1 0 0 1 0 1 1 0 b
g
g
18 1 0 0 1 18 1 0 0 1 0 1 1 1 d
c f Time t t t
t1 t2 t3 t4
(a) (b)
Chapter 2 91 Chapter 2 92
• Symbolic Logic Signal Values • Signal strengths are used to resolve conflicting gate outputs:
– Designers sometimes need signal values other than just 0 or 1.
– Logic signal values are represented by a state and a strength. output resolved in favor of output value
– A third state X represents an unknown state or a potential problem. stronger signal. unable to be resolved
– Truth tables for three-valued logic (with X added)
VCC
F0 I1 F1
AND 0 1 X OR 0 1 X NOT 0
Ux
0 0 0 0 0 0 1 X 0 1
1 0 1 X 1 1 1 1 1 0 I1 F1
I2
X 0 X X X X 1 X X X F0 R1
F0
F0
– Signal strength values: I2
(b)
F1
• Forcing (F): signal line is strongly forced to a given state. F0
Chapter 2 95 Chapter 2 96
a
a
b
b
c
c tmin
Chapter 2 97 Chapter 2 98
Computer-aided Design (23) Computer-aided Design (24)
• A problem with min/max delay: the results tend to be pessimistic. • Inertial Delay
– An input value must persist for some minimum duration of time to provide
circuit model worst-case delays: the output with the needed inertia to change.
ambiguity region gets larger – The minimum duration is called inertial delay.
at each successive level – Effect of inertial delay:
a f
a a
b h
b b
c
d d c c
e g
e (a) Transport delay model (b) Inertial delay model
g
– Gate model with both inertial delay and transport delay:
h
15
10 1214 16 20 25 t a*
a
c* t c
b t
b*
Inertial Ideal Transport
delay gate delay
Chapter 2 99 Chapter 2 100
Chapter 3
Simplification Goals
Simplification of Switching Functions
• Goal -- minimize the cost of realizing a switching function
• Cost measures and other considerations
– Number of gates
– Number of levels
– Gate fan in and/or fan out
– Interconnection complexity
– Preventing hazards
• Two-level realizations
– Minimize the number of gates (terms in switching function)
– Minimize the fan in (literals in switching function)
Example 3.1 Minimization Methods
Determine the form and the number of terms and literals in each of the following.
• Commonly used techniques
g(A,B,C) = AB + A B + AC – Boolean algebra postulates and theorems
– Karnaugh maps
Two-level form, three products , two sums, six literals.
– Quine-McCluskey method
-------------------- – Petrick’s method
– Generalized concensus algorithm
f(X,Y,Z) = X Y(Z + Y X) + Y Z • Characteristics
– Heuristics (suboptimal)
Four-level form, four products, two sums, seven literals.
– Algorithms (optimal)
• The minimum sum of products (MSOP) of a function, f, is a SOP • Karnaugh maps (K-maps) -- convenient tool for representing switching
representation of f that contains the fewest number of product terms functions of up to six variables.
and fewest number of literals of any SOP representation of f. • K-maps form the basis of useful heuristics for finding MSOP and
• Example -- f(a,b,c,d) = m(3,7,11,12,13,14,15) = ab + acd + acd MPOS representations.
= ab + cd • An n-variable K-map has 2n cells with each cell corresponding to a
row of an n-variable truth table.
• The minimum product of sums (MPOS) of a function, f, is a POS • K-map cells are labeled with the corresponding truth-table row.
representation of f that contains the fewest number of sum terms and • K-map cells are arranged such that adjacent cells correspond to truth
the fewest number of literals of any POS representation of f. rows that differ in only one bit position (logical adjacency).
• Example -- f(a,b,c,d) = M(0,1,2,4,5,6,8,9,10) • Switching functions are mapped (or plotted) by placing the function’s
= (a + c)(a + d)(a + b + d)(b + c + d) value (0,1,d) in each cell of the map.
= (a +c)(a + d)(b + c)(b + d)
Figure 3.1 Venn diagram and equivalent K-map Figure 3.2 Venn diagram and equivalent K-map
for two variables for three variables
A A A A
m B B
A B AB B 0 B
m m m
A B
ABC ABC m2
AB AB AB 2 3 1
m4 m6
ABC ABC m7
ABC ABC m5 m3
(a) (b) (c)
ABC m0 m1
A C ABC
A A
B 0 1 C C
m m 0 2 0 2 (a) (b) (c)
0 2
0
m m 1 3 1 3
B 1 3
B 1
AB
A A
(d) (e) (f) C 00 01 11 10
0 2 6 4 0 2 6 4
A m0 m2 m6 m4 0
B 0 1 AB f(AB) 1 3 7 5 1 3 7 5
0 2 1
00 C m1 m3 m7 m5 C
0
01
1 3
10 B B
1
11
(d) (e) (f)
(g)
Figure 3.3 (a) -- (d) K-maps for four and five variables Figure 3.3 (e) -- (f) K-maps for six variables
AB B
A
CD 00 01 11 10 BCD
C C
0 4 12 8 0 4 12 8 AEF 000 001 011 010 100 101 111 110
00
0 4 12 8 16 20 28 24 0 4 12 8 16 20 28 24
1 5 13 9 1 5 13 9 000
01
1 5 13 9 17 21 29 25 1 5 13 9 17 21 29 25
3 7 15 11 3 7 15 11
D
001
11 F
3 7 15 11 19 23 31 27 3 7 15 11 19 23 31 27
2 6 14 10 C 2 7 14 10
011
10 2 6 14 10 18 22 30 26
E 2 6 14 10 18 22 30 26
B 010
(a) (b)
A
32 36 44 40 48 52 60 56 32 36 44 40 48 52 60 56
ABC
B B 100
DE 000 001 011 010 100 101 111 110
0 4 12 8 16 20 28 24 0 4 12 8 16 20 28 24 33 37 45 41 49 53 61 57 33 37 45 41 49 53 61 57
00
101
1 5 13 9 17 21 29 25 1 5 13 9 17 21 29 25
35 39 47 43 51 55 63 59 A 35 39 47 43 51 55 63 59 F
01
E 111
3 7 15 11 19 23 27 3 7 15 11 19 23 31 27 E
34 38 46 42 50 54 62 58 34 38 46 42 50 54 62 58
11
D
2 6 14 10 18 22 30 26 2 6 14 10 18 22 30 26 110
10
D D
(e) (f)
(c) C (d) C
Plotting (Mapping) Functions in Canonical Form
Figure 3.4 Plotting functions on K-maps
on a K-map
f(A,B,C) = m(0,3,5) = M(1,2,4,6,7)
• Let f be a switching function of n variables where n 6. A
AB
• Assume that the cells of the K-map are numbered from 0 A
C 00 01 11 10
0 2 6 4
to 2n where the numbers correspond to the rows of the 0 1 0 0 0
truth table of f. C C 1
1
0
3
1
7
0
5
1
B B
(c) (d)
Figure 3.5 K-maps for f(a,b,Q,G) in Example 3.4 Figure 3.6 K-map of Figure 3.5(a) with variables
(a) Minterm form. (b) Maxterm form. reordered: f(Q,G,b,a).
a a Q
Q ab Q ab Q
G 00 01 11 10 G 00 01 11 10 G
0 4 12 8 0 4 12 8 ba 00 01 11 10
00 1 1 00 0 0
0 4 12 8
1 5 13 9 1 5 13 9 00 1 1
01 1 1 01 0 0
G G 1 5 13 9
3 7 15 11 3 7 15 11
11 1 1 1 1 11
01 1 1
Q 2 6 14 10 Q 2 6 14 10 3 7 15 11 a
10 1 1 10 0 0 11 1 1 1 1
b 2 6 14 10
b b 10 1 1
(a) (b)
G
Figure 3.7 -- Example 3.6.
Plotting Functions in Algebraic Form
(a) Venn diagram form. (b) Sum of minterms. (c) Maxterms.
BC
B AB
(a)
1 3 7 5 1 3 7 5
C 1 1 C 1 0 0 0
AB
B B
(b) (c)
1 5 13 9 1 5 13 9
AB A AB A
01 0 0 0 01 1
3 7 15 11 D 3 7 15 11 D CD 00 01 11 10 CD 00 01 11 10
11 11 1 1 1 1
0 4 12 8 0 4 12 8
C C
10
2 6
0
14
0
10
10
2
1
6 14 10
1
00 1 00 1 1 1
(B + C + D)
1 5 13 9 1 5 13 9
B B
01 1 1 01 1 1
(a) (b)
3 7 15 11
D 3 7 15 11
D
A
AB AC
BC 11 1 1 11 1 1
CD 00 01 11 10
0 4 12 8 C 2 6 14 10 C 2 6 14 10
00 1 1 1
10 1 10 1 1 1
1 5 13 9
01 1 1 1
3 7 15 11 D
11 B B
C 2 6 14 10
10 1 1 (a) (b)
BCD
B
(c)
Simplification of Switching Functions
Figure 3.10 K-map for Example 3.9
Using K-maps
f(A,B,C,D) = m(1,2,4,6,9)
• K-map cells that are physically adjacent are also logically
adjacent. Also, cells on an edge of a K-map are logically Step 2
A
adjacent to cells on the opposite edge of the map. AB
CD 00 01 11 10
• If two logically adjacent cells both contain logical 1s, the 0 4 12 8
Step 1
two cells can be combined to eliminate the variable that 00 1
Step 3 B
• Each cell of an n-variable K-map has n logically adjacent cells. • An implicant is a product term that can cover minterms of a function.
• Cells may be combined in groups of 2,4,8,…,2k. • A prime implicant is a product term that is not covered by another
• A group of cells can be combined only if all cells in the group have the implicant of the function.
same value for some set of variables. • An essential prime implicant is a prime implicant that covers at least
• Always combine as many cells in a group as possible. This will result one minterm that is not covered by any other prime implicant.
in the fewest number of literals in the term that represents the group. • A set of implicants is said to be a cover of a function if each minterm
• Make as few groupings as possible to cover all minterms. This will of the function is covered by at least one implicant in the set.
result in the fewest product terms. • A minimal cover is a cover that contains the smallest number of prime
• Always begin with the “loneliest” cells. implicants and the smallest number of literals..
Algorithm 3.1 -- Generating and Selecting
Figure 3.11 K-map illustrating implicants
Prime Implicants
AB A
C 00 01 11 10
0
0 2
1
6
1
4
1. Count the number of adjacencies for each minterm on the K-map.
1 3 7 5
C 1 1 1 1
2. Select an uncovered minterm with the fewest number of adjacencies.
B
Make an arbitrary choice if more than one choice is possible.
Minterms: {AB C, A BC, A BC, ABC, ABC} 3. Generate a prime implicant for this minterm and put it in the cover. If
this minterm is covered by more than one prime implicant, select the
Groups of two minterms: {A B, AB, A C, BC, BC}
one that covers the most uncovered minterms.
Groups of four minterms: {B}
Prime implicants: {A C, B} 4. Repeat steps 2 and 3 until all minterms have been covered.
Cover = {A C, B}
MSOP = A C + B
01
1 5
1
13
1
9
01
1 5
1
13
1
9 2. Identify and select all essential prime implicants for the
11
3
1
7
1
15
1
11
D
11
3
1
7
1
15
1
11
D
cover.
C 2 6 14 10 C 2 6 14 10
10 1 1 10 1 1
B B
(a)
A
(b)
A
3. Select a minimum subset of the remaining prime
AB AB
CD
0
00
4
01
12
11
8
10 CD
0
00
4
01
12
11
8
10 implicants to complete the cover, that is, to cover those
00 1 1 00 1 1
01
1 5
1
13
1
9
01
1 5
1
13
1
9 minterms not covered by the essential prime implicants.
3 7 15 11
D 3 7 15 11
D
11 1 1 1 11 1 1 1
C 2 6 14 10
C 2 6 14 10
10 1 1 10 1 1
B B
(c) (d)
Figure 3.14 -- Example 3.12
Figure 3.13 -- Example 3.11
(Illustrates Algorithm 3.2)
f(A,B,C,D) = m(0,5,7,8,10,12,14,15)
f(A,B,C,D) = m(2,3,4,5,7,8,10,13,15) CD
AB
00 01 11
A
10 CD
AB
00 01 11
A
10
0 4 12 8 0 4 12 8
00 1 1 1 00 1 1 1
1 5 13 9 1 5 13 9
01 1 01 1
A A A 3 7 15 11
D 3 7 15 11
D
AB AB AB
11 1 1 11 1 1
CD 00 01 11 10 CD 00 01 11 10 CD 00 01 11 10 C 2 6 14 10 C 2 6 14 10
0 4 12 8 0 4 12 8 0 4 12 8
10 1 1 10 1 1
00 1 1 00 1 1 00 1 1
1 5 13 9 1 5 13 9 1 5 13 9 B B
01 1 1 01 1 1 01 1 1 (a) (b)
3 7 15 11 D 3 7 15 11 D 3 7 15 11 D AB A AB A
11 1 1 1 11 1 1 1 11 1 1 1 CD 00 01 11 10 CD 00 01 11 10
0 4 12 8 0 4 12 8
C 2 6 14 10 C 2 6 14 10 C 2 6 14 10 00 1 1 1 00 1 1 1
10 1 1 10 1 1 10 1 1 1 5 13 9 1 5 13 9
01 1 01 1
3 7 15 11
D 3 7 15 11
D
B B B
11 1 1 11 1 1
(a) (b) (c) C 2 6 14 10
C 2 6 14 10
10 1 1 10 1 1
B B
(c) (d)
AB A
AB A
CD 00 01 11 10
C 00 01 11 10 0 4 12 8
00 1 1
0 2 6 4
1 5 13 9
0 1 1 01 1 1
3 7 15 11
D
1 3 7 5
11 1 1
C 1 1 1 C 2 6 14 10
10 1 1
B B
Figure 3.18 -- Example 3.16
Figure 3.17 -- Example 3.15 Minimizing a five-variable function.
Function with no essential prime implicants.
f(A,B,C,D,E) = m(0,2,4,7,10,12,13,18,23,26,28,29)
f(A,B,C,D) = m(0,4,5,7,8,10,14,15)
A
ABC B B
A A A
AB AB AB DE 000 001 011 010 100 101 111 110
CD 00 01 11 10 CD 00 01 11 10 00 01 11 10 0 4 12 8 16 20 28 24
CD
0 4 12 8 0 4 12 8 0 4 12 8
00 1 1 1 00 1 1 1 00 1 1 1 00 1 1 1 1
1 5 13 9 1 5 13 9 1 5 13 9
1 5 13 9 17 21 29 25
01 1 01 1 01 1
01 1 1
3 7 15 11 D 3 7 15 11 D 3 7 15 11 D
11 1 1 11 1 1 11 1 1
3 7 15 11 19 23 31 27 E
C C C
2 6 14 10 2 6 14 10 2 6 14 10 11 1 1
10 1 1 10 1 1 10 1 1
D 2 6 14 10 18 22 30 26
B B B 10 1 1 1 1
(a) (b) (c)
C C
(a) (b)
• A implicate is a sum term that can cover maxterms of a function. 1. Count the number of adjacencies for each maxterm on the K-map.
• A prime implicate is a sum term that is not covered by another
implicate of the function. 2. Select an uncovered maxterm with the fewest number of adjacencies.
• An essential prime implicate is a prime implicate that covers at least Make an arbitrary choice if more than one choice is possible.
one maxterm that is not covered by any other prime implicate.
• A set of implicate is said to be a cover of a function if each maxterm of 3. Generate a prime implicate for this maxterm and put it in the cover. If
the function is covered by at least one implicate in the set. this maxterm is covered by more than one prime implicate, select the
• A minimal cover is a cover that contains the smallest number of prime one that covers the most uncovered maxterms.
implicate and the smallest number of literals..
4. Repeat steps 2 and 3 until all maxterms have been covered.
Example 3.17 -- Find the minimum POS form of the function
Algorithm 3.4 -- Generating and Selecting f(A,B,C,D) = M(0,1,2,3,6,9,14)
Prime Implicates (Revisited)
AB A AB A
1 5 13 9 1 5 13 9
3 7 15 11
D 3 7 15 11
D
11 1 11 1
MSOP of f.
B B
(a) (b)
Figure 3.20 K-map of f
f = A B + B C D + BCD
f = (A + B)(B + C + D )(B + C + D)
Example 3.19 -- Minimum covers of Figure 3.22 Finding a minimal POS expression
f(A,B,C,D) = M (3,4,6,8,9,11,12,14) and its complement. for a 5-variable function.
A
AB A AB A
ABC B B
CD 00 01 11 10 CD 00 01 11 10
0 4 12 8 0 4 12 8
DE 000 001 011 010 100 101 111 110
00 0 0 0 00 1 1 1 0 4 12 8 16 20 28 24
00 0 0 0 0 0
1 5 13 9 1 5 13 9
01 0 01 1 1 5 13 9 17 21 29 25
D D 01
3 7 15 11 3 7 15 11
11 0 0 11 1 1 3 7 15 11 19 23 31 27 E
C 2 6 14 10
C 2 6 14 10
11 0 0 0
10 0 0 10 1 1 D 2 6 14 10 18 22 30 26
10 0 0 0
B B
(a) (b)
C C
Figure 3.21
B B
(a) (b)
SOP POS
Figure 3.24 K-maps for Example 3.22.
Example 3.23 -- Design a circuit to distinguish
Example 3.23 (concluded)
BCD digits 5 from those 5.
AB A AB A
ABCD Minterm f(A, B, C, D)
CD 00 01 11 10 CD 00 01 11 10
0000 0 0 0 4 12 8 0 4 12 8
0001 1 0 00 d 1 00 0 0 d
0010 2 0
0011 3 0 1 5 13 9 1 5 13 9
0100 4 0 01 1 d 1 01 0 d
A 0101 5 1 D D
Logic 3 7 15 11 3 7 15 11
B 0110 6 1
circuit f 0111 7 1 11 1 d d 11 0 d d
C
D 1000 8 1 C C
2 6 14 10 2 6 14 10
1001 9 1
(a) 10 1 d d 10 0 d d
1010 10 d
1011 11 d
1100 12 d
1101 13 d B B
1110 14 d MSOP(a) (b) MPOS
1111 15 d
Figure 3.26 Use of don’t cares for SOP and POS forms.
(b)
Figure 3.25 -- block diagram and truth table. f(A,B,C,D) = A + BD + BC; f(A,B,C,D) = (A + B)(A + C + D)
Timing Hazards in Combinational Logic Circuits Figure 3.27 (a)--(b) Illustration of a static hazard.
x1 x1
x2
x2
x3
x3
y1
y1
y2
y2
z
Dt Dt Dt z
Time
t1 t2 t3 t4 t5 t6 Dt2 Dt3 Dt2 Dt3
(c) Time
Dt1 Dt3
t1 t2 t3 t4 t5 t6 t7 t8 t9
(d)
x1
x1 x1 G1
z z x2
1 1
x1 z(x1, x2, x3)
G2 G3
x3 x3
x3
1 1 1 1 1 1
x2
x2 x2 G4
(a) (b) x3
Figure 3.30 (a)--(b) Example of a static-0 hazard. Figure 3.30 (c)--(d) Example of a static-0 hazard (con’t).
A A
A
G1
A 0 0 C 0 0
G1
C A
0 0 0 0 G2 0 0 0 0
A z(A, B, C, D) D z(A, B, C, D)
G2 G4 D G4 D
D A
0 0 B G3 0 0
A C C C
B G3
C 0 B 0
C G5
(a)
D
B (c) B
(b) (d)
AB A
CD 00 01 11 10
0 4 12 8
00 1 1 1
1 5 13 9
01 1 1
3 7 15 11
D
11 1
C 2 6 14 10
10 1 1 1
Step 2 -- Generate Prime Implicants (Example 3.24) Step 3 -- Prime Implicant Chart (Example 3.24)
Ö Ö Ö Ö Ö
2 4 6 8 9 10 12 13 15
* * PI1 ´ Ä ´ ´
PI2 ´ ´
PI3 ´ ´
PI4 ´ ´
PI5 ´ ´
PI6 ´ ´
* * PI7 ´ Ä
Step 4 -- Reduced Prime Implicant Chart
The Resulting Minimal Realization of f
(Example 3.24)
Ö Ö Ö Ö
2 4 6 10 f(A,B,C,D) = PI1 + PI3 + PI4 + PI7
PI2 ´ ´
= 1-0- + -010 + 01-0 + 11-1
*PI3 ´ ´
*PI4 ´ ´ = AC + B CD + A BD + ABD
PI5 ´
PI6 ´
AB A
CD 00 01 11 10
Step 1 -- Identify any minterms covered by only one PI.
0 4 12 8 Select these PIs for the cover.
00 1 1 1
Step 2 -- Remove rows covered by the PIs identified in step 1.
1 5 13 9 Remove minterms covered by the removed rows.
01 1 1
D
Step 3 -- If a cyclic chart results from step 2, go to step 5.
3 7 15 11
11 1 Otherwise, apply the reduction procedure of steps 1 and 2.
C 2 6 14 10 Step 4 -- If a cyclic chart results from step 3, go to step 5.
10 1 1 1 Otherwise return to step 1.
Step 5 -- Apply the cyclic chart procedure. Repeat step 5
B until a void chart or noncyclic chart chart is produced. In
Figure 3.33 Grouping of terms. the latter case, return to step 1.
Coverage Example
Reduced PI Charts
f(A,B,C,D) = m(0,1,5,6,7,8,9,10,11,13,14,15)
Ö Ö Ö Ö Ö Ö Ö Ö
5 10 11 13
0 1 5 6 7 8 9 10 11 13 14 15
* * PI1 Ä ´ ´ ´ PI2 ´ ´ Ö Ö
PI2 ´ ´ ´ ´ PI3 ´ ´
5 10
PI3 ´ ´ ´ ´
PI4 ´ ´
PI4 ´ ´ ´ ´ * PI2 ´
´ ´ ´ ´ PI5 ´ ´
PI5 *PI4 ´
PI6 ´ ´ ´ ´ PI6 ´ ´
* * PI7 Ä ´ ´ ´
Ö Ö Ö Ö Ö Ö
2 3 7 10 12 15 27
PI1 ´ ´
PI2 ´ ´
PI3 ´
* * PI4 ´ Ä
* * PI5 ´ Ä
* * PI6 Ä
* * PI7 Ä
Results of Minimization for Example 3.25 Minimizing Circuits with Multiple Outputs
fa fb fg
Ö Ö Ö Ö Ö Ö Ö
0 2 7 10 2 4 5 2 7 8
* * PI1 b Ä ´
* * PI2 a g Ä ´ ´
PI3 g ´
PI4 b ´
* * PI5 a b ´ Ä ´
PI6 b
PI7 b g ´ ´
PI8 g
PI9 a ´
PI10 a b g ´ ´ ´
PI11 b g ´
PI12 a
PI13 a b g ´ ´
Reduced Prime Implicant Chart for Example 3.26 Minimum Realizations for Example 3.26
fa fg
Ö Ö Ö
7 7 8
* PI3 g ´
PI7 b g ´
PI9 a ´
PI11 b g ´
* PI13 a b g ´ ´
Petrick’s Algorithm for Selecting a Minimal Cover
Figure 3.34 Reduced multiple-output circuit.
(Algorithm 3.6)
A B C D
A B C D
1. Find all prime implicants of the function to be minimized.
PI1 2. Construct a prime implicant table and identify and remove
all essential prime implicants and their corresponding rows
fa
PI2 and columns.
fb
PI3 3. Write a POS function that contains a product term for each
minterm left in the reduced prime implicant chart that includes
fg a variable for each prime implicant that covers the minterm.
PI5
Example 3.27 -- Example of Petrick’s Algorithm The Cover Function for Example 3.27
Determine prime
implicant set
PI
101 101
Determine essential 111 111
prime implicants.
Move from PI to EPI.
All
001 011 001 011
Select best term cells Yes (x1, x2, x3) (a, b, c)
from PI and put covered
into EPI by EPI (a) (b)
?
Minimum SOP expression
No (sum of elements of EPI)
Move lowest-cost
1 1 1 1 1 1 Yes prime implicant from
Minimum SOP expression UC = F
(sum of elements of EPI) PI to EPI
D D ?
No
1 1 1 1 No
New
C C Remove redundant EPI
Yes
prime implicants found
from PI ?
A
Logic
BCD inputs B circuit f(A, B, C, D)
C
D
m2 m2
x1
n-to-2n m3 m3
m1
LSB A
MSB xn-1 MSB B
m0
y2n-1 m2
m3
(c)
More complex decoders Example 4.1 -- Realize f(Q,X,P) =
C B A
m(0,1,4,6,7) = M(2,3,5)
A
m0
B
m0 = CBA m1
A
C
m1 = CBA A
m2
m2 = CBA B
m3
A
m3 = CBA A
B
m4
0 0
m4 = CBA
m5
P P
m5 = CBA
C
A
A
A 1 A 1
m6
X X
m6 = CBA B
m7
B 2 B 2
A
Q Q
m7 = CBA
(b) C 3 f(Q, X, P) C 3 f(Q, X, P)
(a)
4 4
m0 m1 m2 m3
5 5
k0 m4 m5 m6 m7
C k1
6 6
2-to-4
m8 m9 m10 m11
7 7
D
k2
MSB
2-to-4
B A
LSB
(c)
Ain Aout
Bin Bout
0 0
SW1 SW2
P P
A 1 A 1
Kin Kout
X X Single
B 2 B 2 channel
(a)
Q Q
C 3 f(Q, X, P) C 3 f(Q, X, P)
Ain Single Aout
channel
4 4
a a
5 5 Bin
Bout
É É
6 6 b b
Kin
Kout
7 7
k k
(b)
(c) (d)
Figure 4.22
Use a 74151A multiplexer to Realize
Four-to-one multiplexer design
f(x1,x2,x3) = m(0,2,3,5)
D0
D1 4-to-1
Multiplexer Y VCC
D2
D3
74151A
B A Y
0 0 D0 D0
0 1 D1 i C B A Y
B A 1 0 D2 D1
Selection code 1 1 D3 x1 x2 x3 f
D2
(a) (b)
0 0 0 0 1 D0 = 1
1 0 0 1 0 D1 = 0 D3
D0 D0 2 0 1 0 1 D2 = 1 D4 Y f(x1, x2, x3)
3 0 1 1 1 D3 = 1 D5 W
D1 D1 4 1 0 0 0 D4 = 0
5 1 0 1 1 D5 = 1 D6
Y Y
D2 D2 6 1 1 0 0 D6 = 0 D7
7 1 1 1 0 D7 = 0 G
D3 D3 C B A
(a)
0 1 2 3
2-to-4
Decoder x1 x2 x3
Selection code
(b)
B A B A
(c) (d)
Figure 4.30
xi yi xi
xi yi ci-1
xi yi ci-1 ci si yi
si
si 0 0 0 0 0
xi yi ci si 0 0 1 0 1
0 1 0 0 1 ci-1
0 0 0 0 FA 0 1 1 1 0
HA 0 1 0 1 yi 1 0 0 0 1
1 0 1 1 0
1 0 0 1 1 1 0 1 0
1 1 1 0 1 1 1 1 1
ci ci
si
(b) (e) ci
ci (d)
si
(a) (c)
(f)
xi
yi si
Figure 4.35 (a) -- (c) ci-1
(g)
xn-1 yn-1 x1 y1 c 0
Let tgate = the propogation delay through a typical logic gate
cn-2 c1 x0 y0
cn-1
Full adder propagation delays
tadd = 3 tgate
zn-1 z1 z0 tcarry = 2 tgate
zn
(end carry)
Ripple-Carry Adder (n-bits)
tadd = (n - 1)2 tgate + 3 tgate
= (2n + 1) tgate
Figure 4.36
SN7482 Two-Bit Pseudo Parallel Adder Module SN7482 Pseudo Parallel Adder -- Truth Table
A2 B2 S2 GND C2 NC NC
14 13 12 11 10 9 8
Inputs Outputs
When C0 = L When C0 = H
B2 S2 C2 A2 A1 B2 B1 C2 S2 S1 C2 S2 S1
A2 L L L L L L L L L H
L L L H L L H L H L
L L H L L H L L H H
S1 L L H H L H H H L L
A1 B1 C0 L H L L L L H L H L
L H L H L H L L H H
L H H L L H H H L L
L H H H H L L H L H
H L L L L H L L H H
1 2 3 4 5 6 7 H L L H L H H H L L
S1 A1 B1 VCC C0 NC NC H L H L H L L H L H
H L H H H L H H H L
(a) H H L L L H H H L L
H H L H H L L H L H
H H H L H L H H H L
Package Pin Configuration H H H H H H L H H H
(b)
SN7482 Pseudo Parallel Adder -- Logic Diagram SN7482 Two-Bit Adder -- Logic Equations
C0
C1 = C0A1 + C0B1 + A1B1 (4.20)
A1
B1
S1
1 = C0C1 + A1C1 + B1C1 + A1B1C0
= C1(C0 + A1 + B1) + A1B1C0
= (C0+A1)(C0+B1)(A1+B1) (C0 +A1+B1) +A1B1C0
= (C0+ A1B1)(A1+B1)(C0 +A1+B1) +A1B1C0 (4.21)
C1 = [C0(A1+B1)+ C0A1B1](A1+B1)+A1B1C0
= C0A1B1+C0A1B1+C0A1B1+A1B1C0
= C0 A1 B1
S2
B2
Similarly
A2
2 = C1 A2 B2
(c)
Add Time for SN7482 Adder Circuits SN7483 Four-Bit Adder Module
B4 S4 C4 C0 GND B1 A1 S1
t1 = 5 tgate
tC1 = 2 tgate S4 C4 C0 B1 A1
t2 = 6 tgate B4 S1
tC2 = 4 tgate A4 A2
S3 A3 B3 S2 B2
SN7482-based ripple-carry adder (n-bits)
C4
Pi = (BiAi)(Ai + Bi)
B4 = (Ai + Bi)(Ai + Bi)
= Ai Bi (4.24)
P4
S4
A4
C3 i = Pi Ci-1
B3
= Ai Bi Ci-1 (4.25)
P3
A3
S3
C1 = [C0(A1B1) + (A1 + B1)]
C2 = [C0(A1B1)](A1 + B1)
B2
P2
= (C0+(A1B1))(A1 + B1)
S2 = C0A1 + C0B1 + A1B1 (4.26)
A2
C1
B1
P1
Similarly
S1
A1
C0
Ci = Ci-1Ai + Ci-1Bi + AiBi
C0
(b)
Add Times for SN7483 Adder Circuits Fully Parallel Three-Bit Adder
c0 = x 0 y0 (4.30)
SN7483 propagation delays s0 = x0 y0
t1 = 3 tgate c1 = x1y1c0’+x1y1c0+x1y1’c0+x1’y1c0
t2 = t3 = t4 = 4 tgate
tC1 = tC2 = tC3 = tC4 = 3 tgate
= x1y1+(x1y1)c0
= x1y1+(x1y1)(x0y0) (4.31)
s1 = x1y1c0
SN7483-based Ripple-Carry Adder (n-bits)
= x1y1 x0y0
tadd = (3m + 1) tgate
c2 = x2y2+(x2y2)c1
where m = n/4. = x2y2+(x2y2)[x1y1+(x1y1)(x0y0)]
= x2y2+(x2y2)(x1y1)+(x2y2)(x1y1)(x0y0) (4.32)
s2 = x2y2c1
= x2y2[x1y1+(x1y1)(x0y0)]
Add Time for a Fully Parallel Adder Carry Look-Ahead Adders -- Basic Idea
Recall that ci = xiyi + xici-1 + yici-1
Assuming a three-level realization = xiyi + xiyici-1 + xiyici-1 + xiyici-1 + xi yici-1
= xiyi + xiyici-1 + xi yici-1
tadd = 3 tgate = xiyi + (xiyi + xi yi)ci-1
= xiyi + (xi yi)ci-1
However, the fan in requirements become impractical
as n increases. Let gi = xiyi [carry generate] (4.33)
Then ci = gi + pi ci-1
si = pi ci-1 (4.38)
c0 = g0 (4.35)
s0 = p 0
c1 = g1 + p1c0 gi pi si c2 c1 c0
(a) (b)
= g1 + p1g0 (4.36)
s1 = p1 c0 x2 y2 x1 y1 x0 y0 0
= g2 + p2(g1 + p1g0) g2 p2
s2
g1 p1
s1
g0 p0
s0
(c)
Figure 4.39
Add Times for Carry Look-Ahead Adders Binary Subtraction Circuits
P = (p3 p2 p1 p0)2
an-1 bn-1 cn-2 cn-1 sn-1 V
4A3A2A 1A 4B 3B 2B 1B
Select
0 0 0 0 0 0
MUX (74157) S
0 0 1 0 1 1
4Y 3Y 2Y 1Y G
0 1 0 0 1 0
A4 A3 A2 A1 B4 B3 B2 B1
0 1 1 1 0 0
C4 ADDER (7483) C0
Select Function
1 0 0 0 1 0
S4 S3 S2 S1
0 R=P+Q 1 0 1 1 0 0
R = (r4 r3 r2 r1)2
1 R=P+Q+1
1 1 0 1 0 1
1 1 1 1 1 0
Figure 4.41
Overflow Detection Circuits an-1 bn-1 an-2 bn-2
FA FA
cn-1 cn-2 cn-3 B
Data acquisition Top level
system
sn-1 sn-2
B1 B2 B3
Input sensor data Compute values Select output Level 2
*
B1 B1 B2 B2 B2 B2
Sensor Sensor A1+ A2Ð Min(A, Max(A, Level
1 2 3 4
A B B B B) B) 3
V (a)
V
(b)
Figure 4.42
Decoders
B1 Ð
Sensor Input B2 Ð
s B1
Computation
Convert
1
A
A
B1
Convert
2
y0
B B
B2
Binar
B2
Binar
LSB x0 y1
1 2
adde
y subtracto
y
r r
1
B23
Compar
B23
Selec
2
B24
Compar
1
B24
Selec
2
x1
e t e t
n-to-2n
B2 B2
Decoder
3 Maximu
4
Minimum m
Functio
selec
n
t
ProcessBcontrol Output s1
B3
system
MSB xn-1
select
s2
Output
(b)
y2n-1
More complex decoders
C B A
Decoder Realization A
m0
B
m0 = CBA m1
A
LSB A LSB A C
A
m1 = CBA
m0 m0 m2
MSB B MSB B
m2 = CBA B
m3
A
m1 m3 = CBA A
m1 m4
B
m4 = CBA
m5
A
m2 C
m2 m5 = CBA A
m6
m6 = CBA B
m7
A
m3 m3 m7 = CBA
(b)
(a)
(a) (b)
m0 m1 m2 m3
m1
k0 m4 m5 m6 m7
LSB A C k1
m0 2-to-4
MSB B D m8 m9 m10 m11
k2
MSB
m2
k3 m12 m13 m14 m15
m3 l2
(c) l1
l0 l3
2-to-4
B A
LSB
(c)
0 0
0 0
P P
P P A 1 A 1
A 1 A 1 X X
X X B 2 B 2
B 2 B 2 Q Q
Q C 3 f(Q, X, P) C 3 f(Q, X, P)
Q
C 3 f(Q, X, P) C 3 f(Q, X, P)
4 4
4 4 5 5
5 5 6 6
6 6 7 7
7 7
(c) (d)
(a) (b)
y0 O0
I0 x0
I1 x1 y1 O1
y2 O2
E
y3 O3
y0 O4
x0
x1 y1 O5
y0
x0 I2 x0
y2 O6
y0 I3 x1 y1 E
y3 O7
x1 y2
y0 1 E
x0 y3
y1
x1 y1 I0 x0
y0 O0
x0
y0 O8
I1 x1 y1 O1 x1 y1 O9
y2 y2 O2 y2 O10
y2 I2 E E
E y3 O3 y3 O11
y3
y0 O4 y0 O12
y3 x0 x0
E x1 y1 O5 x1 y1 O13
(a) (b) E
y2 O6
E
y2 O14
y3 O7 y3 O15
(a) (b)
G1
(6) G2
G1
(4)
G2A Data
0
G2B (5) outputs
(15) Vc
Y0 c Y0 Y1 Y2 Y3 Y4 Y5 Y6
1
(14) 16 15 14 13 12 11 10 9
Y1
2
(13)
Y2
(1) 3
A Y0 Y1 Y2 Y3 Y4 Y5
(12)
Y3
(2) A Y6 4
B Inputs Outputs
(11) G2 G2 VCC
Y4
(3) B C A B G1 Y7 5 24 23 22 21 20 19 18 17 16 15 14 13
C
(10)
Y5
6
(9) A A B C D G2 G1 15 14 13 12
Y6 1 2 3 4 5 6 7 8
G2 G2 7
0 11
(7) A B C A B G1 Outpu
Y7 GND B
Y7 Selec Enabl t
8 1 2 3 4 5 6 7 8 9 10
t e
(b C
(a) )
9
1 2 3 4 5 6 7 8 9 10 11 12
D
Input Output GND
s s '138 10 Outputs
Enabl Selec BIN/
e G2 t OCT (15) (b)
0 (1) 0 (14 Y0
G1 * C B A Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 A A 1 11
1 (2) 1 ) Y1
H L L L L L H H H H H H H B 2 2 2 Y2
B (3) (13)
H L L L H H L H H H H H H C 3 3 3 Y3 12
H L L H L H H L H H H H H C (12)
4 4 Y4
H L L H H H H H L H H H H (11)
H L H L L H H H H L H H 5 (6) 5 Y5
(10) 13
H L H L H H H H H H L H H 6 (4) 6 Y6
G1
G2 7 G1 & 7 (9) Y7
H L H H L H H H H H H L H G2 (5)
A
G2 E (7)
H L H H H H H H H H H H L A 14
´ H ´ ´ ´ H H H H H H H H B G2 N
L ´ ´ ´ ´ H H H H H H H H B
G2* = G2A + 15
G2B (c (d (e
) ) ) AAB B C C DD
(a)
Inputs Outputs
G1 G2 D C B A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
L L L L L L L H H H H H H H H H H H H H H H
L L L L L H H L H H H H H H H H H H H H H H
L L L L H L H H L H H H H H H H H H H H H H
L L L L H H H H H L H H H H H H H H H H H H
L L L H L L H H H H L H H H H H H H H H H H
L L L H L H H H H H H L H H H H H H H H H H
L L L H H L H H H H H H L H H H H H H H H H
L L L H H H H H H H H H H L H H H H H H H H
L L H L L L H H H H H H H H L H H H H H H H
L L H L L H H H H H H H H H H L H H H H H H
L L H L H L H H H H H H H H H H L H H H H H
L L H L H H H H H H H H H H H H H L H H H H
L L H H L L H H H H H H H H H H H H L H H H
L L H H L H H H H H H H H H H H H H H L H H n-Bit address
L L H H H L H H H H H H H H H H H H H H L H S Device 0
L L H H H H H H H H H H H H H H H H H H H L
H L ´ ´ ´ ´ H H H H H H H H H H H H H H H H y0
L H ´ ´ ´ ´ H H H H H H H H H H H H H H H H A0 x0 S Device 1
y1
H H ´ ´ ´ ´ H H H H H H H H H H H H H H H H
A1 x1
É
(c) É É
AnÐ1 xnÐ1
'154 '154
BIN/OCT (1) E
0 (23) 0 (2) 0 y2nÐ1
A 1 A 1 1 (3) 1
2 (22) 2 (4) 2 Device access S Device 2nÐ1
B 3 2 3 (5) 3
4 B (21) 4 control signal
C 4 (6) 4 S = select device
5 5 (7) 5
6 (20) 6 (8) 6
D 7 C 8 7 (9) 7
8 8 8
9 9 (10) 9
D (11) 10
10 10 (13) 11
11 11 (14) 12
12 12 (15) 13
13 13 (16) 14
14 14 (17) 15
15 15
(18)
G1 G1 &
G2 (19)
G2 EN
(d) (e)
0
1 2
2 BCD code
3 0 DCBA Decimal digits
4
5 7408/4 1 0000 0
Z
23
A 6 7 4 0001 1
7 6 f2 = PM(6, 9) 2
22 B 8 D 0010 2
Y 5 Decimal 0011 3
C 9 10 BCD 3
C outputs 0100 4
X
21
D 10 input
11 14 B 4 0101 5
20 12 0110 6
W 13 9
A 5 0111 7
14 17
10
8 f1 = åm(1, 9, 12, 15)
15 12 6 1000 8
13 1001 9
G1 7420/2 7
(a) (b)
18 G2 8
19 9
74154
a a
D D D Ð + + Ð
DC DC DC a a
BA 00 01 11 10 BA 00 01 11 10 BA 00 01 11 10
0 4 12 8 0 4 12 8 0 4 12 8 f f
f b f b
00 1 d 00 d 00 1 d
1 5 13 9 1 5 13 9 1 5 13 9
b g b g
01 d 01 1 d 01 d 1
g Common g Common
3 7 15 11 A 3 7 15 11 A 3 7 15 11 A anode cathode
11 d d 11 d d 11 d d
e e
B 2 6 14 10
B 2 6 14 10
B 2 6 14 10 e c e c
10 d d 10 d d 10 d d
c c
C C C d d
(a) (b) (c) d d
(a) (b)
AB A AB A
CD 00 01 11 10 CD 00 01 11 10
0 4 12 8 0 4 12 8
00 1 0 d 1 00 1 1 d 1
1 5 13 9 1 5 13 9
01 0 1 d 1 01 1 0 d 1
3 7 15 11 D 3 7 15 11 D
11 1 1 d d 11 1 1 d d
C 2 6 14 10
C 2 6 14 10
10 1 0 d d 10 1 0 d d
B B
(a) (b)
A0
x4
0 4 12 8
1
A1
x3 1 5 13 9
x1
A0 1
0 4 12 8 x2 4-to-3 x1
d 1 d 1 A1 3 7 15 11
Encoder
x3
1 5 13 9 A2
0 d d d x4 x2 2 6 14 10
X0
3 7 15 11 x0
A0
X1 4-to-2 d d d d (a)
Encoder x1
x3
X2 2 6 14 10
A1 A1
0 d d d x4
X3
0 4 12 8
(a) x2 X4 X3 X2 X1 A2 A1 A0
1
A1 = X2 + X3
0 0 0 0 0 0 0 1 5 13 9
0 0 0 1 0 0 1
0 0 1 0 0 1 0
3 7 15 11 x1
0 0 1 1 0 0 0
A0
X3 0 1 0 0 0 1 1
X3 X2 X1 X0 A1 A0 0 1 0 1 0 0 0 x2 2 6 14 10
0 0 0 0 d d 0 4 12 8 0 1 1 0 0 0 0
d 0 d 1 0 1 1 1 0 0 0 1
0 0 0 1 0 0
0 0 1 0 0 1 1 0 0 0 1 0 0
1 5 13 9
0 0 1 1 d d 1 0 0 1 0 0 0 x3
0 d d d 1 0 1 0 0 0 0
0 1 0 0 1 0
1 0 1 1 0 0 0 A2
0 1 0 1 d d 3 7 15 11 X0 x4
0 1 1 0 d d 1 1 0 0 0 0 0
d d d d
0 1 1 1 d d 1 1 0 1 0 0 0 0 4 12 8
1 0 0 0 1 1 X1 2 6 14 10 1 1 1 0 0 0 0 1
1 0 0 1 d d 1 d d d 1 1 1 1 0 0 0
1 5 13 9
1 0 1 0 d d
(b)
1 0 1 1 d d
1 1 0 0 d d X2
3 7 15 11 x1
1 1 0 1 d d
1 1 1 0 d d A0 = X1 + X3
1 1 1 1 d d x2 2 6 14 10
(b) (c)
x1 x3
X1
A0 x2
X3
x3 (c)
x4
A0
x1
x2
X2 x3 x1
A1 x4 x2
X3 x3 A2
x1
x2 x4
(d) x3
x4
A1
x1
x2
x3
x4
(d)
A1
x3
0 4 12 8
1 1 1
1 5 13 9
1 1 1 Inputs Outputs
1
x0
3 7 15 11 1 2 3 4 5 6 7 8 9 D C B A
1 1 1
x0 A0 H H H H H H H H H H H H H
x1 4-to-2 A1 x1 2 6 14 10 ´ ´ ´ ´ ´ ´ ´ ´ L L H H L
Priority 1 1 1 2 ´ ´ ´ ´ ´ ´ ´ L H L H H H
x2 encoder ´ ´ ´ ´ ´ ´ L H H H L L L
GS A ´ ´ ´ ´ ´ L H H H H L L H
x3 EO x2 ´ ´ ´ ´ L H H H H H L H L
´ ´ ´ L H H H H H H L H H
A1 = X2 + X3 ´ ´ L H H H H H H H H L L
(a)
´ L H H H H H H H H H L H
3
L H H H H H H H H H H H L
A0 x3
(b)
00 01 11 10
Inputs Outputs 0 4 12 8 4
X3 X2 X1 X0 A1 A0 GS EO
00 1 1
Inputs
Output Outputs
0 0 0 0 0 0 0 1 1 5 13 9
Vcc NC D 3 2 1 9 A
0 0 0 1 0 0 1 0 01 1 1 B
0 0 1 0 0 1 1 0 5
x0
16 15 14 13 12 11 10 9
0 0 1 1 0 1 1 0 3 7 15 11
0 1 0 0 1 0 1 0 11 1 1 1
0 1 0 1 1 0 1 0 x1 2 6 14 10
0 1 1 0 1 0 1 0
0 1 1 1 1 0 1 0 10 1 1 1 6
D 3 2 1 9
1 0 0 0 1 1 1 0
1 0 0 1 1 1 1 0 x2
1 0 1 0 1 1 1 0 4 A
1 0 1 1 1 1 1 0
1 1 0 0 1 1 1 0 A0 = X3 + X1X2
C 5 6 7 8 C B
1 1 0 1 1 1 1 0 7
1 1 1 0 1 1 1 0 (c)
1 1 1 1 1 1 1 0
x1
(b)
x2 8 1 2 3 4 5 6 7 8
4 5 6 7 8 C B GND
A0
x3 D
9 Inputs Outputs
x2
A1 (a) (c)
EO
x0
GS
(d)
0
EO
EI 0 1 2
Inputs
3 4 5 6 7
Outputs
A2 A1 A0 GS EO
K-Channel multiplexing/demultiplexing
GS
H ´ ´ ´ ´ ´ ´ ´ ´ H H H H H
1 L H H H H H H H H H H H H L
L ´ ´ ´ ´ ´ ´ ´ L L L L L H Multiplexer Demultiplexer
L ´ ´ ´ ´ ´ ´ L H L L H L H
L ´ ´ ´ ´ ´ L H H L H L L H
2 L ´ ´ ´ ´ L H H H L H H L H Ain Aout
A0 L ´ ´ ´ L H H H H H L L L H
L ´ ´ L H H H H H H L H L H Bin Bout
L ´ L H H H H H H H H L L H
L L H H H H H H H H H H L H
SW1 SW2
3
(b)
Kin Kout
Single
4 channel
Outputs Inputs
Output (a)
Vcc EO GS 3 2 1 0 A0
A1 16 15 14 13 12 11 10 9 Ain
5 Single Aout
channel
a a
Bin
6 EO GS 3 2 1 0 Bout
b É b É
4 A0
Kin
Kout
5 6 7 El A2 A1
A2 k k
7
(b)
1 2 3 4 5 6 7 8
4 5 6 7 E1 A2 A1 GND
El
(a)
Inputs
(c)
Outputs Figure 4.22
Input First
lines level
I0 D0
I1 D1
Y
I2 D2
D0
I4 D0
D1 4-to-1
Y I5 D1
Multiplexer Y
D2
I6 D2 Second
D3 level
I7 D3
B A Y B A
D0
0 0 D0
0 1 D1 D1 Output line
B A Y Z
1 0 D2
D2
Selection code 1 1 D3
D3
(a) (b)
B A
I8 D0
D0 D0 I9 D1
Y
I10 D2 S3 S2
Selection code
D1 D1 I11 D3
(higher-order bits)
B A
Y Y
D2 D2
D3 D3
I12 D0
0 1 2 3
2-to-4 I13 D1
Y
Decoder
I14 D2
I15 D3
B A
B A B A
(c) (d)
S1 S0
Selection code
(lower-order bits)
Data inputs Data select Inputs Outputs
Strobe
Vcc 4 5 6 7 A B C G1
Select Strobe enable
16 15 14 13 12 11 10 9
C B A G Y W E0
Data Inputs Data select
´ ´ ´ H L H
VCC 8 9 10 11 12 13 14 15 A B C
L L L L D0 D0
L L H L D1 D1 24 23 22 21 20 19 18 17 16 15 14 13 E1
D4 D5 D6 D7 A B L H L L D2 D2
L H H L D3 D3
H L L L D4 D4 E2
E8 E9 E10 E11 E12 E13 E14 E15 A B
D3 C H L H L D5 D5
H H L L D6 D6 E7 C E3
D2 D1 D0 Y W S H H H L D7 D7
E6 E5 E4 E3 E2 E1 E0 S W D
(b) E4
'151A 1 2 3 4 5 6 7 8 9 10 11 12
E5
1 2 3 4 5 6 7 8 0 7 6 5 4 3 2 1 0 Strobe W D GND
Data inputs G Out- Data
3 2 1 0 Y W Strobe GND 1 put select
G E6
Data inputs Outputs 2 (a)
3
(a) Y E7
4
W W
Strobe G 5
E8 Output
enable 6
D0
7 E9
Inputs
G C B A
D1 Strobe
Select Output
E10
D C B A G W
D2 (d)
´ ´ ´ ´ H H E11
L L L L L E0
'151A E1
D3
(7) L L L H L
Output Y G EN L L H L L E2 E12
Output W (11) L L H H L E3
D4 A 0 L H L L L E4
(10) 0 L H L H L E5 E13
B G
D5 (9) 7 L H H L L E6
CÊ 2 L H H H L E7
(4) H L L L L E8 E14
D6 D0 0 H L L H L E9
(3) (5) H L H L L E10
D1 1 Y E15
(2) (6) H L H H L E11
D7 H H L L L E12
D2 2 W
(1) H H L H L E13 A A B BCCDD
D3 3 H H H L L E14
A A B B C C (15) H H H H L E15 A
D4 4
A (14)
D5 5 (b) B
B (13)
D6 6 C
(12)
C D7 7 D (c)
(c) (e)
1C0
Pair 0
2C0
1C1
Pair 1 1C0
2C1 1Y 0
Output
pair 2C0
1C2 2Y Selection code
Pair 2 1C1 2
(BA)2
2C2 1 C0
2C1 2
1Y C1 2
'150 '150 1C3 2 Y
Pair 3 2Y
(9) 2C3 1C2 C2
G EN B
A(LSB) 2 2
E0
2C2 C3
E1 (15) BA
A 0
E2 (14) 1C3
B 0
(13) G 3
E3 C (11) 15 2C3 2
D 3 Selection code
E4 Position (c)
E5 (8) (a) (b)
E0 (7) 0
E6 E1 1
(6)
E7 E2
(5)
2 Strong 1G '15
E8 E3 (4) 3 (10) (enable) 3
W E4 4 W
E9 (3) 1C0 (14)
E5 5 A 0
(2) 0
E10 E6 6 G
(1) (2) 3
E11 E7 7 1C1 Output B 1
(23)
E8 8 Data 1 1Y
E12 (22)
E9 (21) 9
E13 1C2 MUX
E10 10 (1)
(20) 1G (6) EN
E14 E11 11
(19)
E15 E12 12 1C3 1C0 (5)
(18) 0
E13 13 1C1 (4)
(17) 1 (4)
G E14 14 B 1C2 (3) 1Y
(16)
D C B A E15 15 Select 1C3 (15) 2
A
2G (10) 3
(11)
(d) (e) 2C0 2C0 (12)
2C1 (13) (7)
2C2 2Y
2C1
2C3
Data 2 Output
2C2 2Y
2C3
Strobe (e)
(enable) 2G
(d)
Inputs Inputs Inputs Inputs
Output Output Output Output
Vcc Strobe 4ZA 4B 4Y 3A 3B 3Y Vcc Strobe 4ZA 4B 4Y 3A 3B 3Y
16 15 14 13 12 11 10 9 16 15 14 13 12 11 10 9
G 4A 4B 4Y 3A 3B G 4A 4B 4Y 3A 3B
Inputs Output Inputs Output
S 3Y Strobe Select Data S 3Y Strobe Select Data
G S A B Y G S A B Y
1A 1B 1Y 2A 2B 2Y H ´ ´ ´ L 1A 1B 1Y 2A 2B 2Y H ´ ´ ´ L
L L L ´ L L L L ´ L
L L H ´ H L L H ´ H
L H ´ L L L H ´ L L
L H ´ H H L H ´ H H
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
(b) (b)
Select 1A 1B 1C 2A 2B 2Y GND Select 1A 1B 1C 2A 2B 2Y GND
Output Output Output Output
Inputs Inputs Inputs Inputs
(a) (a)
1A 1A
1Y 1Y
1B 1B
2A '15 2A '15
7 7
2Y 2Y
(15) (15)
2B G EN 2B G EN
(1) (1)
A/B G1 A/B G1
3A 3A
(d) (d)
(c) (c)
Source X
D7ÐD0
Source W
D7ÐD0
Use a 74151A multiplexer to Realize
f(x1,x2,x3) = m(0,2,3,5)
8 8
D3ÐD0
D7ÐD4 D3ÐD0
4 4 D7ÐD4 4 4
Figure 4.30
c D0
0 D1 f(a, b, c)
a b f(a, b, c) MUX Inputs C B A Y
c D2 Y VC
0 0 c D0 = c x4 C
1 D3 i X1 X2 X3 X4 f f
0 1 0 D1 = 0
1 0 c D2 = c B A 0 0 0 0 0 1 74151A
1 1 1 D3 = 1 0 0 0 1 1 1 D0 = 1
D0
1 0 0 1 0 1
(a) D1
a b 0 0 1 1 1 1 D1 = 1
2 0 0 0 1 D2
Selection code 1
0 1 0 1 0 X4 D2 = X4 D3 f(x1, x2, x3, x4)
(b)
3 0 1 1 0 0 D4 Y
0 1 1 1 0 0 D3 = 0 D5 W
0 D0 4 1 0 0 0 0 D6
1 0 0 1 1 X4 D4 = X4 D7
1 D1 f(a, b, c) 5 1 0 1 0 0
b c f(a, b, c) MUX Inputs G
a D2 Y 1 0 1 1 0 0 D5 = 0 C BA
0 0 0 D0 = 0 a 6 1 1 0 0 0
D3
0 1 1 D1 = 1 1 1 0 1 1 X4 D6 = X4
1 0 a D2 = a B A 7 1 1 1 0 1 x1 x2 x3
1 1 a D3 = a 1 1 1 1 1 1 D7 = 1 Selection code
8 1
x0 E0 0 x0
7 2
x1 E1 74150 74154 1 x1
Input 6 3
x2 E2 2 x2
D x3
5 4
4
E3 3 x3
E Y0 x4 Single data 5
3
E4
channel (Q) 4 x4
x5 6
Enable 2
E5 5 x5
x6 E6
7
Y0 Y1 1 6 x6
x7 E7 10 8
23 Multiplexer 7
Decoder/ demultiplexer 9 x7
x8 E8 Y
22 18 8 x8
Y1 Y2 x9 E9 10
1-to-n 21 G1 9 x9
Input Outputs x10 E10 11
Demultiplexer
É Y3
x11
20
19
E11
10
11
13
x10
x11
x12 E12 G2 14
x13
18 19 12 x12
m0 m1 m2 m3 E13 15
YnÐ1 x14
17 13 x13
2-to-4 16
E14 16
x15 14 x14
Decoder 9
E15 17
G DC B A DC B A 15 x15
1 2 É S 11 13 14 15 20 21 22 23
16 lines
Selection B A C3
code Selection C2
(a) code C1
(b) C0
5 lines
A2 B2 S2 GND C2 NC NC
14 13 12 11 10 9 8
C0
B2 S2 C2 A1
A2 S1
B1
S1
A1 B1 C0
B4 S4 C4 C0 GND B1 A1 S1
16 15 14 13 12 11 10 9
1 2 3 4 5 6 7
S1 A1 B1 VCC C0 NC NC C1
S4 C4 C0 B1 A1
(a)
B4 S1
Inputs Outputs A4 A2
S3 A3 B3 S2 B2
When C0 = L When C0 = H
A2 A1 B2 B1 C2 S2 S1 C2 S2 S1 S2
B2
L L L L L L L L L H
L L L H L L H L H L 1 2 3 4 5 6 7 8
L L H L L H L L H H A2
L L H H L H H H L L A4 S3 A3 B3 VCC S2 B2 A2
L H L L L L H L H L (a)
L H L H L H L L H H
L H H L L H H H L L
L H H H H L L H L H
H L L L L H L L H H C2
H L L H L H H H L L
H L H L H L L H L H
H L H H H L H H H L
H H L L L H H H L L (c)
H H L H H L L H L H
H H H L H L H H H L
H H H H H H L H H H
(b)
C4
xi yi ci
g2 p2 g1 p1 g0
B4
P4
S4
A4
C3
gi pi si c2 c1 c0
B3
(a) (b)
P3
S3
A3 x2 y2 x1 y1 x0 y0 0
C2
Adder Adder Adder
B2
P2
g2 p2 g1 p1 g0 p0
s2 s1 s0
S2
A2
CLA circuit
C1
B1 c2 c1 c0
P1
S1 (c)
A1
C0
C0
(b)
Inputs Outputs
16 15 14 13 12 11 10 9
P2 G2 Cn Cn+x Cn+y G P or X
G1 Cn+z
P1 G0 P0 G3 P3 P
G or Y
1 2 3 4 5 6 7 8 P3 or X3
G1 P1 G0 P0 G3 P3 P GND G3 or Y3
Inputs Output
(a)
Cn+y
Inputs Output Inputs Output or
P1 or X1
G0 P0 Cn Cn+x G1 G0 P1 P0 Cn Cn+y
Cn+y
G1 or Y1
L ´ ´ H L ´ ´ ´ ´ H
´ L H H ´ L L ´ ´ H
All other ´´ L L H H
combinations L All other combinations L Cn+x
P0 or X0 or
(d) (e) G0 or Y0 Cn+x
Cn or Cn
Inputs Output
G2 G1 G0 P2 P1 P0 Cn Cn+z (g)
L ´ ´ ´ ´ ´ ´ H
´ L ´ L ´ ´ ´ H
´ ´ L L L ´ ´ H
´ ´ ´ L L L H H
All other combinations L
(f)
FA FA É
cnÐ1 cnÐ2 cnÐ3
P = (p3 p2 p1 p0)2
4A3A2A 1A 4B 3B 2B 1B
Select
MUX (74157) S
4Y 3Y 2Y 1Y G
V (a)
A4 A3A2 A1 B4 B3 B2 B1
anÐ1 bnÐ1 anÐ2 bnÐ2
C4 ADDER (7483) C0
Select Function
S4 S3 S2 S1
0 R=P+Q
FA
cnÐ2
FA É
1 R=P+Q+1 cnÐ1 cnÐ3
R = (S4 S3 S2 S1)2
snÐ1 snÐ2
V
(b)
i A1 A0 B1 B0 f1 f2 f3
0 0 0 0 0 0 1 0
1 0 0 0 1 1 0 0
2 0 0 1 0 1 0 0
3 0 0 1 1 1 0 0
f1, A < B 4 0 1 0 0 0 0 1
2 5 0 1 0 1 0 1 0
A 6 0 1 1 0 1 0 0
Magnitude
comparator f2, A = B 7 0 1 1 1 1 0 0
B 8 1 0 0 0 0 0 1
2 9 1 0 0 1 0 0 1
f3, A > B 10 1 0 1 0 0 1 0
11 1 0 1 1 1 0 0
12 1 1 0 0 0 0 1
(a) 13 1 1 0 1 0 0 1
14 1 1 1 0 0 0 1 A1
15 1 1 1 1 0 1 0
f3
(b)
B0 B0 f1
3 7 15 11 3 7 15 11
1 1 1 1
B1 2 6 14 10 B1 2 6 14 10
1 1 1 B0
A0 A0
A1 f2
f3, A > B
0 4 12 8
1 1 1
1 5 13 9
1 1
3 7 15 11 B0
B1 2 6 14 10
1
A0
(c)
Data inputs
Vcc A3 B2 A2 A1 B1 A0 B0
16 15 14 13 12 11 10 9 A3
B3
A3 B2 A2 A1 B1 A0
B3 B0 A>B
A<B A=B A>B A>B A=B A<B
In In In Out Out Out
A2
B2
1 2 3 4 5 6 7 8
A<B
B3 A<B A=B A>B A>B A=B A<B GND
Data In In In Out Out Out A=B A=B
input
Cascade inputs Cascade outputs A>B
(a)
Comparing Cascading A1
inputs inputs Outputs B1
A3, B3 A2, B2 A1, B1 A0, B0 A>B A<B A=B A>B A<B A=B
A3 > B3 ´ ´ ´ ´ ´ ´ H L L A<B
A3 < B3 ´ ´ ´ ´ ´ ´ L H L
A2 > B2
A3 = B3 ´ ´ ´ ´ ´ H L L
A2 < B2
A3 = B3 ´ ´ ´ ´ ´ L H L
A2 = B2
A3 = B3 A1 > B1 ´ ´ ´ ´ H L L
A2 = B2
A3 = B3 A1 < B1 ´ ´ ´ ´ L H L
A2 = B2
A3 = B3 A1 = B1 A0 > B0 ´ ´ ´ H L L
A2 = B2
A3 = B3 A1 = B1 A0 < B0 ´ ´ ´ L H L A0
A2 = B2
A3 = B3 A1 = B1 A0 = B0 H L L H L L B0
A2 = B2
A3 = B3 A1 = B1 A0 = B0 L H L L H L
A2 = B2
A3 = B3 A1 = B1 A0 = B0 L L H L L H
A2 = B2
A3 = B3 A1 = B1 A0 = B0 ´ ´ H L L H
A2 = B2
A3 = B3 A1 = B1 A0 = B0 H H L L L L
A2 = B2
A3 = B3 A1 = B1 A0 = B0 L L L H H L
(b) (c)
0 1 0
c3 c2 c1
B0
A0
B1
A1
B2
7485
A2
B3
A3
f3 f2 f1 ai bi
Cascaded inputs
c3 c2 c1 Ci CiÐ1
B4 S2
A4 ALU
S1
B5 S0
7485 B6
A5
7485
4 A6
fi
Data A B7
(a)
c1 A7
A<B f1 A<B f3 f2 f1
Cascade c2 anÐ1 bnÐ1 a1 b1 a0 b0
A=B f2 A=B Cascaded inputs
inputs c3 CnÐ1 CnÐ2 C1 C0 CÐ1
A>B f3 A>B c3 c2 c1
Data B
B8 C-GEN
4 A8 ALU ALU ALU
B9
(a)
B10
A9
7485 S2
A10 S1
S0
B11
A11 f3 f2 f1 fnÐ1 f1 f0
c3 c2 c1
B12
A12
B13 f1 A<B
A13
B14
7485 f2 A=B
A14 f3 A>B
B15 Circuit
A15 outputs
(b)
ai bi
CiÐ1 x1 x0
s
x y x y cin
LU AU
cou
f t f
S1
S0
Ci
fLUi fAUi
x1 x0
MUX s S2
y
y
fi
S1 S0 x y FLU
x y 0 0 0 0 0
0 0 0 1 0 x AND y
0 0 1 0 0
0 0 1 1 1
0 1 0 0 0
0 1 0 1 1 x OR y
0 1 1 0 1
0 1 1 1 1 S1 S0 bi yi
1 0 0 0 1
x0 x1 x2 x3 0 0 0 0 Add
1 0 0 1 1 NOT x
s0 S0 0 0 1 1
MUX 1 0 1 0 0
0 1 0 1 Subtract
s1 S1 1 0 1 1 0
y 0 1 1 0
1 1 0 0 0
1 0 0 0 Increment
1 1 0 1 1 x XOR y
1 0 1 0
1 1 1 0 1
1 1 0 1 Decrement
1 1 1 1 0
f 1 1 1 1
(a) (b) (a)
x y bi
S1S0
s1 S1
s1s0 bi 00 01 11 10
s0
0 2 6 4
xy 00 01 11 10
0 0 1 1 0
0 4 12 8
00 0 0 0 1 1 3 7 5
S0
1 1 0 1 0
1 5 13 9
01 0 1 1 1
(b)
3 7 15 11
11 1 1 0 0
yi
2 6 14 10
(c)
10 0 1 1 0
(c)
f
(d)
ai bi
Y-GEN
S1
S0
S1 S0 CÐ1
0 0 0 Add
0 1 1 Subtract
1 0 1 Increment
1 1 0 Decrement
(a) CiÐ1
S1
S0 0 1
0 2
0 0 1 CÐ1
1 3
1 1 0 LU
S1 S0
(b) (c) fLU FA AU
i
fAU
Ci i
S2
MUX
f
i
Storage
Adder register
Module: SR
Keypad
input
Module: FA4
Display
driver
Module: FA1
gnd
a
s
a0
add0
s0 b
a1 Module: cou
FA1 t
a2
cin
a3
add1 (a)
s1
Module:
FA1 Hierarchical
FA4
Module connectors
design
add2 s2
Module: a
x1
FA1 b X1 s
b0 X2
cin
b1
b2 add3 s3 a1
Module: A1
b3
FA1
cou
a2 t
A2 R1
N,C.
a3
A3
a (b)
x1
b X1 s
X2
cin
FA1
a1 Module
A1
design
cou
a2 t
A2 R1
a3
A3
(a)
S(3:0)
Pin S(3:0)
s(3:0) 0000 1011 0111
B(3:0)
Pin B(3:0)
FA4
0 5 10 15
(b) Time
(b)
Chapter 6 -- Introduction to Sequential Devices The Sequential Circuit Model
x1 z1
Combinational
xn logic zm
(a)
x1 z1
xn Combinational zm
logic
y1 yr Yr Y1
Memory
(b)
Figure 6.1
Y
x/z
Input/output
y Y/z 1/0
0/0
1/0
Present state y 0/0
Next
state/output
(a) (b) B D
1/1
0/1
x/z
(b)
Figure 6.2
Figure 6.3
Latch and Flip-flop Timing TTL Memory Elements
Set
Reset
(a)
Set
Reset
Clock
(b)
Figure 6.4
0
1
Q
S 0 0
(a)
0 1
0 1 1 1 0 0 1
R=0 R=1
0
0 0 Q 1 Q 0 Q 1
Q
0
Q
0 S 0 S 1 S 1
(b) (c)
(a) (b) (c) (d)
1 Q
0 1
R=0 Q
0 R
Figure 6.5 Q
(d) (e)
Figure 6.6
Set-Reset Latch (SR latch) NAND SR Latch
S S=0 S=1
S
N1 Q Q
Q Q
N1 N1
S N2 Q S N2 Q
R
(a) (b) R N2 Q R=0 R=1 Q
R
(a) (b)
S
N1 Q
S Q S
Q
R Q
N2 Q
R
Q
(c) (d) R
(c)
S Q S Q
Figure 6.7
R Q R Q
(d) (e)
Figure 6.8
R
Q S
tPLH
Q
(S to Q)
R tPHL
Set Reset Set Illegal tPLH (R to Q)
inputs
(N 2)
Unknown values Q
(a) tPHL
(N 2) tPLH
S (N 1)
Q
R tPHL
Q (N 1)
Q
Figure 6.9
SR Latch Characteristics SN74279 Latch with Two Set Inputs
0d SR d0
10
0 1
Excitation Present Next
01
inputs state state
S R Q Q* (b) S1
S2 Q
0 0 0 0 No change S1
SR S
0 0 1 1
0 1 0 0 Reset S2 Q
Q 00 01 11 10
0 1 1 0
1 0 0 1 Set 0 0 0 Ð 1
1 0 1 1
1 1 0 ´ Not allowed
1 1 1 ´
R
Q 1 1 0 Ð 1 Q
(a)
R
R
(a) (b)
(c)
Figure 6.11
Figure 6.12
Q* = S + RQ
R Q
(d)
Figure 6.14
Q* = DC + CQ
D
D may not
change Setup time Hold time
violation violation
C
D
th
(hold) th
C
Q tsu tsu
(setup)
Enabled Enabled Q
Enabled
Hold tw
Hold Unknown state
Minimum enable
pulse width
Figure 6.17
Figure 6.18
Propagation Delays and Time Constraints
The SN74LS75 D Latch
for the SN74LS75
D CD D 0
0
C Q C Q
Q Q
1
CQ
(a) (b)
D D
1
C Q C
0 Q
0
Q Q*
Dt
(c) (d)
Figure 6.19
PRE (or S)
D D
C
C
C1 S and R may
Q C2 Q Master gated hold gated hold gated hold gated hold not change
Q
Q
Slave hold gated hold gated hold gated hold gated
R
S
S
tsu
CLR (or R) (setup)
R
(c) (d) C
th
QM (hold)
Q tw tw
C high pulse width
Figure 6.20 C low pulse width
(master enabled) (slave enabled)
(d)
Flip-flop output can change
Q* = DC + CQ + DC (c)
Figure 6.20
SR Master-Slave Flip-Flop Characteristics Master-Slave D Flip-Flop
S R Q C Q* Master Slave
QM
0 0 0 0 No change D D Q D Q Q
0d SR 0d
0 0 1 1
D Q
0 1 0 0 Reset 10
C Q C Q Q
0 1 1 0 0 1
1 0 0 1 Set 01 C Q
1 0 1 1 C
(b)
1 1 0 ´ Not allowed (clock) (a) (b)
1 1 1 ´
(a)
Figure 6.23
Figure 6.22
Q* = S + RQ
(c)
(c)
Figure 6.25
Figure 6.24
Q* = KQ + JQ
Q* = D
Pulse-Triggered JK Flip Realization The SN7476 Dual Pulse-Triggered JK Flip-Flop
'76
(2)
1PRE S
(4) (15)
1J 1J 1Q
(1)
1CLK C1
KQ (16) (14)
PRE 1K 1K 1Q
K J (3)
Q* Q Q 1CLR R
D Q Q J Q C
J Q Q (7)
C K 2PRE
CLR (9) (11)
JQ Q 2Q
C Q K Q 2J
(6)
C (a) 2CLK
(12) (10)
2K 2Q
(b) (8)
(a) 2CLR
(b)
'74
PRE (4)
1PRE S
(5)
1CLK
(3)
C1 1Q Inputs Outputs
(2)
1D 1D
CLR Q
PRE (1) (6) PRE CLR D CLK Q Q Mode
1CLR R 1Q
Q Q
(10) (9)
L H ´ ´ H L Set
´ ´
Q Q
Q CLR
2PRE
(11)
2Q H L L H Clear
CLK
2CLK
(12) (8) L L ´ ´ H H Not allowed
(b) 2D
(13)
2Q
H H H H L Clocked operation
D
2CLR
H H L L H Clocked operation
(a) (c) H H ´ L Q0 Q0 Hold
Figure 6.28
Figure 6.29
SN7474 Flip-Flop Timing Specifications SN74175 Positive-Edge-Triggered D Flip-Flop
(4) (2)
1D D Q 1Q
To Output Q CK (3)
Delay Parameter Value (ns) Q 1Q
from: CLEAR
Clock tPLH 25
D should be stable tPHL 40
(5) (7)
PRE tPLH 25 2D D Q 2Q
CK (6)
th tPHL 40 Q 2Q
th CLR tPLH 25 CLEAR
D
tsu tPHL 40
tsu
(12) (10)
(b) 3D D Q 3Q
C CK (11)
Q 3Q
CLEAR
Input Minimum
Q Pin Constraint Value (ns)
tPHL tPLH D tsu 20 (13) (15)
4D D Q 4Q
D th 5 (9) CK (14)
Clock tw low 30 CLOCK Q 4Q
(a) CLEAR
Clock tw high 37 (1)
CLR tw low 30 CLEAR
PRE tw low 30 (a)
(c)
Figure 6.31 (a)
Figure 6.30
1D 2D 3D 4D 5D 6D 7D 8D Q Q
(3) (4) (7) (8) (13) (14) (17) (18)
(11)
CLOCK
1D 1D 1D 1D 1D 1D 1D 1D
C1 C1 C1 C1 C1 C1 C1 C1 CLR
R R R R R R R R
(1)
CLEAR K J
(2) (5) (6) (9) (12) (15) (16) (19)
1Q 2Q 3Q 4Q 5Q 6Q 7Q 8Q
(b)
CLK
VC
C
0 T 0
T Q Q*
1
PRE PRE 0 1 Toggle
J 0 1
Q Q 1 0 Toggle
T C 1
Q Q
K (a) (b)
CLR CLR
Figure 6.34
(a) (b)
Q* = Q
Figure 6.33
Clocked T Flip-Flop Excitation Table for Clocked T Flip-Flops
T Q C Q*
0 0 ¯ 0 Hold
PRE
T J
PRE
0 1 ¯ 1
T Q Q
C Q
C
Q
1 0 ¯ 1 Toggle
CLR
K
CLR
1 1 ¯ 0
(a) (b)
Figure 6.36
The Clocked T Flip-Flop Timing Diagram Summary of Latch and Flip-Flop Characteristics
Clock e
Dt
Q Q Tc
Tc
T T
Clock
Q Q
Q
(a)
Q
(b)
Figure 6.37
SE555 Precision Timing Module Astable Operation of The SE555
VCC
Reset
VCC
Control
SE 555 0.01mF
R
C1 R1 5 8
Threshold Q RA RL
R 1 Output Cont VCC
S 4
R RESET
7
C2 DISCH 3
6 Out
Trigger RB THRES Square wave
2
R TRIG
Comparator
Q1 Discharge C
GND
Ground
1
SE 555
VCC
Input
x
PROM 1 PROM 2
0.01 mF
Next Y
state
5 8
RA RL Register
Cont VCC Output
z
4
RESET Present state y Clock
7 (a)
DISCH 3 Input
6 Out Output
THRES Present x
state Contents
2
Trigger TRIG PROM Address PROM 1 PROM 2
x y Y z
SE 555
C 3.3-ms pulse if
GND
RA = 3 kOhm and C = 1 mF
1
y Y/z
Next state/
output
Figure 6.40 (b) (c)
Figure 6.41
PROM-based Sequential Circuit Example Prime Number Sequencer
256 x 8 PROM
0
x 1
0 1 0 1 2 0 0 0 0 0 0 1 1
y 2y 1 0 1 x 3 0 0 0 0 0 1 0 1
00 10/1 00/1 1 1 1 0
01 11/0 11/1 4
10 01/1 00/0 2 0 1 1 5 0 0 0 0 0 1 1 1
11 00/0 11/0 6
3 0 0 0
Y2Y1/z 7 0 0 0 0 1 0 1 1
y2 4 0 0 1 8
(a) 9
y1 5 1 1 1
10
6 0 0 0 11 0 0 0 0 1 1 0 1 Figure 6.43
12
7 1 1 0
13 0 0 0 1 0 0 0 1
Y2 Y1 z
x y2 y1 Y2 Y1 z 14
0 0 0 1 0 1
0 0 1 1 1 0 D D
0 1 0 0 1 1 C C 251 0 0 0 0 0 0 1 0
0 1 1 0 0 0 252
1 0 0 0 1 Q Q
0 253
1 0 1 1 1 1
254
1 1 0 0 0 0
255
1 1 1 1 1 0 Clock
(b) (c)
1D 2D 3D 4D 5D 6D 7D 8D
Clock
1Q 2Q 3Q 4Q 5Q 6Q 7Q 8Q
Figure 6.41 SN74273 Clock
(8 D flip-flops)
Shift
control
pulse
(a)
Shift
(b)
Generic Shift Register SN74164 Serial-in, Serial-out Shift Register
Parallel in (Y)
Parallel out (X) (9)
Clear
(8)
Clock
Serial in n-Bit shift Serial out
(1)
register Serial A Clear Clear Clear Clear Clear Clear Clear Clear
R R R R R R R R
inputs B QA QB QC QD QE QF QG QH
(2) CK CK CK CK CK CK CK CK
S QA S QB S QC S QD S QE S QF S QG S QH
Preset control
(3) (4) (5) (6) (10) (11) (12) (13)
Shift pulse Output Output Output Output Output Output Output Output
QA QB QC QD QE QF QG QH
Clear control (a) (Serial output)
(a)
Clear
Parallel in (Y) Parallel out (X) Serial A
inputs B
Clock
QA
Serial out Serial in n-Bit shift
n-Bit shift QB
register register
QC
Outputs QD
QE
Preset control QF
Shift pulse Shift pulse QG
SN74164 Function Table and Package SN74165 8-bit Serial-In, Serial-out Shift register
Parallel inputs
A B C D E F G H
(1) (11) (12) (13) (14) (3) (4) (5) (6)
Shift/Load
(15)
Clock inhibit
Clock
(2)
S (9)
1 14
S S S S S S S
A VCC CK CK CK CK CK CK CK CK
QH
(10) (7)
Serial D D D D D D D D QH
Inputs Outputs B 2 13 QH R R R R R R R R
Clear Clock A B QA QB É QH
QA 3 12 QG
L ´ ´ ´ L L L
H L ´ ´ QA0 QB0 QH0 QB 4 11 QF
H - H H H QAn QGn (a)
H - L ´ L QAn QGn
H - ´ L L QAn QGn QC 5 10 QE A
(1) (11)
Shift/Load
QD 6 9 Clear
QA0, QB0, QH0 = levels of QA, QB, QH, respectively,
before the indicated steady-state input conditions are established.
QAn, QGn = levels of QA, QG, respectively, before the most GND 7 8 Clock
(15)
recent - transition of the clock (1-bit shift) Clock inhibit
Clock
(2)
(c) (d) S
CK
(10)
Serial D
R
(b)
(c)
SN74165 Timing Diagram Parallel Accumulator
Clock
xn x2 x1
Clock inhibit
L
...
Serial input
Shift/load
H FA FA HA
A
L
B
C H
L
D
Data Q D Q D Q D
E H
F L
CK ... CK CK
H CLR CLR CLR
G
H H ... Clear
H H L H L H L H
Accumulate
Output QH
L L H L H L H L zn+1 zn z2 z1
Output QH (b)
Serial shift
Load
Inhibit
(d)
CK
(3)
Data A K
...
(13)
J Q QB
Q J Q J Q J Q J 1 CK
Overflow
(4)
CK CK CK CK Data B K
(2)
Q K Q K Q K Q K Clock
(11)
Xn X3 X2 X1 J Q QD
0 0 0 0 CK
0 0 0 1 (6)
Data D K
0 0 1 0
(1)
0 0 1 1 Clear
0 1 0 0
(7)
ENP
ENT (15)
1 1 1 0 (10) RCO
1 1 1 1
Recycles
0 0 0 0 (a)
0 0 0 1
0 0 1 0 Inputs
Clear Load ENT ENP Mode
(b) L ´ ´ ´ Synchronous clear
H L ´ ´ Synchronous load
H H H H Count
H H L ´ Hold
H H ´ L Hold
(b)
SN74163 Timing Diagram Asynchronous Down Counter
Xn ... X3 X2 X1 Xn ... X3 X2 X1
Clear
1 ... 1 1 1 0 ... 0 0 0
Load
0 ... 0 0 0 1 ... 1 1 1
0 ... 0 0 1 1 ... 1 1 0
A
0 ... 0 1 0 1 ... 1 0 1
Data B 0 ... 0 1 1 1 ... 1 0 0
inputs
C 0 ... 1 0 0 1 ... 0 1 1
Up count mode Down count mode
D
Clock (a)
ENP Xn X2 X1
ENT
QA
QB
Outputs
QC
... Count
QD
RCO Q J Q J Q J
12 13 14 15 0 1 2
Sync
clear
Count Inhibit CK ... CK CK
Sync
load Q K Q K Q K
... Clear
(b)
(a) (b)
SN74160 Logic Diagram SN74160 Timing Diagram
(9)
Load
(14)
J Q QA
Clear
CK
(3) Load
Data A K CLR
J Q
(13)
QB Data B
inputs C
CK
(4) D
Data B K
CLR
(2) Clock
Clock
ENP
(12)
J Q QC ENT
CK QA
(5)
Data C K QB
CLR
Outputs
QC
(11)
QD
J Q QD
CK RCO
(6) 7 8 9 0 1 2 3
Data D K
CLR
Q Async
(1) clear Count Inhibit
Clear
Sync
(7) load
ENP
ENT (d)
(10) (15)
RCO
(c)
Count
S S S S
Q J Q J Q J Q J
CK CK CK CK Clock
Q K Q K Q K Q K
R R R R
1 Pulse/hour 1 Pulse/minute
Clear ¸6 ¸ 10 ¸6 ¸ 10
(a)
0 Clear
1
0 2
10
Start/Stop
8 ¸5 ¸ 12
3
9 2
Pulse
0 generator 1 Pulse/second
8 4
0
7
5 Power line
4 6
6
4
(b) Figure 7.22
SN7492A Asynchronous Counter SN7492A Timing Diagram
(12)
J Q QA
Clock B 1 14 Clock A
(14)
Clock A CK
NC 2 13 NC
K
NC 3 12 QA
NC 4 11 QB Clock B
(11)
J Q QB
VCC 5 10 GND
Clock B
(1)
CK
R0(1) = R0(2)
RO(1) 6 9 QC
K QB 0 1 0 0
RO(2) 7 8 QD
(a) (9) QC 0 0 1 0
J Q QC
'92 CK JB = QC 1 1 0 1
(6) & CTR
RO(1) K
(7) CT = 0
Q KB 1 1 1 1
RO(2)
JC = QB 0 1 0 0
(8)
(14) J Q QD
DIV 2 (12) KC
ClockA + QA
CK 1 1 1 1
DIV 3 11
(1) 0 QB
ClockB + CT (9) K (d)
1Z4 QC
(6)
(8) R0(1)
DIV 2
4+ QD R0(2)
(7)
(b) (a)
13
3
2
12
Count
4
control
10
11 S S S
5 Q J Q J Q J
10 CK CK CK Count
8
4 pulse
9
0 Q K Q K Q K
8
(e)
R R R
8
12 1
0 2
0
14
12
6
10 4
9 8
0
(f)
SN74293 Asynchronous Binary Counter Modulo-13 Counter Design -- Example 7.1
74293
Clock Input A QA
(9)
J QA QA Input B QB
0
(10) QC
Input A CK 8 0 1
2 QD
K 12 R0(1)
3 R0(2)
14 2 7411/3
(5)
J QB QB
15 7432/4
(11) 0
Input B CK
4
K 14
Clear
(a)
5
(4) 12 13 0
J QC QC 13 4 1
0 2
CK
6
12
K 12 8
3
8 10 2
7
11 11
(8) 10
J QD QD 6 0
4
CK 4
10
10
0
K 9 8
5
(12) 8 8
R0(1) 9
R0(2) 6
(13) 8 4
7
(a) (b)
0 6
4
(b)
x1 z1
...
...
xn Combinational zm
logic
y1 ... yr Yr ... Y1
Memory
Clock
Figure 8.1
Mealy Machine Model Mealy Machine Timing Diagram -- Example 8.1
A
1/1 1/0
0/1
0/0 0/0 1/0
B C T0 T1 T2 T3 T4 T5
X/Z
(a)
Clock
State A B A C A C A
Clock
Y/0 Y W X X Y X
State W
(a) 0 0 0
Input x 1 1 1
Output z 0 0 0 1 1 0
Present Input x
state 0 1 Outputs
W Y X 0
X X Y 1
Y X W 0
Figure 8.5
(b)
Figure 8.4
Analysis of Sequential Circuit State Diagrams --
Timing Diagram for Example 8.3
Example 8.3
x/z
0/0 1/0 1/1 Clock
x 0 0 1 1 1 0 1 1 0 0
y1 0 0 0 0 0 0 1 1 1 0
1/0 0/0 y2 0 0 0 1 1 1 1 1 1
0
00 01 11 z 0 0 0 0 0 0 1 1 0 0
0/0
Figure 8.7
Figure 8.6
Analysis of Sequential Circuit Logic Diagrams Timing Diagram for Figure 8.8 (a)
Combinational logic
Clock
y Y x 0 1 1 0 1 0 0 0
Q D
y
Q C Clock y 0 0 1 0 0 1 1 1
Memory
(a)
Y=D 0 1 0 0 1 1 1 1
Dt
z 0 0 1 0 0 0 0 0
D
e
0 1 2 3 4 5 6 7 8 t/Dt
C
Glitch
Q
Figure 8.8
State Table and State Diagram for Figure 8.8 (a) K-Maps for Circuit of Figure 8.8 (a)
Figure 8.11
Figure 8.10
z
x
Clock
x 0 1 1 0 1 0 0 0
y 0 1 0 0 1 0 1 1
T
y z 0 1 0 0 1 0 0 0
Q T
y 0 1 2 3 4 5 6 7 8
Q C Clock
Figure 8.13
Figure 8.12
State Table and State Diagram for Example 8.4 K-Maps for Example 8.4
xk xk xk
0 1 0 1 0 1
xk xk xk 0 0 0 0 1 0 0 1* 0
yk 0 1 yk 0 0 1 Present 0 1 yk yk yk
state 1 0 1 1 0 1 1 1 0*
1 1/0 0/0 A B/0 A/0
k k k+1
0 1 1/0 0/1 B B/0 A/1 z T y
(a) (b) (c)
yk + 1/zk yk + 1/zk Next state/output
(a) (b) (c)
x/ xk
0 1
z
1/0 0 1/0 0/0
0/0
yk
A B
1 1/0 0/1
1/1 0/0
k+1
(d) y /zk
(d)
Figure 8.14
Figure 8.15
y1 J1 = xy2
J1 Q
K1 = x
C
J2 = x
K1 Q K2 = x + y1
y1
z = xy1 y2 0 0 0 0 0 1 0 0
x (a)
x
y1 y2 0 1
J2 Q y2
00 00/0 01/0
C
01 00/0 10/0
K2 Q y2
11 00/0 11/1
10 00/0 11/0
Clock
(b)
11 0 1 11 1 0 11 0 1
10 0 1 10 1 0 10 0 0
Figure 8.19
J2 K2 z
Figure 8.18
x x x
y1 y2 0 1 0 1 y1 y2 0 1
y1 y2
x
00 0 0 00 0 0 00 0 1 y1
A B 0 1 Q D1
1/1 0/- 0/0 y1
01 0 1 01 0 1 01 0 1 Q C
A B/- -/1
1/-
0/- 1/1 B B/0 C/1 11 0 0 11 0 1 11 1 0
y2
Q D2
C C A/- A/- y2
10 1 0 10 1 1 10 1 0 Q C Clock
Figure 8.20
Figure 8.21
Generating the JK Flip-flop Excitation Maps --
Flip-flop Input Tables -- Example 8.6
Example 8.7
State Required State Required x x x
transitions inputs transitions inputs y1 y2 0 1 y1 y2 0 1 y 1 y2 0 1
1 1 0 1 1 d 0 J1 K1 J2 K2
(c) Clocked T flip-flop (d) Clocked JK flip-flop (c) Excitation maps
z x x
y1 y2 0 1 y1 y2 0 1
00 0 0 00 0 1
01 0 1 01 0 1
y2
y1 11 0 1 11 1 0
Q J1
C
y1
y1 10 1 1 10 1 0
Q K1
y2
Q J2
Y1 Y2
C
y2
Q K2
Figure 8.25
Clock
Figure 8.24
Sequence Recognizer for 01 Sequence --
Synthesis of the 01 Recognizer with SR Flip-flops
Example 8.9 x x x
0 1 yk 0 1 yk 0 1
A B/0 A/0 0 1 0 0 0 0
B B/0 A/1 1 1 0 1 0 1
1/0 1/0 0/0 yk + 1 z
(a) State table (b) Transition table and output map
A A B
x x x S Q yk
yk 0 1 yk 0 1 C
(a) (b) R Q
0 1 0 0 0 d
1 d 0 1 0 1
Clock
S R
(c) Excitation maps
1/0 0/0 0/0 1/0 0/0 0/0 z
(d) Logic diagram
A B A B
1/1 Clock
x 0 1 01 01
(c) (d) S=x 1 0 0 0 1 0 1 1 0 0 0
R=x 0 1 1 1 0 1 0 0 1 1 1
y
z
Figure 8.26 (e) Timing diagram
Figure 8.27
0 1 0 0 d d 01 00 10 01 0 0
11 00 11 11 0 1
1 d d 1 0 1
10 00 11 10 0 0
J K
k+1 k+1
(c) Clocked JK excitation maps y1 y2 z
(c) Transition table (d) Output map
Figure 8.28
Figure 8.29
Clocked T and JK Realizations of the 1111
SR Realization of the 1111 Recognizer
Recognizer
x x x x
y1ky2k y1ky2k
y 1 ky 2 k 0 1 y 1 ky 2 k 0 1
0 1 0 1
00 0 0 00 0 1
00 0 0 00 d d
01 0 1 01 1 1
01 0 1 01 d 0
11 1 0 11 1 0
11 0 d 11 1 0 10 1 0 10 0 1
T(a) T
1 Clocked T excitation maps 2
10 0 d 10 1 0
x x x x
y1ky2k y1ky2k y 1k y 2k y 1k y 2k
S1 R1 0 1 0 1 0 1 0 1
00 0 0 00 d d 00 0 1 00 d d
x x 01 0 1 01 d d 01 d d 01 1 1
y1ky2k 0 1 y 1 ky 2 k 0 1
11 d d 11 1 0 11 d d 11 1 0
00 0 1 00 d 1
10 d d 10 1 0 10 0 1 10 d d
01 0 0 01 1 1
J1 K J K2
(b)1 Clocked JK excitation maps 2
11 0 d 11 1 0 x x
y1 y2 0 1 y1 y2 0 1
10 0 1 10 d 0 00 0 0 00 0 1
S2 R2 01 0 1 01 0 0
y2
11 0 1 11 0 1
y1
10 0 1 10 0 1
Figure 8.30 Y1 Y2
(c) Excitation K-maps
Figure 8.31
J2 Q F
1/0
y2 (c) (d)
C
x
K2 Q 0 1
A B/0 F/0 x 0/0
B C/0 F/0 0 1
C G/0 D/0 A B/0 A/0 1/0 G
D E/1 F/0 B C/0 A/0 1/0
0/0
1/0
E C/0 F/0 C G/0 D/0 0/0 1/0
A B C D
0/0
F B/0 F/0 D B/1 A/0 0/1
z G G/0 F/0 G G/0 A/0
1/0
(e) (f) (g)
Figure 8.32
Figure 8.33
Design of a Serial Binary Adder Design of a Four-State Up/Down Counter
x x
z=0 z=1 0 1 y 1ky 2k 0 1
0 0 1 0 1/0 3/0 00 01 11
ai aibi/si
Shift register A 00/0 01/0 1
Serial si 01/1 11/0 10/0 1 2/1 0/1 01 10 00
0 1 1 0
bi adder 10/1 0 1 11/1 2 3/2 1/2 11 00 10
Shift register B 1
ci-1 = 0 00/1 ci-1 = 1 3 0/3 2/3 10 11 01
3 0 2
(b)
z=3 z=2 y1 k + 1 y2 k + 1
(a) (a) State diagram (b) State table (c) Transition table
ai
bi Si
x x
y1 y2 0 1 y1 y2 0 1
ai b i ci-1 ci si
00 0 d 1 d 00 1 d 1 d
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1 01 1 d 0 d 01 d 1 d 1
0 1 1 1 0 Ci Ci-1
D Q
1 0 0 0 1
1 0 1 1 0 C 11 d 1 d 0 11 d 1 d 1
1 1 0 1 0
1 1 1 1 1 10 d d 10 d d
Clock 0 1 1 1
J1 K1 J1 K1 J2 K2 J2 K2
(c) (d) (d) Excitation maps
y3 k + 1 y2 k + 1 y1 k + 1 y0 k + 1
(b)
Figure 8.36
Figure 8.37 (a) and (b)
Design of the BCD Counter (con’t) Realization of the BCD Counter Design
y 2 k y3 k
y1 k y0 k 00 01 11 10 00 01 11 10
x x x x x x x x
y3 k y2 k y 1 k y0 k 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 00 0 d d 0 0 d d 0
0000 0 0 d d 0 0 d d 0 0 d d 0 1 d d
01 0 d d 0 0 d d 0
0001 0 0 d d 0 0 d d 0 1 d d d d 0 1
0010 0 0 d d 0 0 d d d d 0 0 0 1 d d 11 0 d d d 1 d d d
0011 0 0 d d 0 1 d d d d 0 1 d d 0 1 10 0 d d d 0 d d d
0100 0 0 d d d d 0 0 0 0 d d 0 1 d d x=0 x=1
(d)
0101 0 0 d d d d 0 0 0 1 d d d d 0 1
0110 0 0 d d d d 0 0 d d 0 0 0 1 d d
0111 0 1 d d d d 0 1 d d 0 1 d d 0 1
1000 d d 0 0 0 0 d d 0 0 d d 0 1 d d
x
1001 d d 0 1 0 0 d d 0 0 d d d d 0 1
1010 d d d d d d d d d d d d d d d d y0 J0
y1 J1
y2 J2 C
1011 d d d d d d d d d d d d d d d d y3 J3 C
C K0
1100 d d d d d d d d d d d d d d d d C K1
K2
K3
1101 d d d d d d d d d d d d d d d d
1110 d d d d d d d d d d d d d d d d
1111 d d d d d d d d d d d d d d d d
Clock
J3 K3 J2 K2 J1 K1 J0 K0
(c) Lights
(e)
K-map For Y1 in Example 8.16 Robot Controller Floor Plan -- Example 8.17
y
y3 y3
Exit
0 0 d 0 0 0 d 0
Bottom view
0 0 d 0 1 1 d 0 Movable of robot
y0 y0 blocks Sensor
(X)
1 1 d d 0 0 d d
y1 y1
Robot
1 1 d d 1 1 d d
Wheels
y2 y2
01 0 0 01 0 1 01 1 0 01 1 1 Q2 J2
11 0 1 11 0 0 11 1 1 11 1 0 Q2 K2
10 0 1 10 0 0 10 0 1 10 0 0 Clock
(f)
z1 z2 Y1 Y2
(d) (e)
Candy Machine Controller Design -- Example 8.18 Algorithmic State Machines (ASMs)
R Release
N candy
Coin Control
detector D unit
Release
C change
(a)
ND/RC State_Name
Mealy
00/00 00/00 Moore outputs outputs
10/00 0 1
0 Input
01/00 5
10/10, 01/00
01/11
10/00
01/10
00/00 15 (a) (b) (c)
10
10/00
00/00
C
z=0 C z=1
Figure 8.43 z=0
0
X
1 Figure 8.44
0 1
X
(a)
(a)
A A 0
Look for Register A Register Q 4 M Multiplier
z=0 first 1 bit Muliplier Q Multiplicand
CNT 0
0
2-bit
0 x 4 counter Add
4 4
Cout 1
1 Q0 A A+M
Sum 4
0
z=1 4
Adder Product Q0 C0
Shift
Halt Shift right A: Q
Control CNT CNT + 1
unit
4
B Muliplicand Halt
z=1 Complement z=0 Register M
remaining bits 0 1
StartAdd Shift C0 Halt 1
Register control signals
(a) (b)
0 1
x
DA
C
Sequential Assignment One-hot Assignment QA
State y1y0 y3y2 y1y0 A
A 00 0001 Begin Clock State A
B 01 0010
C 10 0100 DA C
State A DB C
D 11 1000
State B
QA
QB
A B
State B
...
...
Table 8.1
...
DB
C
DC C
State C
QB
QC
B
C
(a) (b)
DA
C
State A DA Begin Clock
C QA
Start
QA
Moore
Aoutput
Q0 DA
0 1 x C
Inputs
QA
x
DB
C
z=1 Mealy
State B z output QB
Add z
DA DA
C C
State C DC
C
QB QC DB
C
QC
Shift QB
C0 Start
(c)
DD
Figure 8.47 (c) QD
C
(b)
Halt
(a)
Figure 8.48
Incompletely Specified Circuits -- Detonator
Detonator Example K-maps
(Example 8.22)
x y 2y x y 2y x y2y x
y 2y 1 0 1 1 0 1 1 0 1 1 0 1
Figure 8.49
00 1 0 00 1 d 0 0
x
y2 y 1 0 1
01 0 0 01 1 0 0 0
00 0d/1 00/0
z 01 10/0 00/0 11 0 1 11 d d 1 0
y1 y2 11 dd/0 10/1
10 d 1 10 d d 0 1
10 dd/d 01/1
x T1 Q T2 Q Y2Y1/z z D2 D1 D2 D1
(a) (b) (c)
C Q C Q
x x x
y2y1 y2y1 y2y1
0 1 0 1 0 1
00 0 d 0 0 00 0 d 0 d 00 d d 0 d
Clock
01 1 1 0 1 01 1 d 0 d 01 d 1 d 1
11 d d 0 1 11 d d d 0 11 d d d 1
10 d d 1 1 10 d d d 1 10 d d 1 1
Figure 8.51 T2 T1 T2 T1 J2 K2 J2 K2 J1 K1 J1 K1
(d) (e)
Figure 8.52
Chapter 9 -- Simplification of
Redundant States in Sequential Circuits
Sequential Circuits
Removal of redundant states is important because
– Cost: the number of memory elements is directly related to the
number of states
– Complexity: the more states the circuit contains, the more
complex the design and implementation becomes
– Aids failure analysis: diagnostic routines are often predicated on
the assumption that no redundant states exist
• States S1, S2, …, Sj of a completely specified sequential circuit are said A C/1 B/0 Initial Input Sequences
State 00 01 11 10
B C/1 E/0
to be equivalent if and only if, for every possible input sequence, the x SC z A 11 10 01 00
C B/1 E/0 B 11 10 00 01
same output sequence is produced by the circuit regardless of whether D D/0 B/1 C 11 10 00 01
S1, S2, …, Sj is the initial state. (a)
E E/0 A/1
D 00 01 11 10
E 00 01 11 10
• Let Si and Sj be states of a completely specified sequential circuit. Let (b) (c)
Sk and Sl be the next states of Si and Sj, respectively for input Ip. Initial Input Sequences
State 000 001 010 011 100 101 110 111
Si and Sj are equivalent if and only if for every possible Ip the following A 111 110 100 101 011 010 000 001
are conditions are satisfied. B 111 110 100 101 000 001 011 010
C 111 110 100 101 000 001 011 010
– The outputs produced by Si and Sj are the same, D 000 001 011 010 111 110 100 101
E 000 001 011 010 111 110 101 100
– The next states Sk and Sl are equivalent. (d)
Figure 9.1
Equivalence Relations Methods for Finding Equivalent States
x x
0 1 0 1 x
x A A/0 B/0 0 1
A E/0 D/0
0 1 B H/1 C/0 A' A'/0 E'/0
B A/1 F/0
A' B'/0 A'/0 C E/0 B/0 B' B'/1 D'/1
C C/0 A/1
B' A'/1 C'/0 D C/1 D/0 C' F'/0 E'/0
D B/0 A/0
C' C'/0 A'/1 E C/1 E/0 D' E'/0 B'/0
E D/1 C/0
D' E'/1 D'/1 F F/1 G/1 E' E'/1 C'/0
F C/0 D/1
E' C'/1 B'/1 G B/0 F/0 F' C'/1 F'/0
G H/1 G/1
(b) H H/1 C/0 (b)
H C/1 B/1
(a)
(a)
Example 9.4 -- Yet another partitioning example Finding Equivalent States by Implication Tables
x
0 1 B
B
x1x2 A C/1 B/0
00 01 11 10 B C/1 E/0 C C
C B/1 E/0
A D/0 D/0 F/0 A/0 x1x2 D
D D/0 B/1 D
00 01 11 10
E E/0 A/1
B C/1 D/0 E/1 F/0 E E
A' C'/0 C'/0 A'/0 A'/0 (a)
C C/1 D/0 E/1 A/0 A B C D A B C D
B' B'/1 C'/0 D'/1 A'/0 (b)
(c)
D D/0 B/0 A/0 F/0
C' C'/0 B'/0 A'/0 A'/0
B BE
E C/1 F/0 E/1 A/0 B
BE
D' B'/1 A'/0 D'/1 A'/0 BC
F D/0 D/0 A/0 F/0 C
BE Ö BC A -
E' E'/0 E'/0 A'/0 A'/0 C Ö B (BC)
BE
C -
G G/0 G/0 A/0 A/0 D
D
D -
(b) PK = (A)(BC)(D)(E)
H B/1 D/0 E/1 A/0 E AB AB (f)
E
A B C D
(a) (d) A B C D
(e)
Figure 9.6
Figure 9.7
Example 9.5 -- Using implication tables to find
Example 9.6 -- An implication table example
equivalent states
x1x2
x
00 01 11 10
0 1
A D/0 D/0 F/0 A/0
A E/0 D/0
B A/1 F/0 B C/1 D/0 E/1 F/0
B B
C C/0 A/1 C C/1 D/0 E/1 A/0
A (AF) DG BG DG
A (AD) G
B (BE) G B (BC)(BH) AF AF AF
C (CF) C (CH)
CH D - BC BC
D - H H BC
E - BG E - AF DF
F - F -
G - A B C D E F G G - A B C D E F G
(b) (b)
PK = (AD)(BE)(CF)(G)(H) Note: (BC)(BH)(CH) = (BCH)
(c) PK = (AF)(BCH)(D)(E)(G)
(c)
Figure 9.8
• Next states and/or outputs are not specified for all states • Compatibility relation: let R be a relation on a set S. R is a
• Applicable input sequences: an input sequence is applicable to state, Si, of an compatibility relation on S if and only if it is reflexive and symmetric.
incompletely specified circuit if and only if when the circuit is in state Si and A compatibility relation on a set partitions the set into compatibility
the input sequence is applied, all next states are specified except for possible classes. They are typically not disjoint.
the last input of the sequence.
• Example: let S = {A,B,C,D,E} and
• Compatible states: two states Si and Sj are compatible if and only if for each
input sequence applicable to both states the same output sequence will be R = {A,A),(B,B),(C,C),(D,D),(E,E),(A,B),(B,A),(A,C),(C,A), (A,D),
produced when the outputs are specified. (D,A),(A,E),(E,A),(B,D),(D,B),(C,D),(D,C),(C,E),(E,C)}
• Compatible states: two states Si and Sj are compatible if and only if the Then the compatibility classes are
following conditions are satisfied for any possible input Ip (AB)(AC)(AD)(AE)(BD)(CD)(CE)(ABD)(ACD)(ACE)
– The outputs produced by Si and Sj are the same, when both are specified The incompatibility classes are (BC)(BE)(DE)
– The next states Sk and Sl are compatible, when both are specified.
• Compatible pairs may be found using implication tables
• Incompatible states: two states are said to be incompatible if they are not
compatible. • Maximal compatibles may be found using merger diagrams
Examples 9.8 and 9.9 -- Generating Maximal
Merger diagrams
Compatibles and Incompatibles
B
B C
G (GH)
F (GH)(FG)
AC E (EG)(EH)(GH)(FG)
x B E (FG)(EGH)
D (DG)(FG)(EGH)
0 1
BG
C (CG)(CF)(CE)(CD)(DG)(FG)(EGH) A C
A A/- C/1 C C (CEG)(CDG)(CFG)(EGH) A D
AE B (BC)(BG)(CEG)(CDG)(CFG)(EGH)
B B/- A/- AC BC CG A (AE)(AG)(AH)(BC)(BG)(CEG)(CDG)(CFG)(EGH)
D A (AEG)(AGH)(AEH)(BCG)(CEG)(CDG)(CFG)(EGH)
C G/- E/0 AC CE A (AEGH)(BCG)(CDG)(CEG)(CFG) (a) (b)
D C/1 C/- AB AC
E Ö
AC
AG (c) B C
E A/1 C/-
AD BD CD AD G -
F D/- A/- DG F (FH)
F
AC AE AC AC E (FH)(EF)
G G/- G/- D (FH)(EF)(DH)(DF)(DE) B D
AG DG
H H/- D/- G CG AG EG CG
CG AG D (FH)(DH)(DEF) A C
C (CH)(FH)(DH)(DEF)
(a) AD GH CH AH DH B (BH)(BF)(BE)(BD)(CH)(FH)(DH)(DEF)
H CD DG B (BH)(BDEF)(CH)(FH)(DH)
DE CD CD AD B (BDEF)(CH)(BDFH)
A B C D E F G A (AB)(AC)(AD)(AF)(BDEF)(CH)(BDFH)
A (ABDF)(AC)(BDEF)(CH)(BDFH) A E
(b)
(d)
E D
F
(c) (d)
Figure 9.11
A D A D
• Completeness: all states of the original machine must be covered
Figure 9.12
Bounding the number of states State Reduction Algorithm
• Let U be the upper bound on the number of states needed • Step 1 -- find the maximal compatibles
in the minimized circuit • Step 2 -- find the maximal incompatibles
• Then U = minimum (NSMC, NSOC) • Step 3 -- Find the upper and lower bounds on the number
– where NSMC = the number of sets of maximal compatibles of states needed
– and NSOC = the number of states in the original circuit
• Step 4 -- Find a set of compatibility classes that is
• Let L be the lower bound on the number of states needed in complete, consistent, and minimal
the minimized circuit • Step 5 -- Produce the minimum state table
• Then L = maximum(NSMI1, NSMI2,…, NSMIi)
– where NSMIi = the number of states in the ith group of the set of
maximal incompatibles of the original circuit.
B
(CFG) DG AEG D' A'/1 D'/0 x
0 1 x
0 1
(CEG) AG CEG E' C'/- A'/0 A C (ABD) AC B
A' B'/1 A'/0
(ACD) AD B
B' A'/0 B'/1
(ACE) AD C
(a) (b) (f)
E D (e)
(d)
Figure 9.13
Figure 9.14
Example 9.13 -- Another state table reduction
Example 9.14 -- Yet another state reduction problem
problem
x B B
B BD C B DE
x 0 1
0 1 x
0 1 A D/- A/- AB
A B/1 D/0 C BD B D C AB DE
(ABD) B ABD B E/0 A/- A C A C
B -/- B/0
Ö (BC) E BD C D/0 B/- AC AC
C D AB D BC
E/0 D/- CD CE
(E) - C D C/- C/-
D B/1 A/0 CD A E AB
E (F) - E E BC
E -/- C/1 E C/1 B/- CD E D E D
DE CE F (d)
F -/0 E/1 F (a) A B C D (c) (d)
(c)
(a) (b)
A B C D E
(b)
C x
x 0 1 x x
0 1 0 1 0 1
B D (ABC) DE AB
A' A', B'/1 A'/0 (ABC) DE AB A' B'/0 A'/-
B' C'/0 A'/0
(ACD) CD ABC
(DE) C BC B' A'/1 A'/- Figure 9.16
C' -/- B'/1
Figure 9.15 (ADE) CD ABC
A E (f) (g)
D' -/0 C'/1 (e)
(f)
F
(e)
Example 9.15 -- Optimal state assignments Unique State Assignments for Four States
Present x
state 0 1
A B/0 E/0
Present x
B C/0 G/0
Assignments
state 0 1
C D/0 F/0 1 2 3
A A/0 B/0
D A/1 A/0 States y1 y2 y1 y2 y1 y2
B A/0 C/0
E G/0 C/0 A 00 10 00
F A/0 A/1 C C/0 D/0 B 01 11 10
C 11 01 11
G F/0 D/0 D C/1 A/0 D 10 00 01
Next state/output
(a) (b)
Figure 9.17
Figure 9.18
State Assignments for a Four State Machine D flip-flop realization for assignment 1
x
x y2y1 0
00 11/0 10/0
1
0 1 01 11/0 00/0
11 01/0 10/0
B C/0 A/0 x x x x x x
y2 y1 0 1 y2 y1 0 1 y2 y1 0 1
C B/0 D/0 00 0 0 00 1 1 00 1 0
01 0 0 01 1 0 01 1 0
D A/1 B/1 11 0 0
y1
11 0 1
y1
11 1 0
y1
y2 y2 y2
10 1 1 10 0 0 10 0 1
z D2 D1
Figure 9.19 (b) (c) (d)
Figure 9.20
Y2 Y1/z Y2 Y1/z
(a) (a)
x x x x x x x x x
x x x
y2 y1 0 1 y2 y1 0 1 y2 y1 0 1
y2 y1 0 1 y2 y1 0 1 y2 y1 0 1
00 0 0 00 0 1 00 1 0 00 0 0 00 0 1 00 1 1
01 0 0 01 1 1 01 1 0 01 0 0 01 1 1 01 0 1
y1 y1 y1 y1 y1 y1
11 0 0 11 0 0 11 1 0 11 1 1 11 0 1 11 0 0
y2 y2 y2 y2 y2 y2
10 1 1 10 0 1 10 0 1 10 0 0 10 0 0 10 1 0
z D2 D1 z D2 D1
(b) (c) (d) (b) (c) (d)
x
0 1
A B/0 C/0
y2 y2 y2 B D/0 A/1
y1 0 1 y1 0 1 y1 0 1 C A/1 D/0
0 A D 0 A D 0 A B D D/1 B/1
(a)
1 B C 1 C B 1 C D
BD AB AC CD AD BC
(a) (b) (c)
Assignment 1 Assignment 2 Assignment 3
(b)
E B/1 A/1 x x x x x x
y2y1 0 1 y2y1 0 1 y2y1 0 1
(a) Closed subgraph
00 1 0 00 0 1 00 0 0
AC
BD 01 0 1 01 0 1 01 1 0
y1 y1 y1
AE
11 1 1 11 1 0 11 1 1
y2 y2 y2
10 1 0 10 1 0 10 0 1
Closed subgraph D2 D1 z
(b) (b)
Figure 9.27
Figure 9.28
x 0,1
0 1 Present Input
A D/0 C/0 block B21 B32
DF 0 1
B E/0 A/1
C F/1 B/0 P2: B21 B32 B32 0,1 0,1
AB EF BC B22 B31 B31
D A/1 F/1
DE
E C/0 E/0 AC
F B/0 D/1
P3: B31 B21 B21 B22 B31
(b)
B32 B22 B22
(a) 0,1
(a) (b)
Figure 9.29
Figure 9.30