Convert 78 decimal into 8 bit unsigned binary.
- 78 - 64 = 14
- 14 - 8 = 6
- 6 - 4 = 2
- 2 - 2 = 0
- 128 64 32 16 8 4 2 1
- --0 -1 -0 -0 1 1 1 0
Convert 10110010 binary to decimal.
- 128 64 32 16 8 4 2 1
- --1 -0 -1 -1 0 0 1 0
Convert 1101111 binary to hexadecimal.
- Split into nibbles (4 bits).
- Convert each nibble to decimal.
- 8 4 2 1
- 1 1 0 1 8 + 4 + 1 = 13 decimal
- 8 4 2 1
- 1 1 1 1 8 + 4 + 2 + 1 = 15 decimal
- Reference Legend.
11011111 → 1101 + 1111
10: A, 11: B, 12:C, 13:D, 14:E, 15:F
Convert B2 hexadecimal to binary.
- Split apart hexadecimal characters.
- Convert each character to decimal using legend.
- Convert each decimal number to 4 bit binary.
- 8 4 2 1
- 1 0 1 1
- 8 4 2 1
- 0 0 1 0
- Concatenate the two 4-bit binary strings.
B2 = B + 2
B: 11 decimal, 2: 2 decimal
11 → 4 bit binary
2 → 4 bit binary
1011 + 0010 → 10110010
Convert A3 hexadecimal to decimal.
- Split apart hexadecimal characters.
- Convert each character to decimal using legend.
- Convert each decimal number to 4 bit binary.
- 8 4 2 1
- 1 0 1 0
- 8 4 2 1
- 0 0 1 1
- Concatenate the two 4-bit binary strings.
- Convert 8-bit binary string into decimal.
- 128 64 32 16 8 4 2 1
- --1 -0 -1 -0 0 0 1 1
- 128 + 32 + 2 + 1 = 163
A3 → A + 3
A: 10 decimal, 3: 3 decimal
10 decimal → 4-bit binary
3 decimal → 4-bit binary
1010 + 0011 → 10100011
Answer: 163
Convert 156 decimal to hexadecimal.
- Convert decimal to 8-bit binary.
- 156 - 128 = 28
- 28 - 16 = 12
- 12 - 8 = 4
- 4 - 4 = 0
- 128 64 32 16 8 4 2 1
- --1 -0 -0 -1 1 1 0 0
- Split 8 bit binary string into two 4-bit binary strings.
- Convert each nibble to decimal.
- 8 4 2 1
- 1 0 0 1
- 8 + 1 = 9 decimal
- 8 4 2 1
- 1 1 0 0
- 8 + 4 = 12 decimal
- Convert each decimal character to hexadecimal using legend.
- 9 = 9 hexadecimal
- 12 = C hexadecimal
Answer: 10011100
10011100 → 1001 + 1100
Answer: 9C
Why is hexadecimal used in shorthand for binary.
- Simple to convert hexadecimal into binary
- Compact meaning hexadecimal can represent larger numbers using fewer characters
- Compact therefore Less likely for errors to be made in transcription
- Compact therefore Quicker to record