Introduction
Inside a computer, all information is stored as binary numbers – either a 1 or a 0. This means either a switch being open or closed or the different voltage levels travelling down a wire.
Every type of data – sound, graphics, text, animations, etc.- will always be stored as a series of binary numbers. Each number has a size; the bigger the size, the bigger the data.
In this lesson, we’ll learn about:
- The different units of data storage.
 - How to convert between the different units of data storage.
 - Why data needs to be converted to binary in order to be processed.
 
The Units of Data Storage
The smallest unit of data inside a computer is called a bit. It represents either a 1 or a 0 and corresponds to a micro switch inside the CPU, RAM, or SSD drive.
This is shown in Figure 1 – here, if the switch is OPEN, it means a 0. If it is CLOSED, it means a 1.
All this means is that if it is closed, electricity can flow through the switch.

                                                                                                    The Units of Data Storage
Inside a computer, there are billions of switches that constantly open and close as they store different numbers or perform different calculations.
The wires on the motherboard that move data around will either have a voltage (1) or will not (0). This is how data is moved from the hard drive to other components, such as the RAM and CPU.
If a piece of data can only be a 1 or a 0, then it is called BINARY data.
Computers usually store data using much larger values than individual bits, though, so there are other units of measurement we can use when referring to these larger values.
                                                                                                    The Units of Data Storage
A group of 8 bits is called a byte.
A group of 4 bits is called a nibble.
We usually deal with groups of bytes, rather than individual bits.
The table below shows the different unit names that you need to be familiar with.
| Name | Meaning | 
|---|---|
| Kilo… | Thousand | 
| Mega… | Million | 
| Giga… | Billion | 
| Tera… | Thousand Billion | 
You will have seen these numbers relating to processor speed – a 2.3 Gigahertz processor will carry out 2.3 billion operations per second.
                                                                                                    The Units of Data Storage
The table below shows us the units being applied to memory capacity.
| Unit Name | No. of Bytes | Meaning | 
|---|---|---|
| Kilobyte | 103 | 1 Thousand Bytes | 
| Megabyte | 106 | 1 Million Bytes | 
| Gigabyte | 109 | 1 Billion Bytes | 
| Terabyte | 1012 | 1 Thousand Billion Bytes | 
You will have seen these numbers when buying your phone, which might have a 128 Gigabyte flash drive, or a new computer might have a 1 Terabyte hard disk drive.
                                                                                                    
                                                                                                    Worked Example 1
How many bytes are in 3 Kilobytes?
So, looking at the table below, we have to do 1 multiplication jump:
| Kilobytes | Bytes | Answer | 
|---|---|---|
| 3 | x1000 | 3000 | 
So, 3 Kilobytes = 3000 bytes.
                                                                                                    Worked Example 2
How many bytes are in 5 Megabytes?
Again, looking at the table below, we have to do 2 multiplication jumps:
| Megabytes | Kilobytes | Bytes | Answer | 
|---|---|---|---|
| 5 | x1000 | x1000 | 5,000,000 | 
So, 5 Megabytes = 5,000,000 bytes (5 million bytes).
                                                                                                    Worked Example 3
How many Kilobytes in 6500 bytes?
This time, we need to divide, so looking at the table below, we have to do 1 division jump:
| Bytes | Kilobytes | Answer | 
|---|---|---|
| 6500 | ÷1000 | 6.5 | 
So, 6500 bytes = 6.5 Kilobytes.
                                                                                                    Why Data is Converted to Binary
When you type a letter on your keyboard – have you thought about what is going on?
An electrical signal goes from your keyboard to your CPU.
That signal will turn some switches on and off, and the operating system and CPU recognise these instructions and use this to print out the letter you have typed on the screen.
                                                                                                    Why Data is Converted to Binary
All of the registers inside the CPU basically consist of millions of tiny switches.
There is also a part of the CPU called the ALU – the Arithmetic Logic Unit, whose job is to perform any calculation that has to be carried out – any addition or subtraction.
However, all of these numbers can only be stored and processed as switches that are either open (0) or closed (1).
The CPU has no idea what a decimal number, a photo, an MP3, or a game is.
All it knows is that some switches have to be open, and some need to be closed. In this way, all data in your computer needs to be converted into binary in order for it to be processed.
                                                                                                    Lesson Summary
All data exists in a computer as binary data – a 1 or a 0.
This corresponds to a switch being open (0) or closed (1).
The smallest unit of data is a bit, which is either 1 or 0.
We often group bits together into larger units of data, such as:
- A nibble is 4 bits.
 - A byte is 8 bits.
 - A Kilobyte is a thousand bytes.
 - A Megabyte is a thousand Kilobytes.
 - A Gigabyte is a thousand Megabytes.
 - A Terabyte is a thousand Gigabytes.
 
To convert between units, you need to multiply when going from large to small and divide when going from small to large.
                                                                                                    
                                                                                                    