Because they behave like arithmetic. A⋅B acts like multiplication: 0⋅0=0,1⋅1=1. A+B acts like addition except1+1=1 (it saturates, it can't overflow past 1). This analogy is the whole reason it's called algebra.
You don't memorize XOR's formula — you build it. "When do the inputs differ?" Either (A=1,B=0) or (A=0,B=1). Translate each English word into algebra:
"A=1 and B=0" ⇒A⋅Bˉ
"A=0 and B=1" ⇒Aˉ⋅B
"either...or" ⇒+
A⊕B=ABˉ+AˉB
Why this step? Each row of a truth table where output = 1 becomes one AND-term (a minterm); we OR all those terms together. This is called Sum of Products (SOP) and it lets you derive a formula for any truth table.
Imagine light switches. AND is two switches in a row — the bulb glows only if both are on. OR is two switches side by side — either one lights the bulb. NOT is a backwards switch: push it and the light goes off. XOR is the trick hallway light — flick either switch and it changes, so it's on only when the switches disagree. NAND/NOR are just the "opposite-day" versions of AND/OR. Wire enough of these toy switches together and you've literally built a computer's brain.
Dekho, computer ke andar sirf do hi cheezein hoti hain: 0 aur 1 (off ya on, low ya high voltage). Boolean algebra inhi do values ki maths hai. Jaise normal maths mein plus aur multiply hote hain, waise hi yahan AND, OR, NOT, XOR, NAND, NOR operations hote hain. AND tab 1 deta hai jab dono inputs 1 hon (sabki haan zaroori). OR tab 1 jab koi ek bhi 1 ho (ek haan kaafi hai). NOT simply bit ko ulta kar deta hai. XOR tab 1 jab dono inputs alag hon (disagreement detector). NAND aur NOR bas AND/OR ke ulte (negated) versions hain.
Sabse important trick hai De Morgan's law: A⋅B=Aˉ+Bˉ aur A+B=Aˉ⋅Bˉ. Yaad rakho — "bar ko todo, sign badlo" (AND ban jaata OR, OR ban jaata AND). Ye law itna powerful hai ki sirf NAND gate se hi pura computer ban sakta hai, isliye factory mein bas NAND banao aur kaam chal jaata hai.
Sabse common galti: students sochte hain OR mein 1+1=0 hota hai (kyunki English mein "ya to chai ya coffee" matlab ek). Galat! Boolean OR inclusive hai, 1+1=1. "Exactly one" wala matlab XOR ka hai. Doosri galti: De Morgan lagate waqt sirf bar laga dete hain par operator (AND/OR) badalna bhool jaate hain.
Padhne ka tareeka: truth table ko dhakk ke khud se dobara likho (active recall), phir XOR ka formula ABˉ+AˉB truth table se khud derive karo, ratta mat maaro. Yeh 6 gates digital electronics ki ABCD hain — inhe samajh liya to adder, memory, processor sab samajh aa jayega.