In everyday life, we use 10 decimal numbers to represent numerical data,

BUT

Computers cant do that. The lowest base number system we can use is 2 so instead, computers use this to represent numbers. This is the **binary system. **As computers use voltages, there is not a specific voltage for each number in the decimal system because voltages change constantly. Therefore it is measured as a two state system, either **on **or **off**. Computers also use the binary system to keep things simple, such as calculations. If we used the decimal system, 100 rules would have have to be wired into the computer, whereas in the binary system there would only be 4 rules for calculations. Finally the last main reason why computers are two state systems and use binary is that the magnetic and optical storage devices used are suited best to two state systems.

**How to convert (**decimal -> binary**)
**

In the decimal system the number 34567 could be represented as

10^4 10^3 10^2 10^1 10^0

3 4 5 6 7

In binary the number 11001 could be written as:

2^4 2^3 2^2 2^1 2^0

1 1 0 0 1

OR

16 8 4 2 1

1 1 0 0 1

*To convert binary numbers to decimal (1 byte):*

The term bit is short for **b**inary dig**it.**

so 8 bits make up 1 **byte. **

The byte is 10010111

128 64 32 16 8 4 2 1

1 0 0 1 0 1 1 1

To work this out, you multiply the numbers which are a 1 by 1 and add them together to give you the decimal number

= (128×1) + (16×1) + (4×1) + (2×1) +(1×1)

= 128 + 16 + 4 + 2 + 1

= 151

**How to convert (**decimal -> binary**)**

**Convert the number 98 into binary:**

To do this, does the number go into 128? no. so this becomes a 0.

Does it go into 64? yes, so this becomes a 1.

Does the remaining 34 go into 32? Yes so this is also a 1

Does the remaining 2 go in 16, 8, 4, or 1? No so these are all 0’s.

Does the remaining 2 go into 2? Yes, so this is a 1.

128 64 32 16 8 4 2 1

0 1 1 0 0 0 1 0

98 in binary = 01100010

The largest number we can make with 1 byte is 255. so if we wanted to make a number which is larger, we’d just add another byte on.

Units of Measurement:

1 byte (8 bits) – used to store binary numbers.

1 Kilobyte (1024 bytes) – A very very short story

1 Megabyte (1024 Kilobytes) – 1 minute of MP3 compressed music.

1 Gigabyte (1024 Megabytes) – A DVD-R can hold about 4.7 GB.

1 Terabyte (1024 Gigabytes) – becoming more common as the standard size of hard drive on a computer.