💡 Activity Solution
💡 Activity Solution
1️⃣ Binary conversions:
✨ Convert 44 → Binary
Divide 44 by 2:
44 ÷ 2 = 22, remainder 0
22 ÷ 2 = 11, remainder 0
11 ÷ 2 = 5, remainder 1
5 ÷ 2 = 2, remainder 1
2 ÷ 2 = 1, remainder 0
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 0 1 1 0 0
Pad to 8 bits: 00101100
✅ 44 (decimal) = 00101100 (binary)
✨ Convert 129 → Binary
Divide 129 by 2:
129 ÷ 2 = 64, remainder 1
64 ÷ 2 = 32, remainder 0
32 ÷ 2 = 16, remainder 0
16 ÷ 2 = 8, remainder 0
8 ÷ 2 = 4, remainder 0
4 ÷ 2 = 2, remainder 0
2 ÷ 2 = 1, remainder 0
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 0 0 0 0 0 0 1
✅ 129 (decimal) = 10000001 (binary)
✨ Convert 512 → Binary
Divide 512 by 2:
512 ÷ 2 = 256, remainder 0
256 ÷ 2 = 128, remainder 0
128 ÷ 2 = 64, remainder 0
64 ÷ 2 = 32, remainder 0
32 ÷ 2 = 16, remainder 0
16 ÷ 2 = 8, remainder 0
8 ÷ 2 = 4, remainder 0
4 ÷ 2 = 2, remainder 0
2 ÷ 2 = 1, remainder 0
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 0 0 0 0 0 0 0 0 0
✅ 512 (decimal) = 1000000000 (binary)
✨ Convert 717 → Binary
Divide 717 by 2:
717 ÷ 2 = 358, remainder 1
358 ÷ 2 = 179, remainder 0
179 ÷ 2 = 89, remainder 1
89 ÷ 2 = 44, remainder 1
44 ÷ 2 = 22, remainder 0
22 ÷ 2 = 11, remainder 0
11 ÷ 2 = 5, remainder 1
5 ÷ 2 = 2, remainder 1
2 ÷ 2 = 1, remainder 0
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 0 1 1 0 0 1 1 0 1
✅ 717 (decimal) = 1011001101 (binary)
✨ Convert 999 → Binary
Divide 999 by 2:
999 ÷ 2 = 499, remainder 1
499 ÷ 2 = 249, remainder 1
249 ÷ 2 = 124, remainder 1
124 ÷ 2 = 62, remainder 0
62 ÷ 2 = 31, remainder 0
31 ÷ 2 = 15, remainder 1
15 ÷ 2 = 7, remainder 1
7 ÷ 2 = 3, remainder 1
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 1 1 1 0 0 1 1 1
✅ 999 (decimal) = 1111100111 (binary)
2️⃣ Example (Name: “Omar”):
💡 Example (Name: “Omar”) to Binary:
🔤 Step 1 — Get the ASCII Codes
🔤 Step 2: Now we convert each decimal value to binary using repeated division:
✨ Convert "O" (79) to Binary
Divide 79 by 2:
79 ÷ 2 = 39, remainder 1
39 ÷ 2 = 19, remainder 1
19 ÷ 2 = 9, remainder 1
9 ÷ 2 = 4, remainder 1
4 ÷ 2 = 2, remainder 0
2 ÷ 2 = 1, remainder 0
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 0 0 1 1 1 1
Pad to 8 bits: 01001111
✅ O = 01001111
✨ Convert "m" (109) to Binary
Divide 109 by 2:
109 ÷ 2 = 54, remainder 1
54 ÷ 2 = 27, remainder 0
27 ÷ 2 = 13, remainder 1
13 ÷ 2 = 6, remainder 1
6 ÷ 2 = 3, remainder 0
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 1 0 1 1 0 1
Pad to 8 bits: 01101101
✅ m = 01101101
✨ Convert "a" (97) to Binary
Divide 79 by 2:
97 ÷ 2 = 48, remainder 1
48 ÷ 2 = 24, remainder 0
24 ÷ 2 = 12, remainder 0
12 ÷ 2 = 6, remainder 0
6 ÷ 2 = 3, remainder 0
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 1 0 0 0 0 1
Pad to 8 bits: 01100001
✅ a = 01100001
✨ Convert "r" (114) to Binary
Divide 114 by 2:
114 ÷ 2 = 57, remainder 0
57 ÷ 2 = 28, remainder 1
28 ÷ 2 = 14, remainder 0
14 ÷ 2 = 7, remainder 0
7 ÷ 2 = 3, remainder 1
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1
Now read remainders bottom → top:
1 1 1 0 0 1 0
Pad to 8 bits: 01110010
✅ r = 01110010
🎯 Final Result — “Omar” in Binary
O m a r 01001111 01101101 01100001 01110010
✅ “Omar” = 01001111 01101101 01100001 01110010

0 comments