The computer only works with 0 or 1 values. When the first computers were constructed they worked on denary numbers. However it was soon found that they were not very reliable. A electronic voltage was used to store each value. The higher the voltage the higher the value. For this to work the devices had to be very accurate. However it was soon discovered that it was faster and cheaper just to use binary notation. All numbers can be stored in binary so the expressiveness of the machine would not change.

Binary numbers are simply a collection of 1's or 0's. As they have only two values they are in base 2. Remember denary numbers are base 10 because each unit has ten possible values. Look at the binary number below. Each column, like denary, has a magnitude. But instead of 1's, 10's, 100's we get 1's, 2's, 4's, 8's.

Binary value

8

4

2

1

 

1

0

1

1

So, like before, we get the number-

(1 * 1) + (1 * 2) + (0 * 4) + (8 * 1) = 11

Notice that the numbers used are all powers of 2.

8 = 2^3

4 = 2^2

2 = 2^1

So, like we did for denary, we can use this fact to create the number. As we have only two values we are working in base 2. Notice that the number we are using as the base of our powers is the same.

Column No

3

2

1

0

 

1

0

1

1

We can construct an equation, very similar to the equation we constructed for denary.

(1 x 2^3) + (0 x 2^2) + (1 x 2^1) + (1 x 2^0) = 11

Let's look at another example. What is the decimal version of 11000101

(1 x 2^7) + (1 x 2^6) + (0 x 2^5) + (0 x 2^4) + (0 x 2^3) + (1 x 2^2) + (0 x 2^1) + (1 x 2^0) = 197