92 Higher Engineering Mathematics
Using Table 10.1 to convert this binary number to an
octal number gives 363.42 8 and 363.42 8
= 3 × 8
2
+ 6 × 8
1
+ 3 × 8
0
+ 4 × 8
−1
+ 2 × 8
−2
= 192 + 48 + 3 + 0.5 + 0.03125
= 243.53125 10
Now try the following exercise
Exercise 41 Further problems on
conversion between decimal and binary
numbers via octal
In Problems 1 to 3, convert the decimal numbers
given to binary numbers, via octal.
1. (a) 343 (b) 572 (c) 1265
(a) 101010111 2 (b) 1000111100 2
(c) 10011110001 2
2. (a) 0.46875 (b) 0.6875 (c) 0.71875
(a) 0.01111 2 (b) 0.1011 2
(c) 0.10111 2
3. (a) 247.09375 (b) 514.4375 (c) 1716.78125
⎡
⎢
⎣
(a) 11110111.00011 2
(b) 1000000010.0111 2
(c) 11010110100.11001 2
⎤
⎥
⎦
4. Convert the binary numbers given to decimal
numbers via octal.
(a) 111.011 1 (b) 101 001.01
(c) 1 110 011 011 010.001 1
(a) 7.4375 10 (b) 41.25 10
(c) 7386.1875 10
10.4 Hexadecimal numbers
The hexadecimal system is particularly important in
computer programming, since four bits (each consisting of a one or zero) can be succinctly expressed using
a single hexadecimal digit. Two hexadecimal digits represent numbers from 0 to 255, a common range used,
for example, to specify colours. Thus, in the HTML
language of the web, colours are specified using three
pairs of hexadecimal digits RRGGBB, where RR is the
amount of red, GG the amount of green, and BB the
amount of blue.
A hexadecimal numbering system has a radix of
16 and uses the following 16 distinct digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F
‘A’ corresponds to 10 in the decimal system, B to 11,
C to 12, and so on.
(a) Converting from hexadecimal to decimal:
For example
1A 16 = 1 × 16
1
+ A × 16
0
= 1 × 16
1
+ 10 × 1
= 16 + 10 = 26
i.e.
1A 16 = 26 10
Similarly, 2E 16 = 2 × 16
1
+ E × 16
0
= 2 × 16
1
+ 14 × 16
0
= 32 + 14 = 46 10
and
1BF 16 = 1 × 16
2
+ B × 16
1
+ F × 16
0
= 1 × 16
2
+ 11 × 16
1
+ 15 × 16
0
= 256 + 176 + 15 = 447 10
Table 10.2 compares decimal, binary, octal and hexadecimal numbers and shows, for example, that
23 10 = 10111 2 = 27 8 = 17 16
Problem 15. Convert the following hexadecimal
numbers into their decimal equivalents:
(a) 7A 16 (b) 3F 16
(a) 7A 16 = 7 × 16
1
+ A × 16
0
= 7 × 16 + 10 × 1
= 112 + 10 = 122
Thus 7A 16 = 122 10
(b) 3F 16 = 3 × 16
1
+ F × 16
0
= 3 × 16 + 15 × 1
= 48 + 15 = 63
Thus 3F 16 = 63 10
Précédent

- 111/705

Suivant