YEH KEY IDEA KYUN HAI: decimal (base-10) bilkul isi tarah kaam karta hai, hum bas itne aadat ho gaye hain ki
bhool jaate hain. Binary same rule reuse karta hai with b=2.
Decimal check (formula KYA kehta hai):25310=2⋅102+5⋅101+3⋅100=200+50+3
Same machinery, b=10.
Q1:210 predict karo. → 1024Q2: Number 200 store karne ke liye kitne bits chahiye? Forecast: 2n>200 chahiye; 27=128<200, 28=256>200 → 8 bits.
Q3:1001102 convert karo. Forecast around 32+4+2=38... check: 32+0+0+4+2+0=38.
Kya aapke forecasts match kiye? Koi bhi gap ab fix karo.
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: ek 12-saal ke bacche ko explain karo
Ek row of light switches imagine karo. Har switch sirf OFF (0) ya ON (1) ho sakta hai. Numbers banane ke liye, hum
har switch ko ek "worth" dete hain: sabse rightmost 1 worth hai, agla 2, agla 4, agla 8 — har baar double hota jaata hai.
Number padhne ke liye, un switches ki worth add karo jo ON hain. "8" aur "2"
aur "1" switches ON karo → 8+2+1=11. Ek single switch ek bit hai; eight switches ek line mein ek
byte banate hain, aur ek byte koi bhi number 0 se lekar 255 tak dikha sakta hai. Computer aslmein yahi hai:
tiny switches ki badi badi rows.