CEC 220 Digital Circuit Design CEC 220 Digital Circuit Design Truth Tables, Incomplete Functions , & Full Adders Wed, January 28 CEC 220 Digital Circuit Design
CEC 220 Digital Circuit Design Lecture Outline Examples of Truth Table Construction Incompletely Specified Functions Design of Adders and Subtractors Wed, January 28 CEC 220 Digital Circuit Design
Examples of Truth Table Construction Design a binary adder that adds two 1-bit binary numbers (A and B) to give a 2-bit sum (X Y) A B X Y 0 0 1 A B X Y 1 A B X Y 0 0 1 0 1 1 0 A B X Y 0 0 1 0 1 A B X Y 0 0 1 0 1 + A X A + B X Y B Y This device is sometimes called a half-adder Wed, January 28 CEC 220 Digital Circuit Design
Examples of Truth Table Construction Design a binary adder that adds two UNSIGNED 2-bit binary numbers to form a 3-bit sum. A B + C D X Y Z X= S m (7,10,11,13,14,15) Y= S m (2,3,5,6,8,9,12,15) Z= S m (1,3,4,6,9,11,12,14) Wed, January 28 CEC 220 Digital Circuit Design
Incompletely Specified Functions The four inputs to a circuit (A,B,C,D) represent an 8-4-2-1 BCD digit. The output should be 1 iff the decimal number represented by the inputs is exactly divisible by three (i.e. a remainder of “0”). Assume that only valid BCD digits occur as inputs. 0123456789 These inputs will not occur. Do I care what the associated outputs are? Wed, January 28 CEC 220 Digital Circuit Design
Incompletely Specified Functions Consider the truth table If we make both don’t cares “0” If we make 𝑑 1 a “1” and 𝑑 6 a “0” If we make 𝑑 1 a “0” and 𝑑 6 a “1” If we make 𝑑 1 a “1” and 𝑑 6 a “1” A B C 1 F 1 F 1 X F 1 F 1 F 1 We can select the “don’t cares” to make our expression simpler!! Wed, January 28 CEC 220 Digital Circuit Design
Design of Adders and Subtracters A Binary Adder Design a 1-bit Full-Adder A B Cin Cout S 1 A + B Cout S + Cin = Sum Wed, January 28 CEC 220 Digital Circuit Design
Design of Adders and Subtracters A 4-bit Binary Adder Design a 4-bit adder (S=A+B): Considering 2’s complement arithmetic: Ignore Cout3 Overflow Set Cin0 = 0 1-bit Full Adder A3 B3 S3 Cin3 Cout3 1-bit Full Adder A2 B2 S2 Cin2 Cout2 1-bit Full Adder A1 B1 S1 Cin1 Cout1 1-bit Full Adder A0 B0 S0 Cin0 Cout0 Wed, January 28 CEC 220 Digital Circuit Design
Design of Adders and Subtracters Our adder is “slow” as it propagates the carry Can develop carry look-ahead circuitry How can I do subtraction Add A+(-B) -B = Flip all of the bits and add “1” 1-bit Full Adder A3 B3 S3 Cin3 Cout3 1-bit Full Adder A2 B2 S2 Cin2 Cout2 1-bit Full Adder A1 B1 S1 Cin1 Cout1 1-bit Full Adder A0 B0 S0 Cin0 Cout0 =1 Wed, January 28 CEC 220 Digital Circuit Design
CEC 220 Digital Circuit Design Next Lecture Karnaugh Maps Wed, January 28 CEC 220 Digital Circuit Design