Chapter 2

Practice Problem 2.1

Perform the following number conversions:
A. 0x39A7F8 to binary: 0011 1001 1010 0111 1111 1000
B. Binary 1100100101111011 to hexadecimal
1100 1001 0111 1011
c 9 7 b
0xc97b
C. 0xD5E4C to binary
1101 0101 1110 0100 1100
D. Binary 1001101110011110110101 to hexadecimal
0010 0110 1110 0111 1011 0101
2 6 e 7 b 5
0x26e7b5

Practice Problem 2.2

Fill in the blank entries in the following table, giving the decimal and hexadecimal representations of different powers of 2:
n 2^n(base 10) 2^n(Hexadecimal)
9 512 0x200
19 524,288 0x80000
14 16,384 0x4000
16 65,536 0x10000
17 131,072 0x20000
5 32 0x20
7 128 0x80

Practice Problem 2.3

A single byte can be represented by two hexadecimal digits. Fill in the missing entries in the following table, giving the decimal, binary, and hexadecimal values of different byte patterns:
Decimal Binary Hexadecimal
0 0000 0000 0x00
167 1010 0111 0xa7
62 0011 1110 0x3e
188 1011 1100 0xbc
55 0011 0111 0x37
136 1000 1000 0x88
243 1111 0011 0xf3
82 0101 0010 0x52
172 1010 1100 0xac
231 1110 0111 0xe7