Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 1 — Arithmetic Circuits: Half Adder and Full Adder

Lesson 11 of 49 in the free Computer Organization and Architecture notes on Siksha Sarovar, written by Rohit Jangra.

Adders

An adder is the combinational circuit that performs binary addition. It is the first genuinely useful circuit you can design with the tools from the previous lessons, and it sits at the heart of every ALU.

1. Half Adder

Adds two bits and produces a sum and a carry. It cannot accept a carry from a previous stage — hence "half".

Truth table

ABSum (S)Carry (C)
0000
0110
1010
1101

Boolean equations

   S = A'B + AB' = A ⊕ B
   C = A . B

Gate implementation

Cost: 1 XOR + 1 AND. Using NAND only: 5 NAND gates.

Limitation: cannot be cascaded. To add multi-bit numbers you must accept a carry in.

2. Full Adder

Adds three bits: A, B and a carry-in from the previous stage.

Truth table

ABCinSum (S)Cout
00000
00110
01010
01101
10010
10101
11001
11111
   S    = Σm(1, 2, 4, 7)
   Cout = Σm(3, 5, 6, 7)

K-map for Sum

              B Cin
         00     01     11     10
       +------+------+------+------+
   A=0 |  0   |  1   |  0   |  1   |
       | (0)  | (1)  | (3)  | (2)  |
       +------+------+------+------+
   A=1 |  1   |  0   |  1   |  0   |
       | (4)  | (5)  | (7)  | (6)  |
       +------+------+------+------+

   No two 1s are adjacent -> NO simplification possible.
   S = A'B'Cin + A'BCin' + AB'Cin' + ABCin
     = A ⊕ B ⊕ Cin        (the checkerboard pattern always means XOR)

K-map for Carry-out

              B Cin
         00     01     11     10
       +------+------+------+------+
   A=0 |  0   |  0   |  1   |  0   |
       +------+------+------+------+
   A=1 |  0   |  1   |  1   |  1   |
       +------+------+------+------+

   Group m3, m7 -> B.Cin
   Group m5, m7 -> A.Cin
   Group m6, m7 -> A.B

   Cout = AB + B.Cin + A.Cin

Alternative form of Cout (used in the two-half-adder construction)

   Cout = AB + Cin(A ⊕ B)

   Proof:  Cin(A ⊕ B) = Cin(A'B + AB') = A'B.Cin + AB'.Cin
           AB + A'B.Cin + AB'.Cin
         = AB(1) + BCin(A' + A) ... expand AB into AB(Cin + Cin'):
         = ABCin + ABCin' + A'BCin + AB'Cin
         = Σm(7, 6, 3, 5)  ✓  same as the K-map

3. Full Adder from Two Half Adders

   HA1:  S1 = A ⊕ B          C1 = A . B
   HA2:  S  = S1 ⊕ Cin       C2 = S1 . Cin
   Then: Cout = C1 + C2 = AB + (A ⊕ B).Cin

   Total gates: 2 XOR + 2 AND + 1 OR = 5 gates
   Using NAND only: 9 NAND gates

4. Worked Verification

   Add A = 1, B = 1, Cin = 1  (decimal 1 + 1 + 1 = 3 = binary 11)

   S1   = 1 ⊕ 1 = 0
   C1   = 1 . 1 = 1
   S    = 0 ⊕ 1 = 1
   C2   = 0 . 1 = 0
   Cout = 1 + 0 = 1

   Result: Cout S = 1 1 = 3 decimal  ✓

5. Propagation Delay

Assume each gate has delay t.

CircuitSum delayCarry delay
Half adder1t (XOR)1t (AND)
Full adder (two-level SOP)2t2t
Full adder (two half adders)2t (XOR → XOR)3t (XOR → AND → OR)

The carry path is the critical path — this single fact drives the entire design of fast adders in the next lesson.

6. Half Adder vs Full Adder

BasisHalf AdderFull Adder
Inputs2 (A, B)3 (A, B, Cin)
Outputs2 (S, C)2 (S, Cout)
Handles carry-in?NoYes
Cascadable?NoYes
Gates1 XOR + 1 AND2 XOR + 2 AND + 1 OR
NAND-only count59
Used forLSB position onlyAll positions of a parallel adder
EquationsS = A⊕B, C = ABS = A⊕B⊕Cin, Cout = AB + Cin(A⊕B)

7. The Adder as a Building Block

   A full adder can also be viewed as a "1-bit counter of ones":
      it counts how many of its three inputs are 1,
      and outputs that count in 2 bits (Cout, Sum).

   000 -> 00 (0)     011 -> 01 wait, 0+1+1 = 2 -> Cout=1, S=0 -> "10" = 2  ✓
   111 -> Cout=1, S=1 -> "11" = 3  ✓

This viewpoint explains why full adders are used inside multipliers as "3:2 compressors".

The next lesson does subtraction — and then shows the trick that lets one circuit do both.