Data representation in binary form
Introduction
The common counting system we use is known as denary. We count using units, tens, hundreds, thousands and so on and we use the digits from 0 to 10 to represent numbers. Computers don't use this system.
Why do computers use binary?
Any switch can be in one of two positions, off or on. For example, the switch that controls a light in a room can be off or on. The power switch on your computer can be off or on. A mobile phone has a power switch that can be off or on. The basic building block of any computer is the switch. Computers, however, have millions and millions and millions of electronic switches in them, held in components called integrated circuits (IC) such as RAM or the processor. When you group these switches together in a certain way, you can represent any piece of data as a code, such as letters of the alphabet or numbers. They do this by using a high voltage such as 5 volts dc to represent a binary one signal and a low voltage such as zero volts dc to represent a binary zero signal.
The denary numbering system
The numbering system that we commonly use every day of our lives is known as the denary system. This is because there are ten digits in use. These are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. We know that the symbol 7 is 'worth more' than the symbol 3. It is not only the size of the number that tells us something about the number, however. It is also the position of each digit relative to any other digits in a number. For example, in the number 268, the 6 is worth a lot more than the 8 because it is to the left of the 8. Similarly, the 2 is worth a lot more than both the 8 and the 6 because it is on the very left of the number. When you learnt to count, you will have used headings to start with, to help you understand that the position of each digit is important to the worth of that digit. Any number e.g. 3892 would have been written down under the headings, as shown here:
This means the number is 'worth' (3 x 1000) + (8 x 100) + (9 x 10) + (2 x 1) which adds up to 3892. Can you use this method to break down the number 4390? Now break down the number 28642. What is the next position on the left after thousands worth? What do you think the next position on the right of the Units is worth? (HINT: It is used to represent a fractional part of a number).
The binary numbering system
Computers use switches. A switch can be off or on and there are no other possible positions. We can represent switches using the binary numbering system. The off position will be represented by 0 and the on position will be represented by 1. Whilst the denary numbering system had 10 digits, the binary numbering system has only 2 digits, 0 and 1. However, like the denary system, the position of the binary digit (or bit) is important. So for example, the binary number 10101101 means:
This means the number is worth (1 x 128) + (0 x 64) + (1 x 32) + (0 x 16) + (1 x 8) + (1 x 4) + (0 x 2) + (1 x 1) which adds up to the denary number 173. Can you use this method to find out what the denary equivalent of 01100100 is? Can you guess what the next position to the left of the 'One Hundred and twenty eights' position is worth? How about the position to the right of the Units position? (HINT: It is used to represent a fractional part of a binary number. Try to spot a pattern developing in the worth of each position).