## 2.6 - Data Representation

In this section (click to jump)

Data representation is probably one of the most important topics to understand in computing as it explains how we manage to get the computer to make sense of everything using only numbers. There are two rules in computing which will dictate how easy it is for a computer to understand (be able to process) data and how easy it will be to manipulate that data.

The rules are:

If you can answer yes to both of those questions then you have data or a problem which is "amenable to a computational approach" as OCR like to say (it means the computer loves you). If you have problems that you want a computer to solve such as "What should I have for dinner tonight" (a relationship ending dilemma if ever there was one) then you have a problem, because computers don't deal with grey areas... The word "maybe" to a computer is like the words "tidy," "homework" and "get out of bed" to a teenager - it "don't get it" and will look most confused if you try to make it understand.

Luckily for you, at GCSE things are fairly simple and all you need to do is learn how the binary number system works, how to turn three types of data into numbers and how to save space by compressing these numbers into, er, less numbers.

Onwards!

The rules are:

- Can you turn the data in to numbers?
- Can you do what you want using maths, logic or questions that come out with a yes or no answer?

If you can answer yes to both of those questions then you have data or a problem which is "amenable to a computational approach" as OCR like to say (it means the computer loves you). If you have problems that you want a computer to solve such as "What should I have for dinner tonight" (a relationship ending dilemma if ever there was one) then you have a problem, because computers don't deal with grey areas... The word "maybe" to a computer is like the words "tidy," "homework" and "get out of bed" to a teenager - it "don't get it" and will look most confused if you try to make it understand.

Luckily for you, at GCSE things are fairly simple and all you need to do is learn how the binary number system works, how to turn three types of data into numbers and how to save space by compressing these numbers into, er, less numbers.

Onwards!

## Units of Storage

We now need to understand how we measure amounts of something in a computer system. As it's a computer, that something is data.

As in the real world, we have come up with units of measurement that help us understand the things around us. We understand that a gram of something is not a lot at all, a thousand grams is a kilogram and that's a decent weight and a thousand kilograms is a ton and not something you want dropped on your head. If you can understand weights, volumes, measurements and so on, this is going to be easy.

So, just like 1 gram is the smallest weight of something we really care about, the smallest amount of data we can store in a computer is either a single 0 or a single 1. This is called a "

If we scale it up, we can say that the next "useful" amount of 0's or 1's is 4. 4 bits put together form a

Now we come to one of the most common units of storage - 8 bits. Put 8 bits together and you get a

What if we want to do something more useful? What about the computer systems we use now which are "64 bit" machines? Well:

Technically, the term "word" can be used to describe any of those amounts above, depending on the bit length your processor can handle. But don't worry about that, your examiner is not interested, it's just one of those funky facts I enrich your lives with.

As in the real world, we have come up with units of measurement that help us understand the things around us. We understand that a gram of something is not a lot at all, a thousand grams is a kilogram and that's a decent weight and a thousand kilograms is a ton and not something you want dropped on your head. If you can understand weights, volumes, measurements and so on, this is going to be easy.

So, just like 1 gram is the smallest weight of something we really care about, the smallest amount of data we can store in a computer is either a single 0 or a single 1. This is called a "

**bit**." Which seems obvious, right? A bit of information.If we scale it up, we can say that the next "useful" amount of 0's or 1's is 4. 4 bits put together form a

**Nybble**(and no, I don't make these names up). A nybble can store 4 bits of binary information, or the numbers 0 - 15 in decimal/denary.Now we come to one of the most common units of storage - 8 bits. Put 8 bits together and you get a

**Byte**. A truly useful amount of storage as you can store numbers from 0-255 in a byte. The first home computers were often 8 bit machines, meaning each slot in their memory could store a number from 0-255. Clever.What if we want to do something more useful? What about the computer systems we use now which are "64 bit" machines? Well:

- 16 bits = Word
- 32 bits = DoubleWord
- 64 bits = QuadWord

Technically, the term "word" can be used to describe any of those amounts above, depending on the bit length your processor can handle. But don't worry about that, your examiner is not interested, it's just one of those funky facts I enrich your lives with.

Moving on, there are some more storage quantities you need to learn, but these are easy so longs as you can remember the number 1024. Can you do that? Then we'll begin:

That's dead easy - every new storage quantity is 1024 of the previous one, starting from Kilobytes.

To put things into perspective and help you attach some meaning to these quantities, here are some ball park, typical file sizes for things you should know about (from small to large):

Just as an aside, if you took a picture that was 5Mb in size, you've just created 41,943,040 bits of information. 41 million bits! Now you perhaps have some idea of the amount of data that is needed to create/manipulate/process something which seems insignificant. This also explains why computers have to be so fast - there is simply so much data that needs to be processed.

So lets round this off with a table of things you need to remember:

Got that? Now let's learn how to manipulate these amounts of binary to do something useful...

- 0 or 1 = 1 Bit
- 4 Bits = 1 Nybble
- 8 Bits = 1 Byte
- 1024 Bytes = 1 Kilobyte (Kb)
- 1024 Kilobytes = 1 Megabyte (Mb)
- 1024 Megabytes = 1 Gigabyte (Gb)
- 1024 Gigabytes = 1 Terabyte (Tb)
- 1024 Terabytes = 1 Petabyte (Pb)

That's dead easy - every new storage quantity is 1024 of the previous one, starting from Kilobytes.

To put things into perspective and help you attach some meaning to these quantities, here are some ball park, typical file sizes for things you should know about (from small to large):

- Text file - 100Kb
- Picture taken on your phone - 4Mb
- Film recorded in HD - 1Gb
- Your entire film and music collection all stored in one place - 1Tb
- More data than you can ever imagine or quantify - 1Pb

Just as an aside, if you took a picture that was 5Mb in size, you've just created 41,943,040 bits of information. 41 million bits! Now you perhaps have some idea of the amount of data that is needed to create/manipulate/process something which seems insignificant. This also explains why computers have to be so fast - there is simply so much data that needs to be processed.

So lets round this off with a table of things you need to remember:

- a 1 or a 0 on its own = a Bit.
- 4 bits = a Nybble
- 8 bits = a Byte
- 1024 bytes = Kilobyte
- 1024 Kilobytes = 1 Megabyte (Mb)
- 1024 Megabytes = 1 Gigabyte (Gb)
- 1024 Gigabytes = 1 Terabyte (Tb)
- 1024 Terabytes = 1 Petabyte (Pb)

Got that? Now let's learn how to manipulate these amounts of binary to do something useful...

## Numbers and Number Systems

Can you count to 10? If you can, you're actually doing something quite complicated without realising it. You're also using all of the rules which make number systems work.

What on earth am I on about?

We should all agree that there are a lot of numbers - hence the word infinite, there are a never ending amount of numbers.

This presents a problem - how to we write down all these numbers, including ones that may never have been written down before?!

The answer is we use a

What on earth am I on about?

We should all agree that there are a lot of numbers - hence the word infinite, there are a never ending amount of numbers.

This presents a problem - how to we write down all these numbers, including ones that may never have been written down before?!

The answer is we use a

**number system**which has a set of rules that tell us how to produce any possible number. Lets look at the common number systems we need to know for our exam and how to convert numbers from one form to another.