n-bitAdditionDesign an n-bit binary adder which performs theaddition of two n-bit binary numbers and generates an-bit sum and a carry out.Example: Let n=4CoC3 C2 Ci 01outAs A, Ai Ao110+1 1 0 1B3 B, Bi Bo+1010S3 S2 Si So
n-bit Addition ◼ Design an n-bit binary adder which performs the addition of two n-bit binary numbers and generates a n-bit sum and a carry out. ◼ Example: Let n=4 Cout C3 C2 C1 C0 1 1 0 1 0 A3 A2 A1 A0 1 1 0 1 + B3 B2 B1 B0 +1 1 0 1 - - S3 S2 S1 S0 1 0 1 0
FullAdderFull adder (for higher-order bit addition)Combinational circuit that performs theadditions of 3 bits (two bits and a carry-inbit)A; B;1 bitc;Ci+1fulladderS;
Full Adder ◼ Full adder (for higher-order bit addition) ◼ Combinational circuit that performs the additions of 3 bits (two bits and a carry-in bit) 1 bit full adder Ai Bi Ci+1 Si Ci
Full Adder (cont.)The K-maps forSBNB;C;> Ci+1:A:B:C;Ai
Full Adder (cont.) Ai Bi Ci Si Ci+1 ◼ The K-maps for ➢ Ci+1: ➢ Si : BiCi Ai BiCi Ai
Full Adder (cont.)Boolean equations> Ci+1 =A,B; +A,Ci + B,Ci>S:=AB’C’+AB'C,+ABC’+ABC= A; ④ B; ④ CiYou can design full adder circuit directly fromthe above equations (requires 3 ANDs and 1 ORfor Ci+1 and 2 XORs for S,)
Full Adder (cont.) ◼Boolean equations: ➢ Ci+1 = AiBi + AiCi + BiCi ➢ Si = AiBi ’ Ci ’ + Ai ’Bi ’Ci + Ai ’BiCi ’ + AiBiCi = Ai Bi Ci ◼You can design full adder circuit directly from the above equations (requires 3 ANDs and 1 OR for Ci+1 and 2 XORs for Si )
Full Adder using 2 Half AddersA full adder can also be realized with two half adders and anOR gate, since Ci+1 can also be expressed as:Ci+1 = A,B; + A,B;C; + A,B;C;=AB: +(A,B:+ A,B)C=A,B: + (A; @ B:)Cand S: = A; ④ B; @ CiHalfadderHalfadder4S;B+C
Full Adder using 2 Half Adders ◼ A full adder can also be realized with two half adders and an OR gate, since Ci+1 can also be expressed as: ◼ Ci+1 = AiBi + AiBi ’Ci + Ai ’BiCi = AiBi + (AiBi ’ + Ai ’Bi )Ci = AiBi + (Ai Bi )Ci ◼ and Si = Ai Bi Ci Ai Bi Ci Ci+1 Si