chapter  2
18 Pages

Binary maths and number systems

We can recognise 255 instantly because we are used to using decimal numbers, but in the binary system, 255 would be written as: 1111 1111. This is not so recognisable (unless we are used to it) although we could easily work it out. Similarly, we could work out the value of 255:

2 × 100 = 200 5 × 10 = 50 5 × 1 = 5

then we add: 255 In 'index' notation (powers of 10) the column headings are:

103 102 101 100

(1000s) (100s) (10s) (Units) 4 5 2 7

i.e. 4 × 103 = 4000 5 × 102 = 500 2 × 101 = 20 7 × 10° = 7

4527 (Remember, incidentally, that ×0 = 1, whatever the value of x.)

0 0 33 10 0001 1 1 34 10 0010 2 10 35 10 0011 3 11 36 10 0100 4 100 37 10 0101 5 101 38 10 0110 6 110 39 10 0111 7 111 40 10 1000 8 1000 41 10 1001 9 1001 42 10 1010 10 1010 43 10 1011 11 1011 44 10 1100 12 1100 45 10 1101 13 1101 46 10 1110 14 1110 47 10 1111 15 1111 48 11 0000 16 1 0000 49 11 0001 17 1 0001 50 11 0010 18 1 0010 51 11 0011 19 1 0011 52 11 0100 20 1 0100 53 11 0101 21 1 0101 54 110110 22 1 0110 55 110111 23 1 0111 56 11 1000 24 1 1000 57 11 1001 25 1 1001 58 11 1010 26 1 1010 59 11 1011 27 1 1011 60 11 1100 28 1 1100 61 11 1101 29 1 1101 62 111110 30 1 1110 63 111111 31 1 1111 64 100 0000 32 10 0000

By using decimal numbers we have illustrated the precise format of writing numbers down, something which we are probably no longer conscious of. As we have seen, however, computers only work with binary numbers – and so must we. In order to attempt this, consider the following rules:

1 In all number systems, the column headings are in powers of the number of digits in the system. In decimal there are ten digits (0-9) so the column headings are in powers of 10. In binary, there are two digits (0 and 1) so the column headings are in powers of 2.