Q1: Predict 210. → 1024Q2: How many bits to store the number 200? Forecast: need 2n>200; 27=128<200, 28=256>200 → 8 bits.
Q3: Convert 1001102. Forecast around 32+4+2=38... check: 32+0+0+4+2+0=38.
Did your forecasts match? Fix any gap now.
Physical switches/transistors have two stable states (ON/OFF), naturally representing 1/0.
In a positional system base b, the value of digit di at position i is?
di⋅bi.
Convert 10112 to decimal.
8+2+1=11.
Convert 110102 to decimal.
16+8+2=26.
Convert 1310 to binary.
1101 (remainders read bottom-up).
Method to convert decimal to binary?
Repeated division by 2; remainders read bottom-to-top.
What is a bit?
A single binary digit, 0 or 1; smallest unit of data.
How many bits in a byte?
8 bits.
How many bits in a nibble?
4 bits.
How many patterns fit in n bits?
2n.
Unsigned range of n bits?
0 to 2n−1.
Max unsigned value in one byte and why?
255, because 256 patterns run 0..255 (0 is counted).
1 KiB equals how many bytes?
210=1024 bytes.
Why read division remainders bottom-up?
First remainder is the 20 (least significant) bit.
Recall Feynman: explain to a 12-year-old
Imagine a row of light switches. Each switch is only OFF (0) or ON (1). To make numbers, we
give each switch a "worth": the rightmost is worth 1, next 2, next 4, next 8 — doubling each
time. To read a number, add up the worths of the switches that are ON. Turn on the "8" and "2"
and "1" switches → 8+2+1=11. A single switch is a bit; eight switches in a row make a
byte, and one byte can show any number from 0 up to 255. That's all a computer really is:
huge rows of tiny switches.
Dekho, computer ke andar bas chhote-chhote switches hote hain jo ya to ON hote hain ya OFF —
beech ka koi option nahi. Isiliye computer sirf do symbol samajhta hai: 0 aur 1. Isko hum
binary (base-2) kehte hain. Jaise decimal me har column ka value 1,10,100 hota hai,
waise hi binary me har column doubling karta hai: 1,2,4,8,16…. Number padhne ke liye
jahan-jahan 1 hai, us column ka weight jod do. Example: 10112=8+0+2+1=11.
Decimal ko binary banane ke liye repeated division by 2 karo. Har baar remainder (0 ya 1)
note karo, aur last me remainders ko neeche se upar padho. Yaad rakhna — top-se-bottom padhoge
to number ulta ho jayega, ye sabse common galti hai.
Ek single 0/1 ko bit bolte hain — sabse chhoti unit. 8 bits milke ek byte banate hain,
aur 4 bits ek nibble. Important formula: n bits me 2n alag-alag patterns aa sakte hain,
isliye unsigned range hoti hai 0 se 2n−1 tak. Isliye ek byte me maximum value 255 hoti hai,
256 nahi — kyunki counting 0 se shuru hoti hai. Ye base samajh liya to logic gates aur poora
hardware asaan lagega, kyunki sab kuch inhi 0/1 pe chalta hai.