25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.3 Number bases 15

Example1.16 Convert the following hexadecimal numbers todecimal numbers: (a)93A (b)F9B3

Solution (a) Noting thathexadecimal numbers use base16 we have

93A 16

= 9(16 2 ) +3(16 1 ) +A(16 0 )

= 9(256) +3(16) +10(1)

= 2362 10

(b) F9B3 16

= F(16 3 ) +9(16 2 ) +B(16 1 ) +3(16 0 )

= 15(4096) +9(256) +11(16) +3(1)

= 63923 10

Convertingfromdecimaltohexadecimal

Table 1.3 provides powers of 16 which help in the conversion from decimal to hexadecimal.

Table1.3

16 0 1

16 1 16

16 2 256

16 3 4096

16 4 65536

The following example illustrateshow toconvert from decimal tohexadecimal.

Example1.17 Convert 14397 toahexadecimal number.

Solution We need to express 14397 as the sum of multiples of powers of 16. From Table 1.3 we

see that the highest number that does not exceed 14397 is 4096. We express 14397 as

amultipleof4096withanappropriateremainder. Dividing14397by4096weobtain3

with a remainder of 2109. So we may write

14397 = 3(4096) +2109

Wenowfocuson2109andapplythesameprocessasabove.FromTable1.3thehighest

number thatdoes not exceed 2109 is 256:

2109 = 8(256) +61

Finally, 61 = 3(16) +13. So wehave

14397 = 3(4096) +8(256) +3(16) +13

= 3(16 3 ) +8(16 2 ) +3(16 1 ) +13(16 0 )

FromTable 1.2 wesee that13 10

isDinhexadecimal, sowe have

14397 10

= 383D 16

As with base 2 we can convert decimal numbers by repeated division and noting the

remainder. The previous example isreworked toillustratethis.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!