What is the primary reason networking professionals need to understand binary-to-decimal conversion?
A) To make IP addresses easier to remember.
B) To configure router hostnames correctly.
C) To calculate valid IP addresses, subnet masks, and understand network addressing.
D) To encrypt data for secure transmission.
C) To calculate valid IP addresses, subnet masks, and understand network addressing.
Explanation: Subnetting, verifying if an IP address is on the same network, and understanding a subnet mask all rely on working with the binary foundation of IP addresses. The decimal “dotted-decimal” notation is just for human convenience.
In an 8-bit binary number, what is the decimal value of the bit in the “128s place” (the leftmost bit)?
A) 1
B) 128
C) 255
D) 8
B) 128
Explanation: The positional values for an 8-bit binary number, from left to right (most significant to least significant bit), are: 128, 64, 32, 16, 8, 4, 2, 1.
Convert the following 8-bit binary number to decimal: 1100 0011
A) 195
B) 165
C) 75
D) 255
A) 195
Explanation:
1100 0011 = (1x128) + (1x64) + (0x32) + (0x16) + (0x8) + (0x4) + (1x2) + (1x1) = 128 + 64 + 0 + 0 + 0 + 0 + 2 + 1 = 195
Convert the following 8-bit binary number to decimal: 0010 1010
A) 42
B) 52
C) 84
D) 44
A) 42
Explanation:
0010 1010 = (0x128) + (0x64) + (1x32) + (0x16) + (1x8) + (0x4) + (1x2) + (0x1) = 0 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 42
Convert the decimal number 172 to an 8-bit binary number.
A) 1010 1100
B) 1100 1100
C) 1010 1010
D) 1011 1100
A) 1010 1100
Explanation:
172 >= 128? Yes. So, the 128s bit is 1. Remainder: 172-128=44.
44 >= 64? No. So, the 64s bit is 0.
44 >= 32? Yes. So, the 32s bit is 1. Remainder: 44-32=12.
12 >= 16? No. So, the 16s bit is 0.
12 >= 8? Yes. So, the 8s bit is 1. Remainder: 12-8=4.
4 >= 4? Yes. So, the 4s bit is 1. Remainder: 4-4=0.
0 >= 2? No. So, the 2s bit is 0.
0 >= 1? No. So, the 1s bit is 0.
Result: 1010 1100
Convert the decimal number 224 to an 8-bit binary number.
A) 1110 0000
B) 1100 0000
C) 1111 0000
D) 1110 1110
A) 1110 0000
Explanation:
224 >= 128? Yes. Bit=1. Remainder: 96.
96 >= 64? Yes. Bit=1. Remainder: 32.
32 >= 32? Yes. Bit=1. Remainder: 0.
0 >= 16? No. Bit=0.
0 >= 8? No. Bit=0.
0 >= 4? No. Bit=0.
0 >= 2? No. Bit=0.
0 >= 1? No. Bit=0.
Result: 1110 0000
What is the first step in converting a decimal number to hexadecimal using the method described?
A) Convert the decimal number directly to a single hexadecimal digit.
B) Convert the decimal number to an 8-bit binary string.
C) Divide the number by 16 and note the remainder.
D) Convert the number to its ASCII value.
B) Convert the decimal number to an 8-bit binary string.
Explanation: The textbook’s three-step process begins with: “1. Convert the decimal number to 8-bit binary strings.” This creates the base-2 representation that we will then group into nibbles (4-bit groups) for hex conversion.
After you have the 8-bit binary string, what is the next step?
A) Convert each bit directly to its hex value.
B) Divide the binary string into groups of four, starting from the right.
C) Add leading zeros to make it a 16-bit string.
D) Subtract the binary value from 255.
B) Divide the binary string into groups of four, starting from the right.
Explanation: Step 2 in the process is: “Divide the binary strings in groups of four starting from the rightmost position.” This creates the “nibbles” that correspond directly to single hexadecimal digits.
Using the textbook method, what is the hexadecimal value of the decimal number 168?
A) A8
B) 8A
C) 58
D) 2F
A) A8
Explanation: Following the steps:
168 in binary is 10101000.
Groups of four from the right: 1010 and 1000.
1010 is hex A, and 1000 is hex 8.
Result: A8
You are converting the decimal number 245 to hexadecimal. After completing step 1, you have the binary string 11110101. What do you do next?
A) Convert 11110101 directly to hex.
B) Divide it into the groups 1111 and 0101.
C) Divide it into the groups 11, 1101, and 01.
D) Convert it back to decimal to check your work.
B) Divide it into the groups 1111 and 0101.
Explanation: The rule is to group from the right. The 8-bit binary 11110101 divided into two groups of four from the right is: 1111 (the leftmost 4 bits) and 0101 (the rightmost 4 bits).
After dividing the binary for 245 into 1111 and 0101, what is the final hexadecimal answer?
A) F5
B) 5F
C) F1
D) 1F
A) F5
Explanation:
The first group, 1111, converts to hexadecimal F.
The second group, 0101, converts to hexadecimal 5.
Combining them gives the result: F5.
What is the foundational principle for converting a hexadecimal number to a decimal number?
A) Each hex digit is converted directly to its ASCII code.
B) Each hex digit represents a power of 16, based on its position.
C) You must first convert the hex to binary and then to decimal.
D) Hex digits are multiplied by powers of 10.
B) Each hex digit represents a power of 16, based on its position.
Explanation: Just like in decimal where positions are ones, tens, hundreds (powers of 10), in hexadecimal, the positions from right to left are: 16⁰ (1s), 16¹ (16s), 16² (256s), and so on. Each hex digit is multiplied by its positional power of 16 and then summed.
What is the first step you should take when converting a hexadecimal number like A8 to decimal?
A) Multiply A and 8 together.
B) Convert each hex digit to its decimal equivalent.
C) Write out the positional values (powers of 16) for each digit.
D) Convert the entire number to binary first.
B) Convert each hex digit to its decimal equivalent.
Explanation: Before you can do the math, you need to know the decimal value of each hex symbol.
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
(0-9 are the same in both systems)
Convert the hexadecimal number A8 to decimal.
A) 168
B) 108
C) 188
D) 148
A) 168
Explanation:
The rightmost digit (8) is in the 16⁰ (1s) place. Value: 8 * 1 = 8
The leftmost digit (A) is in the 16¹ (16s) place. Value: 10 * 16 = 160
Sum the values: 160 + 8 = 168
Convert the hexadecimal number F5 to decimal.
A) 245
B) 255
C) 155
D) 215
A) 245
Explanation:
The rightmost digit (5) is in the 16⁰ (1s) place. Value: 5 * 1 = 5
The leftmost digit (F) is in the 16¹ (16s) place. Value: 15 * 16 = 240
Sum the values: 240 + 5 = 245
Convert the hexadecimal number 2F to decimal.
A) 45
B) 47
C) 37
D) 57
B) 47
Explanation:
The rightmost digit (F) is in the 16⁰ (1s) place. Value: 15 * 1 = 15
The leftmost digit (2) is in the 16¹ (16s) place. Value: 2 * 16 = 32
Sum the values: 32 + 15 = 47
Convert the hexadecimal number C0 to decimal.
A) 192
B) 202
C) 182
D) 172
A) 192
Explanation:
The rightmost digit (0) is in the 16⁰ (1s) place. Value: 0 * 1 = 0
The leftmost digit (C) is in the 16¹ (16s) place. Value: 12 * 16 = 192
Sum the values: 192 + 0 = 192