Skip to content

Ahmad Ali Ahmad Othman - Section 1 - Sheet 2

1. Convert these binary numbers to decimal.

A. 0001 01102

101102=124+023+122+121+020=16+4+2=2210

B. 1001 01012

100101012=127+026+025+124+023+122+021+120=128+16+4+1=14910

C. 1001 0000 10012

1001000010012=1211+0210+029+128+027+026+025+024+123+022+021+120=2048+256+8+1=231310

D. 0110 10112

11010112=126+125+024+123+022+121+120=64+32+8+2+1=10710

E. 1111 11112

111111112=127+126+125+124+123+122+121+120=128+64+32+16+8+4+2+1=25510




F. 0110 11112

11011112=126+125+024+123+122+121+120=64+32+8+4+2+1=11110

G. 0011 1101 01112

11110101112=129+128+127+126+025+124+023+122+121+120=512+256+128+64+16+4+2+1=98310

H. 1101 11112

110111112=127+126+025+124+123+122+121+120=128+64+16+8+4+2+1=22310

2. Convert the following decimal values to binary.

n2nn2n
01664
127128
248256
389512
416101024
532112048

A. 37

3710=32+4+1=25+0+0+22+21+0=0010 01102



B. 13

1310=8+4+1=23+22+0+20=11012

C. 189

18910=128+32+16+8+4+1=27+0+25+24+23+22+0+20=1011 11012

D. 1000

100010=512+256+128+64+32+8=29+28+27+26+25+0+23+0+0+0=0011 1110 10002

E. 77

7710=64+8+4+1=26+0+0+23+22+0+20=0100 11012

F. 390

39010=256+128+4+2=28+27+0+0+0+0+22+21+0=0001 1000 01102

G. 205

20510=128+64+8+4+1=27+26+0+0+23+22+0+20=1100 11012

H. 2133

213310=2048+64+16+4+1=211+0+0+0+0+26+0+24+0+22+0+20=0100 0010 01012

I. 511

51110=256+128+64+32+16+8+4+2+1=28+27+26+25+24+23+22+21+20=0001 1111 11112

3.What is the largest decimal value that can be represented by:

A. 8-bit binary number?

27+26+25+24+25+24+23+22+21+20=25510 or simply 281=25510

B. 16-bit number?

2161=65,53610

4. Convert each hex number to its decimal equivalent.

A. 74316

74316=7162+4161+3160=1792+64+3=185910

B. 3616

3616=3161+6160=48+6=5410

C. 37FD16

37FD16=3163+7162+15161+13160=12288+1792+240+13=1407710

D. 200016

200016=2163+0162+0161+0160=8192+0+0+0=819210

E. 16516

16516=1162+6161+5160=256+96+5=35710




F. ABCD016

ABCD016=10164+11163+12162+13161+0160=655360+45056+3072+208+0=70369610

G. 7FF16

7FF16=7162+15161+15160=1792+240+15=204710

H. 120416

120416=1163+2162+0161+4160=4096+512+0+4=461210

5. Convert each of the following decimal numbers to hex.

A. 5910

59/16=3.6875113/16=035910=3B16

B. 37210

372/16=23.25423/16=1.437571/16=0137210=17416

C. 91910

919/16=57.4375757/16=3.562593/16=0391910=39716

D. 102410

1024/16=64064/16=404/16=0.254102410=40016

E. 77110

771/16=48.1875348/16=303/16=0.1875377110=30316

F. 231310

2313/16=144.56259144/16=909/16=0.56259231310=90916

G. 65,53610

65536/16=409604096/16=2560256/16=16016/16=101/16=0.062516553610=1000016

H. 25510

255/16=15.937515(F)15/16=0.937515(F)25510=FF16





6. Convert each of the hex values from Problem 4 to binary.

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

A. 74316

71601112416010023160011274316=0111 0100 00112

B. 3616

31600112616011023616=0011 01102

C. 37FD16

3160011271601112F1611112D161101237FD16=0011 0111 1111 11012

D. 200016

21600102016000020160000201600002200016=0010 0000 0000 00002

E. 16516

11600012616011025160101216516=0001 0110 01012

F. ABCD016

A1610102B1610112C1611002D161101201600002ABCD016=1010 1011 1100 1101 00002

G. 7FF16

71601112F1611112F16111127FF16=0111 1111 11112

H. 120416

11600012216001020160000241601002120416=0001 0010 0000 01002





7. Convert the binary numbers in Problem 1 to hex.

A. 0001 01102

00012116 01102616 0001 01102=1616

B. 1001 01012

10012916 01012516 1001 01012=9516

C. 1001 0000 10012

0001 0000 10012 00012116 00002016 10012916 0001 0000 10012=10916

D. 0110 10112

01102616 10112B16 0110 10112=6B16

E. 1111 11112

11112F16 11112F16 1111 11112=FF16

F. 0110 11112

01102616 11112F16 0110 11112=6F16

G. 0001 11101 01112

0001 1110 10112 00012116 11102E16 10112B16 0001 1110 10112=1EB16

H. 1101 11112

11012D16 11112F16 1101 11112=DF16




9. When a large decimal number is to be converted to binary, it is sometimes easier to convert it first to hex, and then from hex to binary. Try this procedure for 213310 and compare it with the procedure used in Problem 2 (h).

First: decimal to hex

2133/16=133.31255133/16=8.312558/16=0.58213310=85516

Second: hex to binary

81610002516010125160101285516=1000 0101 01012

10. How many hex digits are required to represent decimal numbers up to 20,000?

General rule: digits equals the logbase of maximum (ceiled) => logbase(maximum)

Answer: log16(20000)=4 => We need 4 digits.

11. Convert these hex values to decimal.

A. 9216

9216=9161+2160=144+2=14610



B. 1A616

1A616=1162+10161+6160=256+160+6=42210

C. 37FD16

37FD16=3163+7162+15161+13160=12288+1792+240+13=1433310

D. ABCD16

ABCD16=10163+11162+12161+13160=40960+2816+192+13=4398110

E. 000F16

000F16=0163+0162+0161+15160=0+0+0+15=1510

F. 5516

5516=5161+5160=80+5=8510

G. 2C016

2C016=2162+12161+0160=512+192+0=70410

H. 7FF16

7FF16=7162+15161+15160=1792+240+15=204710







12. Convert these decimal values to hex.

A. 7510

75/16=4.6875114/16=0.2547510=4B

B. 31410

314/16=19.6251019/16=1.187531/16=0.0625131410=13A16

C. 204810

2048/16=1280128/16=808/16=0.58204810=80016

D. 2410

24/16=1.581/16=0.062512410=1816

E. 724510

7245/16=452.812513452/16=28.251228/16=1.75121/16=0.06251724510=1CCD16





F. 49810

498/16=31.125231/16=1.9375151/16=0.0625149810=1F216

G. 25,61910

25619/16=1601.187531601/16=100.06251100/16=6.2546/16=0.37562561910=641316

H. 409510

4095/16=255.937515255/16=15.93751515/16=0.937515409510=FFF16