SlideShare uma empresa Scribd logo
1 de 298
Nguyen Thanh Kien Department of Computer Engineering Faculty of Information Technology Hanoi University of Technology Digital Logic Design
About ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Content ,[object Object],[object Object],[object Object],[object Object],[object Object]
Acknowledge ,[object Object],[object Object],[object Object],[object Object]
Reference textbooks ,[object Object],[object Object]
Grading policy ,[object Object],[object Object],[object Object],[object Object]
1. Introduction ,[object Object],[object Object]
[object Object]
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.1. Number Representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.1. Number Representation 11101.11 (2)  = 1x2 4 +1x2 3 +1x2 2 +0x2 1 +1x2 0 +1x2 -1 +1x2 -2 = 29.75 (10)
1.1.1. Number Representation ,[object Object],[object Object],[object Object],[object Object],[object Object],ai =  0..9
1.1.1. Number Representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ai =  0,1 bit  –  b inary dig it
1.1.1. Number Representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.1. Number Representation ,[object Object],[object Object],[object Object],[object Object],[object Object],ai =  0..7 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ai =  0..F
Convert from base b to base 10 ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
Convert from base 10 to base b ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Convert from base 10 to base 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],6.625 (10)  = 110.101 (2)   0 1 2 1 1 2 3 0 2 6
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
Convert from base 2 to base 2 n ,[object Object],[object Object],[object Object],[object Object]
Convert from base 2 n  to base 2 ,[object Object],[object Object],[object Object]
Convert from base i to base j ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.2 Binary Addition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.2 Binary Addition ,[object Object],[object Object],[object Object]
1.1.2 Binary Addition ,[object Object],[object Object],[object Object]
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.3 Signed Numbers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],=> need an other representation
2’s complement representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2’s complement representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2’s complement representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],+
2’s complement representation ,[object Object],[object Object],[object Object]
4 bit representation of unsigned and signed (2’s complement) -1 15 1111 -2 14 1110 -3 13 1101 -4 12 1100 -5 11 1011 -6 10 1010 -7 9 1001 -8 8 1000 +7 7 0111 +6 6 0110 +5 5 0101 +4 4 0100 +3 3 0011 +2 2 0010 +1 1 0001 0 0 0000 Signed Unsigned Binary format
2’s complement representation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Addition of signed numbers ,[object Object],[object Object],-2  1110 0  0000 +2  0010 +3  0011 +5  0101 +7  0111 -5  1011 -5  1011 -5  1011
Addition of signed numbers ,[object Object],[object Object],[object Object],[object Object],[object Object],maybe ,[object Object],0110 0101  = 101 +  0101 0010   =  82 1011 0111
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.1.4 Binary Subtraction ,[object Object],[object Object],[object Object],-5  1011  2  0010 +  1 -5  +1011 1010 7  0111  5  0101
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Binary-Coded Decimal - BCD ,[object Object],[object Object],[object Object],[object Object],0001 0101 1111 15 0001 0100 1110 14 0001 0011 1101 13 0001 0010 1100 12 0001 0001 1011 11 0001 0000 1010 10 1001 1001 9 1000 1000 8 0111 0111 7 0110 0110 6 0101 0101 5 0100 0100 4 0011 0011 3 0010 0010 2 0001 0001 1 0000 0000 0 BCD Binary Decimal
1.1. Review of Number Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ASCII ,[object Object],[object Object]
 
Problems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1. Introduction ,[object Object],[object Object]
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.2.1 Definition of Switching Algebra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Basic Properties of Switching Algebra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basic Properties of Switching Algebra ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Basic Properties of Switching Algebra Basic Properties of Switching Algebra
[object Object],[object Object],Basic Properties of Switching Algebra
Problems ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Manipulation of Algebraic Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions F3,F4 are minimum SOP of F1
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions
[object Object],[object Object],[object Object],Manipulation of Algebraic Functions Manipulation of Algebraic Functions
Canonical forms ,[object Object],x'+y’+z’  (M7) xyz  (m7) 1 1 1 7 x'+y’+z  (M6) xyz'  (m6) 0 1 1 6 x'+y+z’  (M5) xy'z  (m5) 1 0 1 5 x’+y+z  (M4) xy’z’  (m4) 0 0 1 4 x+y’+z’  (M3) x'yz  (m3) 1 1 0 3 x+y’+z  (M2) x'yz’  (m2) 0 1 0 2 x+y+z’  (M1) x’y’z  (m 1 ) 1 0 0 1 x+y+z  (M0) x’y’z’  (m 0 ) 0 0 0 0 Maxterm minterm z y x Decimal
Canonical forms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Canonical forms ,[object Object],[object Object],[object Object]
Canonical forms f(x2,x1,x0)=m 1 +m 4 +m 5 +m 6 +m 7   = Σ (1,4,5,6,7) f(x2,x1,x0)=M 0 M 2 M 3 =  Π (0,2,3) Canonical sum-of-products (SOP) Canonical product-of-sums (POS) 1 1 1 1 7 1 0 1 1 6 1 1 0 1 5 1 0 0 1 4 0 1 1 0 3 0 0 1 0 2 1 1 0 0 1 0 0 0 0 0 f x0 x1 x2 Decimal
F(a,b,c)= abc’+a’b’ ,[object Object],[object Object],0 1 1 1 7 1 0 1 1 6 0 1 0 1 5 0 0 0 1 4 0 1 1 0 3 0 0 1 0 2 1 1 0 0 1 1 0 0 0 0 f c b a Decimal
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
1.2.4 Representations of Algebraic Functions ,[object Object],[object Object],[object Object]
Truth table   ,[object Object]
Truth table ,[object Object],[object Object],[object Object],3 independent  variables 2 dependent  functions 2 3  rows
Venn diagram   ,[object Object],[object Object],F(A,B,C)=C.not(B)
Venn diagram A A A+B A.B A.B A+B
Karnaugh map ,[object Object],[object Object],6 7 5 4 1 2 3 1 0 0 10 11 01 00 BC A 5 4 10 7 6 11 3 2 01 1 0 00 1 0 C AB
Karnaugh map (K-map) ,[object Object],[object Object],6 7 5 4 1 2 3 1 0 0 10 11 01 00 BC A
Two-variable K-map ,[object Object],A B 0  1 0 1 B A 0  1 0 1 3 2 1 0 3 1 2 0
Two-variable K-map ,[object Object],A B 0  1 0 1 1 0 0 0
Three-variable K-map ,[object Object],6 7 5 4 1 2 3 1 0 0 10 11 01 00 BC A 5 4 10 7 6 11 3 2 01 1 0 00 1 0 C AB
Three-variable K-map ,[object Object],1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 F z y x 1 1 1 1 1 1 0 0 0 0 10 11 01 00 yz x 1 1 10 1 1 11 0 1 01 0 0 00 1 0 z xy
Four-variable K-map ,[object Object],10 11 01 00 10 11 01 00 CD AB
Four-variable K-map ,[object Object],1 0 0 0 10 1 1 1 1 11 1 1 0 0 01 1 0 0 0 00 10 11 01 00 CD AB
Five-variable K-map 00  01  11  10 AB CD 00 01 11 10 00  01  11  10 AB CD 00 01 11 10 E 0 1 5 variables Karnaugh Map consists of two 4 variables Karnaugh Map connected up/down.
Six-variable K-map 1  1 1  1 1  1 00  01  11  10 AB CD 00 01 11 10 1  1 1  1 1  1 00  01  11  10 AB CD 00 01 11 10 E 0 1 1  1 1  1 1  1 00  01  11  10 AB CD 00 01 11 10 1  1 1  1 1  1 00  01  11  10 AB CD 00 01 11 10 F 0 1
Karnaugh map with don’t care   don’t care ~ input conditions that not occur
1.2. Switching Algebra and Logic Circuits  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Basic logic gates ,[object Object],1 1 1 0 0 1 0 1 0 0 0 0 out B A 1 1 1 1 0 1 1 1 0 0 0 0 out B A 0 1 1 0 out A
Basic logic gates ,[object Object],0 1 1 1 0 1 1 1 0 1 0 0 out B A 0 1 1 0 0 1 0 1 0 1 0 0 out B A 0 1 1 1 0 1 1 1 0 0 0 0 out B A
Implementation of Functions with AND, OR ,[object Object],F1 = x’yz’+x’yz+xy’z’+xy’z+xyz F2 = x’y+xy’+xz
Implementation of Functions with AND, OR, NOT ,[object Object],X Y Z F
Multilevel circuits ,[object Object],two-level circuit three-level circuit
Implementation of Functions with NAND ,[object Object],NOT AND OR A B A.B (A’.B’)’ =A+B A B
Implementation of Functions with NAND ,[object Object],[object Object],[object Object]
Implementation of Functions with NOR ,[object Object]
Implementation of Functions with NOR ,[object Object],[object Object]
[object Object],[object Object]
2. Function Minimization Methods ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],2. Function Minimization Methods
2. Function Minimization Methods ,[object Object],[object Object],[object Object]
2.1. Algebraic Method ,[object Object],[object Object],[object Object],[object Object],[object Object]
2.1. Algebraic Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2. Function Minimization Methods ,[object Object],[object Object],[object Object]
2.2 The Karnaugh Map Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implicant, Prime Implicant ,[object Object],Implicants of F Minterm   Groups of 2    Groups of 4 A’B’C’D’ A’CD   AB A’B’CD BCD A’BCD ABC’ ABC’D’ ABD ABCD’ ABC ABC’D ABD’ ABCD 10 1 1 1 1 11 1 01 1 1 00 10 11 01 00 CD AB
Implicant, Prime Implicant ,[object Object],1 1 1 1 10 1 1 11 1 1 01 1 1 1 00 10 11 01 00 CD AB
Essential Prime Implicant ,[object Object],minterm 0 is only contained in PI B’D’ minterm 5 is only contained in PI BD => BD & B’D’ are two Essential PI 1 1 1 1 10 1 1 11 1 1 01 1 1 1 00 10 11 01 00 CD AB
2.2.1 Minimum Sum of Product Expressions ,[object Object],[object Object],[object Object],[object Object]
2.2.1 Minimum Sum of Product Expressions ,[object Object],1 1 10 1 1 11 1 1 01 00 10 11 01 00 CD AB 1 1 10 1 1 11 1 1 01 1 1 00 10 11 01 00 CD AB
[object Object],2.2.1 Minimum Sum of Product Expressions 2 1  cells => eliminate 1 variable 2 2  cells => eliminate 2 variables F(A,B,C,D) = A’BC’ + AC 1 1 10 1 1 11 1 1 01 00 10 11 01 00 CD AB
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],2.2.1 Minimum Sum of Product Expressions
[object Object],[object Object],1 1 10 1 1 11 1 1 01 1 1 00 10 11 01 00 CD AB
[object Object],[object Object],1 1 10 1 1 11 1 1 01 1 1 00 10 11 01 00 CD AB
2.2 The Karnaugh Map  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.2.2 Don’t care ,[object Object],[object Object],[object Object],[object Object],[object Object]
Examples: F(a,b,c,d)=R(1,3,5,7,12,13) don’t care (0,4,10,15) - 10 - 1 1 11 1 1 - 01 1 1 - 00 10 11 01 00 CD AB
2. Function Minimization Methods ,[object Object],[object Object],[object Object]
2.3 Quine-McCluskey Method ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.3. Quine-Mcluskey method Karnaugh map cannot handle more than 6 variables.  Quine-McCluskey method has no limitation with number of variables, and is suitable for computer algorithm. 0  1 00  01  1 11  1  1 10  1  1  AB C ABC+ABC+ABC+ABC+ABC 010 *10 11* 1*0 1*1 10* 110 111 100 101 1** find a pair of numbers of 1 bit difference
Quine-Mcluskey Procedure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
S1. Represent minterms in binary numbers f = ABCDEF+ABCDEF+ABCDEF+ABCDEF+ABCDEF +ABCDEF+ABCDEF +ABCDEF+ABCDEF+ABCDEF f = 000000+000010+000110+000111+001110 +001000+101001+001100+001111+001010 f(A,B,C,D,E,F)=Σ(0,2,6,7,14,8,41,12,15,10)
S2. Grouping f = 000000+000010+000110+000111+001110 +001000+101001+001100+001111+001010 000000 once twice three times 000010 001000 000110 001100 001010 000111 001110 101001 four times 001111 group 0 group 1 group 2 group 3 group 4 group each term by the appearance of 1  no times
S3 & S4. Making set (1) 000000   0 000010   2 001000   8 000110   6 001010 10 001100 12 000111   7 001110 14 101001 41 001111 15 0,2 (2) 0,8 (8) 2,6(4) 2,10(8) 8,10(2) 8,12(4) 6,7(1) 6,14(8) 10,14(4) 12,14(2) 7,15(8) 14,15(1) find a pair of 1 bit difference between neighboring group write difference within ( ) mark  to the number  not included in any set group 0 group 1 group 2 group 3 group 4
S3 & S4. Making set (2) 0,2 (2) 0,8 (8) 2,6(4) 2,10(8) 8,10(2) 8,12(4) 6,7(1) 6,14(8) 10,14(4) 12,14(2) 7,15(8) 14,15(1) 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) mark  to the set not involved in the next level set when all the set is marked finish Each pair appears in duplicate find a pair of 1 bit different sets with the same value in ( ) between neighboring group append difference within ( )
S6. Selecting Prime Implicants (1) 41 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) 0  2  6  7  8  10  12  14  15  41 x x x x x x x x x x x x x x x x x If only one x in a column, then the row is inevitable implicant minterms (given at first) Prime implicant (  marked ) write x into the position where minterm is included in the prime implicant inevitable implicant
S6. Selecting Prime Implicants (2) 41 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) 0  2  6  7  8  10  12  14  15  41 x x x x x x x x x x x x x x x x x mini term prime implicants mark minterms involved in the inevitable implicants inevitable implicants
S7. C onversion to logic variables 41 101001 0,2,8,10(2,8) 000000 000010 001000 001010 8,10,12,14(2,4) 001000 001010 001100 001110 6,7,14,15(1,8) 000110 000111 001110 001111 ABCDEF ABDF ABCF ABDE F=ABCDEF +ABDF +ABCF +ABDE
Examples: ,[object Object],[object Object],[object Object],[object Object]
Quine-Mcluskey method w ith don’t care   ,[object Object],[object Object],[object Object],[object Object],[object Object]
Quine-Mcluskey method w ith don’t care f=ABCD+BCD+ACD+ABCD+ABCD don’t care AD mini term ABCD 0000 0001 0010 0011 0101 0111 1011 1101 1111 decimal 0 1 2 3 5 7 11 13 15 first comparison second comparison 0,1(1) 0,2(2) 1,3(2) 1,5(4) 2,3(1) 3,7(4) 3,11(8) 5,7(2) 5,13(8) 7,15(8) 11,15(4) 13,15(2) 0,1,2,3(1,2) 1,3,5,7(2,4) 3,7,11,15(4,8) 5,7,13,15(2,8)
Quine-Mcluskey method w ith don’t care 0  2  11  13  15 0,1,2,3(1,2) 1,3,5,7(2,4) 3,7,11,15(4,8) 5,7,13,15(2,8) x x x x x x 00** 0**1 **11 *1*1 ABCD f=AB+CD+BD
[object Object],[object Object]
Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3. Larger Combinational Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Delay in Combinational Logic Circuits ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],3. Larger Combinational Systems
Half Adder  =a    b r = ab Half Adder (Carry-out) a b  r 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 =1 & a b  r HA a b  r (Result)
Addition of two n-bit numbers  4   3  2  1  0 r 3 r 2 r 1 r 0 A = a 3 a 2 a 1 a 0 +B = b 3 b 2 b 1 b 0 r 4    3 r 3   2 r 2   1 r 1    0 Summation
Full Adder  i r i+1  i  = a i     b i     r i r i+1  = a i  b i  + r i  (a i     b i ) FA a i r i b i  i r i+1 a i b i r i  i r i+1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 10 11 01 00 a i b i r i 1 1 1 1 1 0 10 11 01 00 a i b i r i
Combinational logic circuit design procedure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example 1 ,[object Object],[object Object],[object Object],[object Object]
Example 1 ,[object Object],[object Object],[object Object],[object Object],m 3  = n 2 n 0  + n 2 n 1 n2 n1 n0 m3 m2 m1 m0 0 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 m0 m1 m2 m3 n0 n1 n2 1 1 1 0 1 0 0 0 0 0 10 11 01 00 n1n0 n2
Example 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],Ex2
[object Object],[object Object],[object Object],[object Object],Example 2 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 b0 b1 b2 b3 a0 a1
Example 2 ,[object Object],[object Object],[object Object]
Full Adder =1 & r i a i b i =1 &  i r i+1  1
Full Adder =1 & r i a i b i =1 &  i r i+1  1 HA HA
n-bit Adder ,[object Object],[object Object],Delay = n x  Δ ? FA a n-1  b n-1 r n-1 r n  n-1 FA a n-2  b n-2 r n-2  n-2 FA a 1   b 1 r 1 r 2  1 FA a 0   b 0 r 0 = 0  0  n
n-bit Adder ,[object Object],r i+1  = a i b i  + r i (a i     b i )   P i  = a i     b i  and G i  = a i b i      r i+1  = G i  + r i  P i   r 1  = G 0  + r 0 P 0 r 2  = G 1  + G 0 P 1  + r 0 P 0 P 1      1 G 1 G 0 P 1 r 2  1  2 & P 0 r 0 &    1 G 0 P 0 r 0 r 1  1  2 &
Parallel 4-bit addition r 4  =   4    3    2    1    0 r 2   r 1   a 2   b 2 a 1   b 1 a 0   b 0 P 3   G 3  P 2   G 2   P 1   G 1  P 0   G 0 Calculate P i  and G i a 3   b 3  a 2   b 2   a 1   b 1  a 0   b 0 Carry calculation Sum calculation r 0   a 3  b 3 r 3   r 4   r 0
Subtractor ,[object Object],[object Object],[object Object]
Subtractor ,[object Object],A3 A2 A1 A0 B3 B2 B1 B0 S3 S2 S1 S0 1 C1 C2 C3 C4 A B C S C+ FA A B C S C+ FA A B C S C+ FA A B C S C+ FA
Adder and Subtractor C1 C2 C3 C4 A B C S C+ FA A B C S C+ FA A B C S C+ FA A B C S C+ FA MPX MPX MPX MPX A3 A2 A1 A0 B3 B2 B1 B0 S3 S2 S1 S0 sel
3. Larger Combinational Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Decoder ,[object Object],[object Object],[object Object]
Decoder ,[object Object],Eg:  + 3 bit inputs x1,x2,x3. + 8 bit outputs Y 0 ,Y 1 …Y 7
Design 3x8 decoder En if (En=0) Disable or D0...D7=0 else if (En=1) Function as a 3x8 decoder
BCD-to-decimal decoder BCD to  decimal Decoder A B C D Y 0 Y 1 Y i Y 9 : : N A B C D Y 0 Y 1 .. Y 9 0 0 0 0 0 1 0 .. 0 1 0 0 0 1 0 1 .. 0 2 0 0 1 0 0 0 .. 0 3 0 0 1 1 0 0 .. 0 4 0 1 0 0 0 0 .. 0 5 0 1 0 1 0 0 .. 0 6 0 1 1 0 0 0 .. 0 7 0 1 1 1 0 0 .. 0 8 1 0 0 0 0 0 .. 0 9 1 0 0 1 0 0 . 1
BCD-to-decimal decoder   10     11 01 1 00 10 11 01 00 CD AB
Decoder ,[object Object]
Decoder implementation of arbitrary functions F1(x1,x2,x3,x4)= Σ (0,1,3,8,12)
BCD-to-7segment decoder Each segment is a Light Emitting Diode (LED) a b c d e f g 1 1 0 1 1 1 1 1 0 0 1 9 1 1 1 1 1 1 1 0 0 0 1 8 0 0 0 0 1 1 1 1 1 1 0 7 1 1 1 1 1 0 1 0 1 1 0 6 1 1 0 1 1 0 1 1 0 1 0 5 1 1 0 0 1 1 0 0 0 1 0 4 1 0 0 1 1 1 1 1 1 0 0 3 1 0 1 1 0 1 1 0 1 0 0 2 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 g f e d c b a D C B A N
BCD-to-7segment decoder   1 1 10     11 1 1 1 0 01 1 1 0 1 00 10 11 01 00 CD AB
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],3. Larger Combinational Systems
Encoder ,[object Object],[object Object],[object Object],[object Object],[object Object]
Keyboard encoder ,[object Object],[object Object],1 2 i  Encoder 9 P 2 P 1 P i A B C D N=i ‘ 1’ P 9
Keyboard encoder A = 1 if (N=8) or (N=9) B = 1 if (N=4) or (N=5) or (N=6)    or (N=7) C = 1 if (N=2) or (N=3) or (N=6)      or (N=7) D = 1 if (N=1) or (N=3) or (N=5)    or (N=7) or (N=9) 1001 9 1000 8 0111 7 0110 6 0101 5 0100 4 0011 3 0010 2 0001 1 ABCD N
Keyboard encoder    1    1    1    1 N=9 N=8 N=7 N=6 N=5 N=4 N=3 N=2 N=1 A B C D
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],3. Larger Combinational Systems
Multiplexor ,[object Object],[object Object],control inputs X 0 X 1 C 0 Y MUX 2-1 C 0 Y 0 X 0 1 X 1 C 1 C 0 Y 0 0 X 0 0 1 X 1 1 0 X 2 1 1 X 3 X 0 X 1 X 2 X 3 C 0 C 1 Y MUX 4-1
2-to-1 Multiplexor MUX 2-1 X 0 X 1 C 0 Y C 0 Y 0 X 0 1 X 1 1 1 1 1 1 0 10 11 01 00 X 1 X 0 C 0 C 0 X 1 X 0 Y 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1
2-to-1 Multiplexor
4-to-1 Multiplexor Y = s 1 ’s 0 ’I 0  + s 1 ’s 0 I 1  +s 1 s 0 ’I 2 + s 1 s 0 I 3
Application of multiplexor ,[object Object],Source 1 Source 2 Receiver Y 3 Y 2 Y 1 Y 0 A = a 3   a 2   a 1  a 0 B = b 3   b 2   b 1  b 0 C 0
Application of multiplexor ,[object Object],A a 0 a 1 a 2 a 3 C 0 C 1 Y a 0 a 1 a 2 a 3 Y C 1 C 0 0 1 0 1 t t t
Application of multiplexor ,[object Object],x 0 x 1 x 2 x 3 C 1   C 0 f(0,0) f(0,1) f(1,0) f(1,1) A B Y = f(A,B) Inputs to select function Variables
Example ,[object Object],x 0 x 1 x 2 x 3 C 1   C 0 0 1 1 0 A B Y = f(A,B) Inputs to select function Variables
3. Larger Combinational Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demultiplexor ,[object Object],[object Object],DeMUX 1-2 E C 0 S 0 S 1
Demultiplexor 1-4 E C 1 C 0 S 0 S 1 S 2 S 3
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],3. Larger Combinational Systems
3.7 Three-State Gates (Tristate) ,[object Object],[object Object],[object Object],[object Object],[object Object]
3.7 Three-State Gates (Tristate) ,[object Object],[object Object]
Three-State buffer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application of three-state buffer ,[object Object],[object Object]
3. Larger Combinational Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.8 Gate Arrays - ROM, PLA and PAL ,[object Object],[object Object],[object Object]
PLA - Programmable logic arrays ,[object Object],[object Object],[object Object],[object Object],A  B C Z1  Z2 m0  0 0 0 0  1 m1  0 0 1 0  0 m2  0 1 0 1  1 m3  0 1 1 0  0 m4  1 0 0 0  1 m5  1 0 1 1  0 m6  1 1 0 1  1 m7  1 1 1 1  0 •  •  • inputs AND array •  •  • outputs OR array product terms
Before programming ,[object Object],[object Object]
After programming ,[object Object],[object Object],[object Object],A B C F1 F2 F3 F0 AB B'C AC' B'C' A
PLA example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],full decoder as for memory address bits stored in memory A B C F1 F2 F3 F4 F5 F6 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 A'B'C' A'B'C A'BC' A'BC AB'C' AB'C ABC' ABC A B C F1 F2 F3 F4 F5 F6
PALs and PLAs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],a given column of the OR array  has access to only a subset of  the possible product terms
ROM – Read Only Memories ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],decoder ,[object Object],[object Object],2  -1 n 0 word[i] = 0011 word[j] = 1010 bit lines (normally pulled to 1 through  resistor – selectively connected to 0  by word line controlled switches) j i internal organization word lines (only one  is active – decoder is  just right for this) Example: 10 address x 8 data ROM 2 10  words x 8 ROM  1024 words x 8 ROM 1k x 8 ROM 1 1 1 1
ROM – Read Only Memories F0 = A' B' C  +  A B' C'  +  A B' C F1 = A' B' C  +  A' B C'  +  A B C F2 = A' B' C'  +  A' B' C  +  A B' C' F3 = A' B C  +  A B' C'  + A B C' ,[object Object],truth table A B C F0 F1 F2 F3 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 1 0 1 0 0 block diagram ROM 8 words x 4 bits/word address outputs A B C F0 F1 F2 F3
ROM structure ,[object Object],[object Object],n address lines •  •  • inputs decoder 2 n  word lines •  •  • outputs memory array (2 n  words by m bits) m data lines
3. Larger Combinational Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.9 Larger Examples ,[object Object],[object Object]
Comparator ,[object Object],a i  > b i   G i =1 a i  < b i   L i =1 a i  = bi  E i =1
Comparator ,[object Object]
Midterm examination (90’) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Midterm examination 2 (90’) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]
4. Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.1 Definitions ,[object Object],[object Object],[object Object],A circuit with memory is a combinatorial circuit  incorporating some feedback connections.
Feedback and memory devices ,[object Object],[object Object],[object Object],The circuit maps input sequences to output sequences
Sequential circuit model ,[object Object],Circuit inputs Circuit outputs Present state Next state
Sequential circuit model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Asynchronous/Synchronous sequential circuits ,[object Object],[object Object],[object Object]
Synchronous sequential circuits ,[object Object],[object Object],[object Object],The operation of the circuit is synchronized with the clock pulse input.
Asynchronous sequential circuits ,[object Object],[object Object]
4. Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
State diagram ,[object Object],[object Object]
Example of state diagram ,[object Object]
State diagram ,[object Object],[object Object]
State table ,[object Object],[object Object],[object Object]
Mealy state table PS: Present State NS: Next State k memory devices => 2 k  rows n circuit inputs => NS portion contains 2 n  columns Output portion also contains 2 n  columns 1 0 c b d 0 0 a d c 0 0 c b b 0 0 a b a x=1 x=0 x=1 x=0 Output (z) NS PS c/1 b/0 d a/0 d/0 c c/0 b/0 b a/0 b/0 a x=1 x=0 NS/Output (z) PS
Moore state table The output portion always contains a single column. The entry at the intersection of any row with the output column indicates the  output values corresponding to the PS associated with that row. 1 a f f 1 e f e 0 e d d 0 c d c 0 c b b 0 a b a z x=1 x=0 Output NS PS
Incompletely specified Mealy state table ,[object Object],[object Object],b/0 c/1 -/- c/0 f a/0 d/1 f/0 -/- e b/1 e/- -/- a/- d -/- -/- f/1 f/0 c -/- -/- -/- e/0 b e/1 b/- c/1 -/- a 10 11 01 00 NS/Output (z) PS
4. Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.3. Latches and Flip-Flops ,[object Object],Δ T Yi yi yi(t+ Δ T) = Yi(t) Δ T Yi yi In practice, we don’t have to actually insert delay elements because propagation  time delays between the inputs and  the outputs of the combinatorial part of the circuit provide  sufficient delay across the feedback loops.
4.3. Latches and Flip-Flops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.3. Latches and Flip-Flops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SR Latch ,[object Object],[object Object],Indeterminate Next state Current state Q = (R+Q’)’ Q’= (S+Q)’ S  Q R  Q’ - 1  1  1 - 1  1  0 1 1  0  1 1 1  0  0 0 0  1  1 0 0  1  0 1 0  0  1 0 0  0  0 Q + S  R  Q
SR Latch Remember Reset Set Equivalent characteristic table SR=’00’  => Output no change A logic ‘1’ at inputs can change outputs’ states => active-HIGH latch S  Q R  Q’ Indeterminate 1  1  1 ,[object Object],0 0  1 Q 0  0  Q + S  R
SR Latch active-HIGH SR Latch active-LOW SR Latch S  Q R  Q’ S  Q R  Q’
SR Latch ,[object Object],set reset reset set S R Q Q
SR Latch ,[object Object],set reset set reset Q Q S R
SR Latch Circuit showing feedback Q +  = R’Q + R’S SR=0 => Q +  = R’Q + R’S + RS = R’Q + S for active-HIGH SR Latch Excitation table -  0 1  1 0  1 1  0 1  0 0  1 0  - 0  0 S  R Q  Q +
D Latch D  Q Q’ S  Q R  Q’ D Graphic symbol Implementation using SR Latch Equivalent characteristic table Excitation table Q *  = D 1 1 0 0 Q * D 1 1  1 0 1  0 1 0  1 0 0  0 D Q  Q *
Gated Latches E: Enable input control  The latch will not change state as long as E=0 E=1  SR=10  =>  Set E=1  SR=01  =>  Reset ,[object Object],[object Object],A latch with synchronous input is called gated latch. S  Q E R  Q’
Flip-flops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SR flip-flop ,[object Object],[object Object],Positive edge-triggered Negative edge-triggered Pulse-triggered (Master-Slave) S  Q CLK R  Q S  Q CLK R  Q S  Q CLK R  Q
SR flip-flop ,[object Object],Pulse-triggered (Master-Slave) Difference between Latch and Flip-flop? ,[object Object],[object Object],[object Object],[object Object],[object Object],S  Q CLK R  Q’
SR flip-flop Indeterminate Next state Current state Characteristic table Reduced characteristic table Excitation table Q(t+1)   = R’Q(t) + S (S=1 & R=1) is inhibited - 1  1  1 - 1  1  0 1 1  0  1 1 1  0  0 0 0  1  1 0 0  1  0 1 0  0  1 0 0  0  0 Q(t+1) S  R  Q Indeterminate 1  1  1 ,[object Object],0 0  1 Q(t) 0  0  Q(t+1) S  R  -  0 1  1 0  1 1  0 1  0 0  1 0  - 0  0 S  R Q  Q(t+1)
Implementation of SR-FF CL S    Q R     Q Q Q S R SR-latch Q Q CL S R Implementation of SR-FF by SR-Latch
SR flip-flop ,[object Object],Q Q S R CL S  Q CLK R  Q
D flip-flop ,[object Object],S  Q CLK R  Q D CLK Positive edge-triggered D flip-flop Implementation using SR flip-flop D  Q CLK Q’
D flip-flop Next state Current state Characteristic table Reduced characteristic table Excitation table Q(t+1)   = D 1 ,[object Object],1 ,[object Object],0 0  1 0 0  0 Q(t+1) D  Q 1 1 0 0  Q(t+1) D 1 1  1 0 1  0 1 0  1 0 0  0 D Q  Q(t+1)
JK flip-flop ,[object Object],[object Object],[object Object],[object Object],S  Q CLK R  Q Positive edge-triggered JK flip-flop Implementation using SR flip-flop J  Q CLK K  Q’
JK flip-flop Next state Current state Characteristic table Reduced characteristic table Excitation table Q(t+1)   = K’Q + JQ’ 0 1  1  1 1 1  1  0 1 1  0  1 1 1  0  0 0 0  1  1 0 0  1  0 1 0  0  1 0 0  0  0 Q(t+1) J  K  Q [Q(t)]’ 1  1  1 ,[object Object],0 0  1 Q(t) 0  0  Q(t+1) J  K  -  0 1  1 -  1 1  0 1  - 0  1 0  - 0  0 J  K Q  Q(t+1)
Master-Slave flip-flop ,[object Object],[object Object],[object Object]
Master-Slave flip-flop ,[object Object],Master latch works when C=1 Slave latch works when C=0 S  Q E R  Q’ S  Q E R  Q’ Master Slave S C R Q Q’
Edge-Triggered flip-flop ,[object Object]
Edge-Triggered flip-flop ,[object Object],Q Q CLK D Y1 Y2
Edge-Triggered flip-flop ,[object Object],Q Q CLK J K
Flip-Flop conversions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],input of y-FF a    Q    b  Q Q Q combinatorial circuit x-FF CL CL
Flip-Flop conversions ,[object Object],S  R  Q  Q+ 0  0  0  0 0  0  1  1 0  1  0  0 0  1  1  0 1  0  0  1 1  0  1  1 1  1  0  - 1  1  1  - Expanded state table  shows the state  transition by the input T  Q 0  0 0  1 1  0 1  1 Q+ 0 1 1 0 T-FF SR-FF
Flip-Flop conversions ,[object Object],state       input Q    Q+    S     R 0  0  0  - 0  1  1  0 1  0  0  1 1  1  -  0 SR-FF S  R  Q  Q+ 0  0  0  0 0  0  1  1 0  1  0  0 0  1  1  0 1  0  0  1 1  0  1  1 1  1  0  - 1  1  1  - expanded state table excitation table Excitation table  shows the input value  corresponding to the state transition
Flip-Flop conversions ,[object Object],T  Q 0  0 0  1 1  0 1  1 Q+ 0 1 1 0 T-FF state     input Q    Q+    T 0  0  0  0  1  1  1  0  1  1  1  0  excitation table
Flip-Flop conversions ,[object Object],T  Q 0  0 0  1 1  0 1  1 Q+ 0 1 1 0 T  Q  Q+  S  R 0  0  0     0  - 0  1  1  -  0 1  0  1  1  0 1  1  0  0  1 state       input Q    Q+    S     R 0  0  0  - 0  1  1  0 1  0  0  1 1  1  -  0 expanded state table of T-FF excitation table of SR-FF
Flip-Flop conversions ,[object Object],Calculate logic function for FF input 0 1 0 1 T Q -  0 0  1 0 1 0 1 T Q 0  -  1  0  Karnaugh Map of  R Karnaugh Map of  S R=TQ S=TQ T  Q  Q+  S  R 0  0  0     0  - 0  1  1  -  0 1  0  1  1  0 1  1  0  0  1 CL CL T S  Q R  Q Q Q
Flip-Flop conversions ,[object Object],D  Q 0  0 0  1 1  0 1  1 Q+ 0 0 1 1 D  Q  Q+  J  K 0  0  0     0  - 0  1  0  -  1 1  0  1  1  - 1  1  1  -  0 state      input Q    Q+     J  K  0  0  0  -  0  1  1  - 1  0  -  1  1  1  -  0  excitation table of JK-FF expanded state table of D-FF
Flip-Flop conversions ,[object Object],D  Q  Q+  J  K 0  0  0     0  - 0  1  0  -  1 1  0  1  1  -  1  1  1  -  0 0 1 0 1 D Q -  1 1  - 0 1 0 1 D Q 0  -  -  0  Karnaugh Map of  J Karnaugh Map of  K J=D K=D D J  Q K  Q Q Q CL CL
4. Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Flip flop excitation equation  ,[object Object],[object Object]
Analysis procedure of sequential circuits ,[object Object],[object Object],[object Object]
Example1: A D flip-flop Moore model circuit ,[object Object],[object Object],[object Object],[object Object],[object Object],Since output is only a function  of state z=q2’, and not directly of input, this is Moore model
Example1: A D flip-flop Moore model circuit State table State diagram q1* = d1 = q1q2’ + xq1’ q2* = d2 = xq1 0 01 00 11 1 11 10 10 0 10 00 01 1 10 00 00 z x=1 x=0 q1q2 q1*q2*
Example2: A JK flip-flop Moore model circuit ,[object Object],[object Object],[object Object],[object Object],[object Object],Since output is only a function  of state z=A+B, and not directly of input, this is Moore model
Example2: A JK flip-flop Moore model circuit State table State diagram A* = A’J A  + AK A = A’x+AxB’ B* = B’J B  + BK B  = B’(x+A’) + B(x+A’)’ 1 10 11 11 1 01 10 10 1 10 00 01 0 11 01 00 z x=1 x=0 AB A*B*
Example2: A JK flip-flop Moore model circuit
Example3: A D flip-flop Mealy model circuit ,[object Object],[object Object],[object Object],[object Object],[object Object],Since output is a function of  both present input and state  z=xq1, this is Mealy model
Example3: A D flip-flop Mealy model circuit q1* = d1 = xq1 + xq2 q2* = d2 = xq1’q2’ ,[object Object],[object Object],[object Object],[object Object],[object Object],1 0 10 00 11 1 0 10 00 10 0 0 10 00 01 0 0 01 00 00 x=1 x=0 x=1 x=0 q z q*
Example3: A D flip-flop Mealy model circuit ,[object Object],0 0 0 1 1 0 0 0 0 0 0 z 0 0 0 0 1 0 0 1 0 ? q2 0 1 1 1 0 0 1 0 0 ? q1 0 1 1 1 1 0 1 1 0 x
Example3: A D flip-flop Mealy model circuit
4. Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design Procedure for Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example1: Design sync sequential circuit using JK ,[object Object],Use Mealy model A: wait for first 0 B: had 0, wait for 1 C: had 01, wait for 0 D: had 010, wait for 1 System x=0101011 .. y=0001010 .. 1/0 A B C D 0/0 1/0 0/0 0/0 0/0 1/0 1/1
Example1: Design sync sequential circuit using JK Use two state variables q 1 q 2  to encode states in binary State table after assignment State table Q 1 Q 2 Q 1 Q 2 C,1 B,0 D A,0 D,0 C C,0 B,0 B A,0 B,0 A 1 0 x S D B 1 C A 0 1 0 q 1 q 2 10,1 01,0 11 00,0 11,0 10 10,0 01,0 01 00,0 01,0 00 1 0 x q 1 q 2
Example1: Design sync sequential circuit using JK q 1 *q 2 * Excitation table Application table 00,0 11,0 10 10,1 01,0 11 10,0 01,0 01 00,0 0 1 ,0 0 0 1 0 x q 1 q 2 0 - 1 1 1 - 0 1 - 1 1 0 - 0 0 0 K J q* q q 1 q 2 x 0 1 J 1 K 1 J 2 K 2 J 1 K 1 J 2 K 2 00 0 - 1- 0 - 0 - 01 0 - - 0 1 - - 1 11 - 1 - 0 - 0 - 1 10 - 0 1 - - 1 0 -
Example1: Design sync sequential circuit using JK Excitation equations: J 1  = xq 2   K 2  = x Output equation:  y = xq 1 q 2   Minimization for J 1 q 1 q 2 x 0 1 J 1 K 1 J 2 K 2 J 1 K 1 J 2 K 2 00 0 - 1- 0 - 0 - 01 0 - - 0 1 - - 1 11 - 1 - 0 - 0 - 1 10 - 0 1 - - 1 0 - x q 1 q 2 0 1 00 0 0 01 0 1 11 - - 10 - -
Ex 1: Design sync sequential circuit using JK J 2   q 2 CLK K 2   q 2 J 1   q 1 CLK K 1   q 1 1 & =1 & y x CLOCK
Ex 2: Design sync sequential circuit using JK ,[object Object]
Ex 3: Design sync sequential circuit using JK ,[object Object]
Design Procedure for Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
S4. State reduction ,[object Object],[object Object],[object Object],[object Object],[object Object]
State reduction ,[object Object],0/0 D C A B E F 1/0 0/0 1/1 0/0 1/1 0/0 1/0 1/0 0/0 1/0 0/0 D C B E AF 0/0 1/1 0/0 1/1 0/0 1/0 1/0 0/0 1/0 0/0 unify A and F A and F have the same output and transition state for the same input
State reduction ,[object Object],D C B E AF 0/0 1/1 0/0 1/1 0/0 1/0 1/0 0/0 1/0 0/0 unify D and E C B AF DE 0/0 1/0 1/0 0/0 0/0 1/1 0/0 1/1 D and E have the same output and transition state for the same input
State reduction ,[object Object],unify B and C C B AF DE 0/0 1/0 1/0 0/0 0/0 1/1 0/0 1/1 BC AF DE 0/0 1/0 0/0 1/1 0/0 1/0
State reduction 0  1  B  C  D  E  E  D  D  F E  F B  C  0  1  0  0  0  1  0  1  0  0 0  0 0  0  A B C D E F current state next state output 0  1  B  C  D  E  E  D  D  AF E  AF 0  1  0  0  0  1  0  1  0  0 0  0  AF B C D E 0  1  B  C  DE  DE  DE  DE  DE  AF 0  1  0  0  0  1  0  1  0  0 AF B C DE 0  1  BC  BC  DE  DE  DE  AF 0  1  0  0  0  1  0  0  AF BC DE current state current state current state next state next state next state output output output
State reduction ,[object Object],[object Object],[object Object],[object Object]
Example of method 1 (1/4) ,[object Object],a f e d c b 1/0 0/0 0/1 1/1 1/0 0/1 1/1 0/0 0/1 1/1 1/0 0/1 0  1  a  b  d  c  a  b  f  e d  c e  a  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],a b c d e f current state next state output
Example of method 1 (2/4) (1) Find a set of state with the same output S1 (a,c) S2 (b,d,e) S3 (f) (2) Rewrite next state by using set of state a : S1,S2 c : S1,S2 b : S2,S1 d : S3,S2 e : S2,S1 f : S2,S1 S1 S2 S3 (b,e) and d are not equivakent hence, divide S2 into S2 and S4 a : S1,S2 c : S1,S2 b : S4,S1 e : S4,S1 f : S2,S1 S1 S2 S3 S4 d : S3,S2 equivalent equivalent 0  1  a  b  d  c  a  b  f  e d  c e  a  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],a b c d e f current state next state output
Example of method 1 (3/4) 0  1  a  b  d  c  a  b  f  e d  c e  a  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],a b c d e f current state next state output a : S1,S2 c : S1,S2 b : S4,S1 e : S4,S1 f : S2,S1 S1 S2 S3 S4 d : S3,S2 (2) Rewrite state transition table 0  1  S1  S2  S4  S1  S3  S2  S2  S1 ,[object Object],[object Object],[object Object],[object Object],[object Object],S1 S2 S4 S3 current state next state output
Example of method 1 (4/4) a f e d c b 1/0 0/0 0/1 1/1 1/0 0/1 1/1 0/0 0/1 1/1 0/1 1 3 2 4 1/0 0/0 0/1 0/1 0/1 1/1 1/1 1/0 Generate state transition diagram 0  1  S1  S2  S4  S1  S3  S2  S2  S1 ,[object Object],[object Object],[object Object],[object Object],[object Object],S1 S2 S4 S3 current state next state output
State reduction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Incompletely specified: don’t care appears in the next state and output compatible pair: for every input, output are the same
Example of method 2 (1/5) current state next state input X 1 X 0 00 01 10 11 d  e  b  - e  -  -  a a  -  -  e -  b  e  d a  b  f  - d  c  -  e output input X 1 X 0 00 01 10 11 0  -  0  - -  1  -  0 1  -  0  - -  0  0  - -  -  -  0 1  -  1  0 a b c d e f a set of not compatible pairs (a,c) (a,f) (b,d) (c,f) (d,f) Implication table a b c d e b c d e f × × × × × 1:fill in × at incompatible pair 2: fill in conditions to be compatible de be ad be bf ae ae de ae de ○ ef ad bc
Example of method 2 (2/5) (a,b,e) (a,b,c,d,e,f) (a,b,d,e,f) (b,c,d,e,f) (a,c) (a,f) (a,b,d,e) (b,d,e,f) (b,d) (b,c,e,f) (c,d,e,f) (b,d) (a,d,e) (b,d) (b,e,f) (d,e,f) (c,f) (b,e,f) (b,c,e) (c,f) (c,d,e) (d,e,f) (d,f) (d,e) (e,f) Maximum compatible set is (a,b,e),(a,d,e),(b,e,f),(b,c,e),(c,d,e) Decompose state set by non compatible pairs (a,c) (a,f) (b,d) (c,f) (d,f) remove duplicated node remove pair involved to other node
Example of method 2 (3/5) Maximum compatible set C1:(a,b,e) C2:(a,d,e) C3:(b,e,f) C4:(b,c,e) C5:(c,d,e) Logic function to represent each set involved a: C1+C2 b: C1+C3+C4 c: C4+C5 d: C2+C5 e: C1+C2+C4+C5 f: C3 Minimum closed set is a subset of maximum compatible set that involves all the state axbxcxdxexf = 1 (C1+C2)(C1+C3+C4)(C4+C5)(C2+C5)(C1+C2+C4+C5)C3 =(C1+C2C3+C2C4)(C2C4+C5) (C1+C2+C4+C5)C3 =(C1C5+C2C3C5+C2C4) (C1+C2+C4+C5)C3 =(C1C5+C2C3C5+C2C4)C3 =C1C3C5+C2C3C5+C2C3C4 hence  (C1,C3,C5),(C2,C3,C5),(C2,C3,C4)  are candidates for minimum closed set
Example of method 2 (4/5) C1:(a,b,e) C2:(a,d,e) C3:(b,e,f) C4:(b,c,e) C5:(c,d,e) candidate for minimum closed set: (C1,C3,C5),(C2,C3,C5),(C2,C3,C4) check state transition of each candidate  by using Implication table C1->(d,e)(a,d),(b,e),(b,f),(a,e) ->(a,d,e)(b,e,f) ->C1,C3 C2 ->(b,e),(a,d),(b,e),(b,f),(e,f) ->(b,e,f)(a,d) ->C3,C2 C3->(a,e),(d,e),(a,d),(b,c) ->(a,d,e)(b,c) ->C2,C4 C4->(a,e) ->(C1|C2) C5->(d,e),(e,f) ->(C2|C5),C3 C2,C3,C4 is closed Implication table a b c d e b c d e f × × × × × de be ad be bf ae ae de ae de ○ ef ad bc
Example of method 2 (5/5) C2:(a,d,e),C3:(b,e,f),C4:(b,c,e) are used current state next state input X 1 X 0 00 01 10 11 d  e  b  - e  -  -  a a  -  -  e -  b  e  d a  b  f  - d  c  -  e output inputX 1 X 0 00 01 10 11 0  -  0  - -  1  -  0 1  -  0  - -  0  0  - -  -  -  0 1  -  1  0 a b c d e f current state next state input X 1 X 0 00 01 10 11 C2 C3 C3 C2 C2 C4 C3 C2 C2 C4 C3 C2 output input X 1 X 0 00 01 10 11 0  0  0  0 1  1  1  0 1  1  0  0 C2 C3 C4 Reduced State Transition Table
Design Procedure for Sequential Systems ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
State assignment ,[object Object],[object Object],[object Object],a b c d b d a c C C1 C2 divide state into blocks so that the next state  of the same block exists in the same block state is allocated to distinguish blocks of SP
State assignment q1 q2 q3 q4 q5 q6 q2 q3 q1 q5 q6 q4 q4 q6 q5 q2 q1 q3 input   X current state next state 0 1 0  0  0 0  0  1 0  1  0 1  0  0 1  0  1 1  1  0 0  0  1 0  1  0 0  0  0 1  0  1 1  1  0 1  0  0 1  0  0 1  1  0 1  0  1 0  0  1 0  0  0 0  1  0 u  u  u u  u  u u  u  u current state input   X next state 0 1 1 2 3 1+ 2+ 3+ 1+ 2+ 3+ block 1 (q1,q2,q3) block 2 (q4,q5,q6) This partition is SP The first bit is used to distinguish the blocks.
[object Object],[object Object]
Problems ,[object Object],[object Object],[object Object],[object Object],[object Object]
Problems for sequential circuit design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMRishabh Kanth
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes VandanaPagar1
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentationSnehalataAgasti
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic familiesBLESSINAR0
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsImran Waris
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Logic gates digital electronics
Logic gates digital electronicsLogic gates digital electronics
Logic gates digital electronicsAkhileshDeshmukh5
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converterUshaswini Chowdary
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersMohammad Bashartullah
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptxhepzijustin
 
Computer Oriented Numerical Methods Practical File
Computer Oriented Numerical Methods Practical FileComputer Oriented Numerical Methods Practical File
Computer Oriented Numerical Methods Practical FileHarjinder Singh
 

Mais procurados (20)

Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
PPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEMPPT ON NUMBER SYSTEM
PPT ON NUMBER SYSTEM
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
Digital electronics logic families
Digital electronics logic familiesDigital electronics logic families
Digital electronics logic families
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Logic gates digital electronics
Logic gates digital electronicsLogic gates digital electronics
Logic gates digital electronics
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
Complements
ComplementsComplements
Complements
 
Number systems
Number systemsNumber systems
Number systems
 
Number System
Number SystemNumber System
Number System
 
Number system
Number systemNumber system
Number system
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 
Chapter 4 number system
Chapter 4 number systemChapter 4 number system
Chapter 4 number system
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptx
 
Computer Oriented Numerical Methods Practical File
Computer Oriented Numerical Methods Practical FileComputer Oriented Numerical Methods Practical File
Computer Oriented Numerical Methods Practical File
 

Destaque

Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theoryjomerson remorosa
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemEddyzulham Mahluzydde
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database SystemSulemang
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)Dilawar Khan
 

Destaque (6)

Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theory
 
01 - Introduction to Computer
01 - Introduction to Computer01 - Introduction to Computer
01 - Introduction to Computer
 
Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management System
 
Dbms
DbmsDbms
Dbms
 
Distributed Database System
Distributed Database SystemDistributed Database System
Distributed Database System
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)
 

Semelhante a Logic Design 2009

Semelhante a Logic Design 2009 (20)

Video lectures
Video lecturesVideo lectures
Video lectures
 
Mba ebooks
Mba ebooksMba ebooks
Mba ebooks
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Data representation
Data representationData representation
Data representation
 
08. Numeral Systems
08. Numeral Systems08. Numeral Systems
08. Numeral Systems
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Lec 02
Lec 02Lec 02
Lec 02
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
Review on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and HexadecimalReview on Number Systems: Decimal, Binary, and Hexadecimal
Review on Number Systems: Decimal, Binary, and Hexadecimal
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
binary-numbers.ppt
binary-numbers.pptbinary-numbers.ppt
binary-numbers.ppt
 
digital-electronics.pptx
digital-electronics.pptxdigital-electronics.pptx
digital-electronics.pptx
 
Number system
Number systemNumber system
Number system
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
number system
number systemnumber system
number system
 
Digital Logic Design.pptx
Digital Logic Design.pptxDigital Logic Design.pptx
Digital Logic Design.pptx
 
ch3a-binary-numbers.ppt
ch3a-binary-numbers.pptch3a-binary-numbers.ppt
ch3a-binary-numbers.ppt
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 
UNIT - I.pptx
UNIT - I.pptxUNIT - I.pptx
UNIT - I.pptx
 

Logic Design 2009

  • 1. Nguyen Thanh Kien Department of Computer Engineering Faculty of Information Technology Hanoi University of Technology Digital Logic Design
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. 1.1.1. Number Representation 11101.11 (2) = 1x2 4 +1x2 3 +1x2 2 +0x2 1 +1x2 0 +1x2 -1 +1x2 -2 = 29.75 (10)
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. 4 bit representation of unsigned and signed (2’s complement) -1 15 1111 -2 14 1110 -3 13 1101 -4 12 1100 -5 11 1011 -6 10 1010 -7 9 1001 -8 8 1000 +7 7 0111 +6 6 0110 +5 5 0101 +4 4 0100 +3 3 0011 +2 2 0010 +1 1 0001 0 0 0000 Signed Unsigned Binary format
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.  
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. Canonical forms f(x2,x1,x0)=m 1 +m 4 +m 5 +m 6 +m 7 = Σ (1,4,5,6,7) f(x2,x1,x0)=M 0 M 2 M 3 = Π (0,2,3) Canonical sum-of-products (SOP) Canonical product-of-sums (POS) 1 1 1 1 7 1 0 1 1 6 1 1 0 1 5 1 0 0 1 4 0 1 1 0 3 0 0 1 0 2 1 1 0 0 1 0 0 0 0 0 f x0 x1 x2 Decimal
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76. Venn diagram A A A+B A.B A.B A+B
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85. Five-variable K-map 00 01 11 10 AB CD 00 01 11 10 00 01 11 10 AB CD 00 01 11 10 E 0 1 5 variables Karnaugh Map consists of two 4 variables Karnaugh Map connected up/down.
  • 86. Six-variable K-map 1 1 1 1 1 1 00 01 11 10 AB CD 00 01 11 10 1 1 1 1 1 1 00 01 11 10 AB CD 00 01 11 10 E 0 1 1 1 1 1 1 1 00 01 11 10 AB CD 00 01 11 10 1 1 1 1 1 1 00 01 11 10 AB CD 00 01 11 10 F 0 1
  • 87. Karnaugh map with don’t care don’t care ~ input conditions that not occur
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117. Examples: F(a,b,c,d)=R(1,3,5,7,12,13) don’t care (0,4,10,15) - 10 - 1 1 11 1 1 - 01 1 1 - 00 10 11 01 00 CD AB
  • 118.
  • 119.
  • 120. 2.3. Quine-Mcluskey method Karnaugh map cannot handle more than 6 variables. Quine-McCluskey method has no limitation with number of variables, and is suitable for computer algorithm. 0 1 00 01 1 11 1 1 10 1 1 AB C ABC+ABC+ABC+ABC+ABC 010 *10 11* 1*0 1*1 10* 110 111 100 101 1** find a pair of numbers of 1 bit difference
  • 121.
  • 122. S1. Represent minterms in binary numbers f = ABCDEF+ABCDEF+ABCDEF+ABCDEF+ABCDEF +ABCDEF+ABCDEF +ABCDEF+ABCDEF+ABCDEF f = 000000+000010+000110+000111+001110 +001000+101001+001100+001111+001010 f(A,B,C,D,E,F)=Σ(0,2,6,7,14,8,41,12,15,10)
  • 123. S2. Grouping f = 000000+000010+000110+000111+001110 +001000+101001+001100+001111+001010 000000 once twice three times 000010 001000 000110 001100 001010 000111 001110 101001 four times 001111 group 0 group 1 group 2 group 3 group 4 group each term by the appearance of 1 no times
  • 124. S3 & S4. Making set (1) 000000 0 000010 2 001000 8 000110 6 001010 10 001100 12 000111 7 001110 14 101001 41 001111 15 0,2 (2) 0,8 (8) 2,6(4) 2,10(8) 8,10(2) 8,12(4) 6,7(1) 6,14(8) 10,14(4) 12,14(2) 7,15(8) 14,15(1) find a pair of 1 bit difference between neighboring group write difference within ( ) mark to the number not included in any set group 0 group 1 group 2 group 3 group 4
  • 125. S3 & S4. Making set (2) 0,2 (2) 0,8 (8) 2,6(4) 2,10(8) 8,10(2) 8,12(4) 6,7(1) 6,14(8) 10,14(4) 12,14(2) 7,15(8) 14,15(1) 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) mark to the set not involved in the next level set when all the set is marked finish Each pair appears in duplicate find a pair of 1 bit different sets with the same value in ( ) between neighboring group append difference within ( )
  • 126. S6. Selecting Prime Implicants (1) 41 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) 0 2 6 7 8 10 12 14 15 41 x x x x x x x x x x x x x x x x x If only one x in a column, then the row is inevitable implicant minterms (given at first) Prime implicant (  marked ) write x into the position where minterm is included in the prime implicant inevitable implicant
  • 127. S6. Selecting Prime Implicants (2) 41 0,2,8,10(2,8) 2,6,10,14(4,8) 8,10,12,14(2,4) 6,7,14,15(1,8) 0 2 6 7 8 10 12 14 15 41 x x x x x x x x x x x x x x x x x mini term prime implicants mark minterms involved in the inevitable implicants inevitable implicants
  • 128. S7. C onversion to logic variables 41 101001 0,2,8,10(2,8) 000000 000010 001000 001010 8,10,12,14(2,4) 001000 001010 001100 001110 6,7,14,15(1,8) 000110 000111 001110 001111 ABCDEF ABDF ABCF ABDE F=ABCDEF +ABDF +ABCF +ABDE
  • 129.
  • 130.
  • 131. Quine-Mcluskey method w ith don’t care f=ABCD+BCD+ACD+ABCD+ABCD don’t care AD mini term ABCD 0000 0001 0010 0011 0101 0111 1011 1101 1111 decimal 0 1 2 3 5 7 11 13 15 first comparison second comparison 0,1(1) 0,2(2) 1,3(2) 1,5(4) 2,3(1) 3,7(4) 3,11(8) 5,7(2) 5,13(8) 7,15(8) 11,15(4) 13,15(2) 0,1,2,3(1,2) 1,3,5,7(2,4) 3,7,11,15(4,8) 5,7,13,15(2,8)
  • 132. Quine-Mcluskey method w ith don’t care 0 2 11 13 15 0,1,2,3(1,2) 1,3,5,7(2,4) 3,7,11,15(4,8) 5,7,13,15(2,8) x x x x x x 00** 0**1 **11 *1*1 ABCD f=AB+CD+BD
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138. Half Adder  =a  b r = ab Half Adder (Carry-out) a b  r 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 =1 & a b  r HA a b  r (Result)
  • 139. Addition of two n-bit numbers  4  3  2  1  0 r 3 r 2 r 1 r 0 A = a 3 a 2 a 1 a 0 +B = b 3 b 2 b 1 b 0 r 4  3 r 3  2 r 2  1 r 1  0 Summation
  • 140. Full Adder  i r i+1  i = a i  b i  r i r i+1 = a i b i + r i (a i  b i ) FA a i r i b i  i r i+1 a i b i r i  i r i+1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 10 11 01 00 a i b i r i 1 1 1 1 1 0 10 11 01 00 a i b i r i
  • 141.
  • 142.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147. Full Adder =1 & r i a i b i =1 &  i r i+1  1
  • 148. Full Adder =1 & r i a i b i =1 &  i r i+1  1 HA HA
  • 149.
  • 150.
  • 151. Parallel 4-bit addition r 4 =  4  3  2  1  0 r 2 r 1 a 2 b 2 a 1 b 1 a 0 b 0 P 3 G 3 P 2 G 2 P 1 G 1 P 0 G 0 Calculate P i and G i a 3 b 3 a 2 b 2 a 1 b 1 a 0 b 0 Carry calculation Sum calculation r 0 a 3 b 3 r 3 r 4 r 0
  • 152.
  • 153.
  • 154. Adder and Subtractor C1 C2 C3 C4 A B C S C+ FA A B C S C+ FA A B C S C+ FA A B C S C+ FA MPX MPX MPX MPX A3 A2 A1 A0 B3 B2 B1 B0 S3 S2 S1 S0 sel
  • 155.
  • 156.
  • 157.
  • 158. Design 3x8 decoder En if (En=0) Disable or D0...D7=0 else if (En=1) Function as a 3x8 decoder
  • 159. BCD-to-decimal decoder BCD to decimal Decoder A B C D Y 0 Y 1 Y i Y 9 : : N A B C D Y 0 Y 1 .. Y 9 0 0 0 0 0 1 0 .. 0 1 0 0 0 1 0 1 .. 0 2 0 0 1 0 0 0 .. 0 3 0 0 1 1 0 0 .. 0 4 0 1 0 0 0 0 .. 0 5 0 1 0 1 0 0 .. 0 6 0 1 1 0 0 0 .. 0 7 0 1 1 1 0 0 .. 0 8 1 0 0 0 0 0 .. 0 9 1 0 0 1 0 0 . 1
  • 160. BCD-to-decimal decoder   10     11 01 1 00 10 11 01 00 CD AB
  • 161.
  • 162. Decoder implementation of arbitrary functions F1(x1,x2,x3,x4)= Σ (0,1,3,8,12)
  • 163. BCD-to-7segment decoder Each segment is a Light Emitting Diode (LED) a b c d e f g 1 1 0 1 1 1 1 1 0 0 1 9 1 1 1 1 1 1 1 0 0 0 1 8 0 0 0 0 1 1 1 1 1 1 0 7 1 1 1 1 1 0 1 0 1 1 0 6 1 1 0 1 1 0 1 1 0 1 0 5 1 1 0 0 1 1 0 0 0 1 0 4 1 0 0 1 1 1 1 1 1 0 0 3 1 0 1 1 0 1 1 0 1 0 0 2 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 g f e d c b a D C B A N
  • 164. BCD-to-7segment decoder   1 1 10     11 1 1 1 0 01 1 1 0 1 00 10 11 01 00 CD AB
  • 165.
  • 166.
  • 167.
  • 168. Keyboard encoder A = 1 if (N=8) or (N=9) B = 1 if (N=4) or (N=5) or (N=6) or (N=7) C = 1 if (N=2) or (N=3) or (N=6) or (N=7) D = 1 if (N=1) or (N=3) or (N=5) or (N=7) or (N=9) 1001 9 1000 8 0111 7 0110 6 0101 5 0100 4 0011 3 0010 2 0001 1 ABCD N
  • 169. Keyboard encoder  1  1  1  1 N=9 N=8 N=7 N=6 N=5 N=4 N=3 N=2 N=1 A B C D
  • 170.
  • 171.
  • 172. 2-to-1 Multiplexor MUX 2-1 X 0 X 1 C 0 Y C 0 Y 0 X 0 1 X 1 1 1 1 1 1 0 10 11 01 00 X 1 X 0 C 0 C 0 X 1 X 0 Y 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1
  • 174. 4-to-1 Multiplexor Y = s 1 ’s 0 ’I 0 + s 1 ’s 0 I 1 +s 1 s 0 ’I 2 + s 1 s 0 I 3
  • 175.
  • 176.
  • 177.
  • 178.
  • 179.
  • 180.
  • 181. Demultiplexor 1-4 E C 1 C 0 S 0 S 1 S 2 S 3
  • 182.
  • 183.
  • 184.
  • 185.
  • 186.
  • 187.
  • 188.
  • 189.
  • 190.
  • 191.
  • 192.
  • 193.
  • 194.
  • 195.
  • 196.
  • 197.
  • 198.
  • 199.
  • 200.
  • 201.
  • 202.
  • 203.
  • 204.
  • 205.
  • 206.
  • 207.
  • 208.
  • 209.
  • 210.
  • 211.
  • 212.
  • 213.
  • 214.
  • 215.
  • 216.
  • 217. Mealy state table PS: Present State NS: Next State k memory devices => 2 k rows n circuit inputs => NS portion contains 2 n columns Output portion also contains 2 n columns 1 0 c b d 0 0 a d c 0 0 c b b 0 0 a b a x=1 x=0 x=1 x=0 Output (z) NS PS c/1 b/0 d a/0 d/0 c c/0 b/0 b a/0 b/0 a x=1 x=0 NS/Output (z) PS
  • 218. Moore state table The output portion always contains a single column. The entry at the intersection of any row with the output column indicates the output values corresponding to the PS associated with that row. 1 a f f 1 e f e 0 e d d 0 c d c 0 c b b 0 a b a z x=1 x=0 Output NS PS
  • 219.
  • 220.
  • 221.
  • 222.
  • 223.
  • 224.
  • 225.
  • 226. SR Latch active-HIGH SR Latch active-LOW SR Latch S Q R Q’ S Q R Q’
  • 227.
  • 228.
  • 229. SR Latch Circuit showing feedback Q + = R’Q + R’S SR=0 => Q + = R’Q + R’S + RS = R’Q + S for active-HIGH SR Latch Excitation table - 0 1 1 0 1 1 0 1 0 0 1 0 - 0 0 S R Q Q +
  • 230. D Latch D Q Q’ S Q R Q’ D Graphic symbol Implementation using SR Latch Equivalent characteristic table Excitation table Q * = D 1 1 0 0 Q * D 1 1 1 0 1 0 1 0 1 0 0 0 D Q Q *
  • 231.
  • 232.
  • 233.
  • 234.
  • 235.
  • 236. Implementation of SR-FF CL S   Q R   Q Q Q S R SR-latch Q Q CL S R Implementation of SR-FF by SR-Latch
  • 237.
  • 238.
  • 239.
  • 240.
  • 241.
  • 242.
  • 243.
  • 244.
  • 245.
  • 246.
  • 247.
  • 248.
  • 249.
  • 250.
  • 251.
  • 252.
  • 253.
  • 254.
  • 255.
  • 256.
  • 257.
  • 258.
  • 259. Example1: A D flip-flop Moore model circuit State table State diagram q1* = d1 = q1q2’ + xq1’ q2* = d2 = xq1 0 01 00 11 1 11 10 10 0 10 00 01 1 10 00 00 z x=1 x=0 q1q2 q1*q2*
  • 260.
  • 261. Example2: A JK flip-flop Moore model circuit State table State diagram A* = A’J A + AK A = A’x+AxB’ B* = B’J B + BK B = B’(x+A’) + B(x+A’)’ 1 10 11 11 1 01 10 10 1 10 00 01 0 11 01 00 z x=1 x=0 AB A*B*
  • 262. Example2: A JK flip-flop Moore model circuit
  • 263.
  • 264.
  • 265.
  • 266. Example3: A D flip-flop Mealy model circuit
  • 267.
  • 268.
  • 269.
  • 270. Example1: Design sync sequential circuit using JK Use two state variables q 1 q 2 to encode states in binary State table after assignment State table Q 1 Q 2 Q 1 Q 2 C,1 B,0 D A,0 D,0 C C,0 B,0 B A,0 B,0 A 1 0 x S D B 1 C A 0 1 0 q 1 q 2 10,1 01,0 11 00,0 11,0 10 10,0 01,0 01 00,0 01,0 00 1 0 x q 1 q 2
  • 271. Example1: Design sync sequential circuit using JK q 1 *q 2 * Excitation table Application table 00,0 11,0 10 10,1 01,0 11 10,0 01,0 01 00,0 0 1 ,0 0 0 1 0 x q 1 q 2 0 - 1 1 1 - 0 1 - 1 1 0 - 0 0 0 K J q* q q 1 q 2 x 0 1 J 1 K 1 J 2 K 2 J 1 K 1 J 2 K 2 00 0 - 1- 0 - 0 - 01 0 - - 0 1 - - 1 11 - 1 - 0 - 0 - 1 10 - 0 1 - - 1 0 -
  • 272. Example1: Design sync sequential circuit using JK Excitation equations: J 1 = xq 2 K 2 = x Output equation: y = xq 1 q 2 Minimization for J 1 q 1 q 2 x 0 1 J 1 K 1 J 2 K 2 J 1 K 1 J 2 K 2 00 0 - 1- 0 - 0 - 01 0 - - 0 1 - - 1 11 - 1 - 0 - 0 - 1 10 - 0 1 - - 1 0 - x q 1 q 2 0 1 00 0 0 01 0 1 11 - - 10 - -
  • 273. Ex 1: Design sync sequential circuit using JK J 2 q 2 CLK K 2 q 2 J 1 q 1 CLK K 1 q 1 1 & =1 & y x CLOCK
  • 274.
  • 275.
  • 276.
  • 277.
  • 278.
  • 279.
  • 280.
  • 281. State reduction 0 1 B C D E E D D F E F B C 0 1 0 0 0 1 0 1 0 0 0 0 0 0 A B C D E F current state next state output 0 1 B C D E E D D AF E AF 0 1 0 0 0 1 0 1 0 0 0 0 AF B C D E 0 1 B C DE DE DE DE DE AF 0 1 0 0 0 1 0 1 0 0 AF B C DE 0 1 BC BC DE DE DE AF 0 1 0 0 0 1 0 0 AF BC DE current state current state current state next state next state next state output output output
  • 282.
  • 283.
  • 284.
  • 285.
  • 286.
  • 287.
  • 288. Example of method 2 (1/5) current state next state input X 1 X 0 00 01 10 11 d e b - e - - a a - - e - b e d a b f - d c - e output input X 1 X 0 00 01 10 11 0 - 0 - - 1 - 0 1 - 0 - - 0 0 - - - - 0 1 - 1 0 a b c d e f a set of not compatible pairs (a,c) (a,f) (b,d) (c,f) (d,f) Implication table a b c d e b c d e f × × × × × 1:fill in × at incompatible pair 2: fill in conditions to be compatible de be ad be bf ae ae de ae de ○ ef ad bc
  • 289. Example of method 2 (2/5) (a,b,e) (a,b,c,d,e,f) (a,b,d,e,f) (b,c,d,e,f) (a,c) (a,f) (a,b,d,e) (b,d,e,f) (b,d) (b,c,e,f) (c,d,e,f) (b,d) (a,d,e) (b,d) (b,e,f) (d,e,f) (c,f) (b,e,f) (b,c,e) (c,f) (c,d,e) (d,e,f) (d,f) (d,e) (e,f) Maximum compatible set is (a,b,e),(a,d,e),(b,e,f),(b,c,e),(c,d,e) Decompose state set by non compatible pairs (a,c) (a,f) (b,d) (c,f) (d,f) remove duplicated node remove pair involved to other node
  • 290. Example of method 2 (3/5) Maximum compatible set C1:(a,b,e) C2:(a,d,e) C3:(b,e,f) C4:(b,c,e) C5:(c,d,e) Logic function to represent each set involved a: C1+C2 b: C1+C3+C4 c: C4+C5 d: C2+C5 e: C1+C2+C4+C5 f: C3 Minimum closed set is a subset of maximum compatible set that involves all the state axbxcxdxexf = 1 (C1+C2)(C1+C3+C4)(C4+C5)(C2+C5)(C1+C2+C4+C5)C3 =(C1+C2C3+C2C4)(C2C4+C5) (C1+C2+C4+C5)C3 =(C1C5+C2C3C5+C2C4) (C1+C2+C4+C5)C3 =(C1C5+C2C3C5+C2C4)C3 =C1C3C5+C2C3C5+C2C3C4 hence (C1,C3,C5),(C2,C3,C5),(C2,C3,C4) are candidates for minimum closed set
  • 291. Example of method 2 (4/5) C1:(a,b,e) C2:(a,d,e) C3:(b,e,f) C4:(b,c,e) C5:(c,d,e) candidate for minimum closed set: (C1,C3,C5),(C2,C3,C5),(C2,C3,C4) check state transition of each candidate by using Implication table C1->(d,e)(a,d),(b,e),(b,f),(a,e) ->(a,d,e)(b,e,f) ->C1,C3 C2 ->(b,e),(a,d),(b,e),(b,f),(e,f) ->(b,e,f)(a,d) ->C3,C2 C3->(a,e),(d,e),(a,d),(b,c) ->(a,d,e)(b,c) ->C2,C4 C4->(a,e) ->(C1|C2) C5->(d,e),(e,f) ->(C2|C5),C3 C2,C3,C4 is closed Implication table a b c d e b c d e f × × × × × de be ad be bf ae ae de ae de ○ ef ad bc
  • 292. Example of method 2 (5/5) C2:(a,d,e),C3:(b,e,f),C4:(b,c,e) are used current state next state input X 1 X 0 00 01 10 11 d e b - e - - a a - - e - b e d a b f - d c - e output inputX 1 X 0 00 01 10 11 0 - 0 - - 1 - 0 1 - 0 - - 0 0 - - - - 0 1 - 1 0 a b c d e f current state next state input X 1 X 0 00 01 10 11 C2 C3 C3 C2 C2 C4 C3 C2 C2 C4 C3 C2 output input X 1 X 0 00 01 10 11 0 0 0 0 1 1 1 0 1 1 0 0 C2 C3 C4 Reduced State Transition Table
  • 293.
  • 294.
  • 295. State assignment q1 q2 q3 q4 q5 q6 q2 q3 q1 q5 q6 q4 q4 q6 q5 q2 q1 q3 input   X current state next state 0 1 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 u u u u u u u u u current state input   X next state 0 1 1 2 3 1+ 2+ 3+ 1+ 2+ 3+ block 1 (q1,q2,q3) block 2 (q4,q5,q6) This partition is SP The first bit is used to distinguish the blocks.
  • 296.
  • 297.
  • 298.