1. Binary to Decimal Conversion
Basic Method:
Write powers of 2 under each digit (right to left) Multiply each binary digit by its position value Calculation
Binary: 1 1 0 0 0 0 0 1
Position: 128 64 32 16 8 4 2 1
(2^7)(2^6)(2^5)(2^4)(2^3)(2^2)(2^1)(2^0)
Result: 128 + 64 + 0 + 0 + 0 + 0 + 0 + 1 = 193
Essential Powers of 2:
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2. Decimal to Binary Conversion
Read remainders bottom to top Example: 125 to binary
125 ÷ 2 = 62 r 1
62 ÷ 2 = 31 r 0
31 ÷ 2 = 15 r 1
15 ÷ 2 = 7 r 1
7 ÷ 2 = 3 r 1
3 ÷ 2 = 1 r 1
1 ÷ 2 = 0 r 1
Result: 1111101
3. Important Subnet Mask Values
Descending Pattern:
Decimal Binary Gap Down CIDR
255 11111111 (-1) /32
254 11111110 (-2) /31
252 11111100 (-4) /30
248 11111000 (-8) /29
240 11110000 (-16) /28
224 11100000 (-32) /27
192 11000000 (-64) /26
128 10000000 /25
Ascending Pattern:
128 (+64) = 192
192 (+32) = 224
224 (+16) = 240
240 (+8) = 248
248 (+4) = 252
252 (+2) = 254
254 (+1) = 255
4. Quick Reference Patterns
Common Binary Values:
text
128 = 10000000
192 = 11000000
224 = 11100000
240 = 11110000
248 = 11111000
252 = 11111100
254 = 11111110
255 = 11111111
5. Memory Tips and Tricks
For Binary to Decimal:
Remember powers of 2: 1,2,4,8,16,32,64,128 Only add where there's a 1 For Decimal to Binary:
Write remainders bottom to top For Subnet Masks:
Each gap doubles going down Each step removes one rightmost 1 The gap equals the removed power of 2 6. Practice Examples
Binary to Decimal:
10101010 = 128 + 32 + 8 + 2 = 170
11001100 = 128 + 64 + 8 + 4 = 204
Decimal to Binary:
150 = 10010110
200 = 11001000
7. Common Applications
Network/host calculations Binary operations in programming 8. Key Points to Remember
Powers of 2 are fundamental Practice pattern recognition Understand the relationship between gaps Use the doubling/halving pattern These notes cover the essential concepts for binary calculations without a calculator, perfect for networking exams and practical applications.