Basic PC Tips

Bits, Bytes and Kilobytes Explained

Bits
Bytes
Kilobytes
Megabytes
Gigabytes

All information and data handled by a computer is stored as numbers and to understand how this works it's worth knowing a bit about the binary number system.

In everyday life we all use decimal numbers. That is we deal with numbers that are made up of digits in the range 0-9. However, computers can only handle numbers made up of two digits: 0 & 1.

When computers were first invented they used valves as their main memory storage. We've all seen pictures or old films showing these early computers, with banks of glowing glass valves. Each valve could be either on or off - representing the values 1 and 0.

These early computers would fill large rooms and only had a fraction of the memory available to modern computers.

Knowadays a computer chip is made up of tens of thousands, or millions, or transistors. Each transistor is the modern equivalent of a valve in those early computers, and can have a value of 0 or 1.

Bits

So you should now understand that information stored in a computer is stored as a collection of 0's and 1's. Each transistor holds one digit and this is the smallest possible unit of information and is know as a bit.

On their own bits are fairly useless (unless all you want to do is count to 1!). The power of a computer is that it can deal with many thousands or millions of these bits, and can deal with them extremely fast.

When you put bits together you can start to create larger numbers - this is exactly the same as in the decimal number system, with one digit you can count from 0-9, with two you can count from 0-99 etc..

So, if binary 0 is the same as decimal 0, and binary 1 is decimal 1 what is decimal 2 in binary? The following table shows the translation of binary and decimal numbers:

DecimalBinary
00
11
210
311
4100
5101
6110
7111
...
50110010
51110011
52110100
53110101
...
1001100100
1011100101
1021100110
etc.

Top

Bytes

A byte is a collection of 8 bits, and now we are talking about something that has a lot more use.

Why 8 bits in a byte? This is just a convention that has been agreed on over the years similar to why there are 12 in a dozen!

You might be wondering how letters are stored if a computer can only understand numbers. This is made possible by storing each letter as a byte. The standard definition of western characters is known as ASCII and the following table shows some of the characters in the ASCII character set along with their binary values:

Character ASCII code Binary Value
04800110000
14900110001
25000110010
35100110011
...
A6501000001
B6601000010
C6701000011
...
a9701100001
b9801100010
c9901100011
...
}12301111011
|12401111100
{12501111101

Top

Kilobytes

A Kilobyte is 1,024 bytes.

Why 1,024? Remember that computers use the binary number system, and in binary 1,024 is a more natural number than 1,000.

Megabytes

A Megabyte is 1,024 Kilobytes or 1,048,576 bytes.

Gigabytes

A Gigabyte is 1,024 Megabytes, 1,048,576 Kilobytes or 1,073,741,824 bytes.

The pattern is repeated with bigger numbers: a Terabyte is 1,024 Megabytes.
You may also come across the term nibble - this is a 4 bit number which is half a byte.

Top