Answers: Binary and Hexadecimal Numbers

1. Write each of the following decimal numbers in binary.

Hint: To convert a binary number to its decimal equivalent, evaluate each digit position as a power of 2. The decimal value of 20 is 1, 21 is 2, 22 is 4, and so on. For example, the binary number 1111 is equal to 15 decimal.

a.
2 = 00000010
g.
15 = 00001111
b.
7 = 00000111
h.
16 = 00010000
c.
5 = 00000101
i.
20 = 00010100
d.
8 = 00001000
j.
27 = 00011011
e.
9 = 00001001
k.
32 = 00100000
f.
12 = 00001100
l.
64 = 01000000

 

2. Write each of the following binary numbers in decimal:

Hint: To calculate the decimal value of a binary number, add the value of each bit position containing a 1 to the number’s total value. For example, the binary number 0 0 0 0 1 0 0 1 may be interpreted in decimal as  (1 * 23) + (1 * 20).

  
a.
00000101
 = 5 
g.
00110000 
 = 48 
b.
00001111
 = 15   
h.
00100111 
 = 39
c.
00010000
 = 16
i.
01000000 
 = 64
d.
00010110
 = 22 
j.
01100011 
 = 99
e.
00001011
 = 11 
k.
10100000 
 = 160
f.
00011100
 = 28 
l.
10101010 
 = 170

 

3. Write each of the following binary numbers in hexadecimal:

Hint: To calculate the hexadecimal value of a binary number, translate each group of four bits to its equivalent hexadecimal digit. For example, 1100 = C, and 1011 = B.

  
a.
00000101
 = 05h  
g.
00110000 
 = 30h 
b.
00001111
 = 0Fh 
h.
00100111 
 = 27h
c.
00010000
 = 10h
i.
01001000 
 = 48h
d.
00010110
 = 16h 
j.
01100011 
 = 63h
e.
00001011
 = 0Bh 
k.
10100000 
 = A0h
f.
00011100
 = 1Ch 
l.
10101011 
 = ABh

 

4. Write each of the following hexadecimal numbers in binary:

Hint: To calculate the binary value of a hexadecimal number, translate each hexadecimal digit into its corresponding four-bit binary pattern. (You can also translate the digit to decimal, and then convert it to its equivalent binary bit pattern.) For example, hex C= 1100, and hex B = 1011.

  
a.
0005h = 00000101
    
g.
0030h = 00110000
b.
000Fh = 00001111
  
h.
0027h = 00100111
c.
0010h = 00010000
  
i.
0048h = 01001000
d.
0016h = 00010110
  
j.
0063h = 01100011
e.
000Bh = 00001011
  
k.
A064h = 10100000 01100100
f.
001Ch = 00011100
  
l.
ABDEh = 10101011 11011110

 

5. Write each of the following hexadecimal numbers in decimal:

Hint: To calculate the decimal value of a hexadecimal number, multiply each hexadecimal digit by its corresponding power of 16. The sum of these products is the decimal value of the number. For example, hexadecimal 12A = (1 * 256) + (2 * 16) + (10 * 1) = 298. Hint: 160 = 1, 161 = 16, 162 = 256, and 163 = 4096. Also, you can use the following Hexadecimal digit table as an aid:

Extended Hexadecimal Digits
A = 10 B = 11
C = 12 D = 13
E = 14 F = 15

Answers:

  
a.
00D5h = 213 
g.
0B30h = 2864 
b.
002Fh = 47
h.
06DFh = 1759
c.
0110h = 272
i.
1AB6h = 6838
d.
0216h = 534
j.
0A63h = 2659
e.
004Bh = 75
k.
02A0h = 672
f.
041Ch = 1052 
l.
1FABh = 8107