Dept. of Electrical and Computer Eng., NCTU Lab 5. Full Adder Presenter: Chun-Hsien Ko Contributors: Chung-Ting Jiang and Lin-Kai Chiu Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Outlines Adder How to Design a Logic Circuit Half Adder and Full Adder DIP Switch Lab 3: 1-bit Full Adder Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Adder (Half Adder) Describing binary summation of two one-bit binary inputs Two inputs x and y Two outputs C(carry) and S(sum) Carry (C) is represented the carry out bit Sum (S) is represented the sum of x and y Black box can be represented as Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Design flow Draw truth table We have 2 inputs (x and y), so there has 4 cases List the corresponding output (C and S) Then output is sum of product S = x’y + x y’ = x y C = x y x y C S 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 x y S C Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU How to cascade the half adder? Describing binary summation of three one-bit inputs Three inputs and two outputs Black box can be represented as Cin Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Design flow Draw truth table Then output is sum of product S = x y’Cn’ + x’y’Cn + x yCn + x’yCn’ = x y Cn Cn+1 = xy + xCn + yCn +xyCn = xy + xCn + yCn Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Using AND, OR, XOR to build a full adder 7408 (AND) 7486 (XOR) 7432 (OR) Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU DIP switch (指撥開關) Switch the High/Low voltage for Logic 1/0 Reserving the circuit of DIP switch for following experiments The inner circuit of DIP switch Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU The related circuit of DIP switch Use the 220Ω resistance (Red-Red-Brown) When the switch of pin 16 and pin 1 is connected, the logic of input is “1” When the switch of pin 16 and pin 1 is not connected, the logic of input is “0” Connect to inputs Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Resistor Network (排阻) Signal form here Dept. of Electrical and Computer Eng., NCTU
Dept. of Electrical and Computer Eng., NCTU Lab 3: 1-bit Full Adder Use DIP switch as the input signal Use LED to display the outputs (carry and sum) Question: How to extend to N-bit Adder? Dept. of Electrical and Computer Eng., NCTU