3.3.1 · HinglishCombinational Circuits

Half adder and full adder

1,785 words8 min readRead in English

3.3.1 · Hardware › Combinational Circuits


Hume YE kyun chahiye?

KYA chahiye hame: ek circuit jo, input bits dene par, unka arithmetic sum binary mein output kare.

Dikkat yeh hai: — ek do-bit ka answer. Toh kisi bhi adder ko do outputs chahiye:

  • Sum (current column ka bit)
  • Carry (woh bit jo agle column mein jaati hai)

KAISE hum logic dhundhte hain: truth table banao, phir Boolean expression padho.


Half Adder

Isse scratch se derive karna

Har input combination aur arithmetic result list karo:

(decimal) Carry Sum
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 2 = 1 0

Yeh step kyun? Table bas "ones ginlo aur binary mein likho" hai. Abhi koi Boolean guessing nahi — pure arithmetic truth.

Ab columns padho:

  • tab 1 hai jab aur alag hon → woh hai XOR.
  • tab 1 hai jab dono 1 hon → woh hai AND.

Full Adder

Isse scratch se derive karna

sum(dec)
0 0 0 0 0 0
0 0 1 1 0 1
0 1 0 1 0 1
0 1 1 2 1 0
1 0 0 1 0 1
1 0 1 2 1 0
1 1 0 2 1 0
1 1 1 3 1 1

Yeh step kyun? Phir se, teenon inputs mein 1s gino aur count ko 2-bit binary mein likho.

Sum padhna: jab 1s ki sankhya odd ho (count 1 ya 3 wali rows). "Odd number of 1s" teeno ka XOR hai: Kyun? XOR output ko har baar flip karta hai jab ek input 1 ho; odd count use 1 par chhodta hai.

Carry padhna: jab kam se kam do inputs 1 hon. Minterms group karo: Yeh majority function hai — teenon inputs mein se majority jo value rakhti hai woh output karo.

Doosri form equivalent kyun hai (algebra ka steel-man): . add karo. Jab , term pehle se fire ho jaata hai. Jab exactly ek mein se 1 ho, tab isliye doosra term fire hoga agar ho. Yeh "≥2 ones" ko exactly reproduce karta hai — se match karta hai. ✓

Do half adders se full adder

Figure — Half adder and full adder

Worked examples


Common mistakes


Recall Feynman: ek 12-saal ke bacche ko samjhao

Socho tum 1 + 1 add kar rahe ho sirf 0 aur 1 buttons ke saath. Answer hai "do," lekin tum "2" nahi likh sakte — tumhare paas sirf 0 aur 1 hain! Toh tum yahan ek 0 likhte ho aur ek chota 1 agli jagah carry kar dete ho, jaise normal addition mein carry karte hain. Half adder ek choti machine hai jo do buttons ke liye yeh karti hai. Lekin kabhi kabhi ek carry daayein se aati hai, toh tum actually teen cheezein add kar rahe ho. Full adder woh badi machine hai jo teeno handle kar sakti hai. Full adders ki ek row laga do aur woh bade numbers add kar sakti hai, ek column ek baar — aise computers add karte hain!

Flashcards

Kisi bhi binary adder cell ke do outputs kya hain?
Sum (is column ka bit) aur Carry (agle column ko pass hone wala bit).
Half adder Sum equation?
(XOR).
Half adder Carry equation?
(AND).
Ise "half" adder kyun kehte hain?
Yeh sirf do bits add karta hai aur pichle stage se carry-in accept nahi kar sakta.
Full adder ke kitne inputs hote hain?
Teen: , , aur .
Full adder Sum equation?
(inputs ka odd/parity).
Full adder Carry-out equation?
(majority function).
Do half adders se full adder — final carry?
, yaani do half-adder carries ka OR.
Common mistake: kya half-adder carry OR hai?
Nahi — yeh AND hai; carry sirf tab jab DONO bits 1 hon.
Full adders chain karne par kaun sa multi-bit adder milta hai?
Ek ripple-carry adder (har agla feed karta hai).
ke liye, kya hai?
.

Connections

  • XOR gate — woh parity behavior jo Sum output ko power deta hai
  • AND gate aur OR gate — carry logic banate hain
  • Ripple-carry adder — full adders chain kiye hue
  • Carry-lookahead adder — tez carry, ripple delay se bachta hai
  • Truth tables and minterms — yahan use ki gayi derivation method
  • Two's complement subtraction — adders subtraction ke liye reuse hote hain
  • Combinational circuits — parent family (koi memory nahi, output = f(inputs))

Concept Map

needs two outputs

because 1+1 equals 10 base 2

read off logic

read off logic

adds two bits A and B

cannot accept carry-in

extended to three inputs

adds A, B and Cin

majority of inputs

chained together

Binary column addition

Sum and Carry

Two-bit answer

Truth table

Half adder

Full adder

S = A XOR B, C = A AND B

Incomplete for chaining

S = A XOR B XOR Cin

Cout = AB + BCin + ACin

CPU adds any-length numbers