Task 1 - Converting Decimal to Binary and Binary to Decimal
Step 1: Convert 146 into binary.
- Action: Convert the decimal number 146 into binary.
- Explanation:
- Start with the highest power of 2 less than or equal to 146.
- 128 (2^7) fits into 146, so write down 1.
- 146 - 128 = 18.
- 64 (2^6) does not fit into 18, so write down 0.
- 32 (2^5) does not fit into 18, so write down 0.
- 16 (2^4) fits into 18, so write down 1.
- 18 - 16 = 2.
- 8 (2^3) does not fit into 2, so write down 0.
- 4 (2^2) does not fit into 2, so write down 0.
- 2 (2^1) fits into 2, so write down 1.
- 2 - 2 = 0.
- 1 (2^0) does not fit into 0, so write down 0.
- Your answer should be: 10010010.
Step 2: Convert 222 into binary.
- Action: Convert the decimal number 222 into binary.
- Explanation:
- 128 (2^7) fits into 222, so write down 1.
- 222 - 128 = 94.
- 64 (2^6) fits into 94, so write down 1.
- 94 - 64 = 30.
- 32 (2^5) does not fit into 30, so write down 0.
- 16 (2^4) fits into 30, so write down 1.
- 30 - 16 = 14.
- 8 (2^3) fits into 14, so write down 1.
- 14 - 8 = 6.
- 4 (2^2) fits into 6, so write down 1.
- 6 - 4 = 2.
- 2 (2^1) fits into 2, so write down 1.
- 2 - 2 = 0.
- 1 (2^0) does not fit into 0, so write down 0.
- Your answer should be: 11011110.
Step 3: Convert 119 into binary.
- Action: Convert the decimal number 119 into binary.
- Explanation:
- 64 (2^6) fits into 119, so write down 1.
- 119 - 64 = 55.
- 32 (2^5) fits into 55, so write down 1.
- 55 - 32 = 23.
- 16 (2^4) fits into 23, so write down 1.
- 23 - 16 = 7.
- 8 (2^3) does not fit into 7, so write down 0.
- 4 (2^2) fits into 7, so write down 1.
- 7 - 4 = 3.
- 2 (2^1) fits into 3, so write down 1.
- 3 - 2 = 1.
- 1 (2^0) fits into 1, so write down 1.
- Your answer should be: 01110111.
Step 4: Convert 135 into binary.
- Action: Convert the decimal number 135 into binary.
- Explanation:
- 128 (2^7) fits into 135, so write down 1.
- 135 - 128 = 7.
- 64 (2^6) does not fit into 7, so write down 0.
- 32 (2^5) does not fit into 7, so write down 0.
- 16 (2^4) does not fit into 7, so write down 0.
- 8 (2^3) does not fit into 7, so write down 0.
- 4 (2^2) fits into 7, so write down 1.
- 7 - 4 = 3.
- 2 (2^1) fits into 3, so write down 1.
- 3 - 2 = 1.
- 1 (2^0) fits into 1, so write down 1.
- Your answer should be: 10000111.
Step 5: Convert 60 into binary.
- Action: Convert the decimal number 60 into binary.
- Explanation:
- 32 (2^5) fits into 60, so write down 1.
- 60 - 32 = 28.
- 16 (2^4) fits into 28, so write down 1.
- 28 - 16 = 12.
- 8 (2^3) fits into 12, so write down 1.
- 12 - 8 = 4.
- 4 (2^2) fits into 4, so write down 1.
- 4 - 4 = 0.
- 2 (2^1) does not fit into 0, so write down 0.
- 1 (2^0) does not fit into 0, so write down 0.
- Your answer should be: 00111100.
Step 6: Convert 10100101 into decimal.
- Action: Convert the binary number 10100101 into decimal.
- Explanation:
- 1(128) + 0(64) + 1(32) + 0(16) + 0(8) + 1(4) + 0(2) + 1(1)
- Decimal: 128 + 32 + 4 + 1 = 165
Step 7: Convert 11100011 into decimal.
- Action: Convert the binary number 11100011 into decimal.
- Explanation:
- 1(128) + 1(64) + 1(32) + 0(16) + 0(8) + 0(4) + 1(2) + 1(1)
- Decimal: 128 + 64 + 32 + 2 + 1 = 227
Step 8: Convert 10110011 into decimal.
- Action: Convert the binary number 10110011 into decimal.
- Explanation:
- 1(128) + 0(64) + 1(32) + 1(16) + 0(8) + 0(4) + 1(2) + 1(1)
- Decimal: 128 + 32 + 16 + 2 + 1 = 179
Step 9: Convert 00110101 into decimal.
- Action: Convert the binary number 00110101 into decimal.
- Explanation:
- 0(128) + 0(64) + 1(32) + 1(16) + 0(8) + 1(4) + 0(2) + 1(1)
- Decimal: 32 + 16 + 4 + 1 = 53
Step 10: Convert 10010111 into decimal.
- Action: Convert the binary number 10010111 into decimal.
- Explanation:
- 1(128) + 0(64) + 0(32) + 1(16) + 0(8) + 1(4) + 1(2) + 1(1)
- Decimal: 128 + 16 + 4 + 2 + 1 = 151
Step 11: You have finished the lab.
- Action: Review and practice the steps to reinforce your understanding. Consider retaking the lab using the Suggested Approach link for a deeper challenge.
Summary:
In this lab, you successfully converted various decimal numbers into their binary equivalents and vice versa. This exercise is fundamental in understanding how data is represented and processed in networking, which is crucial for tasks like subnetting and IP addressing. Mastery of these conversions will greatly benefit your networking skills, especially in preparing for certifications like CCENT.