Understanding Computers
What is inside the box, how binary works, and why every computer is really just a very fast machine for moving 1s and 0s around.
Inside the computer
| Component | Job |
|---|---|
| CPU | The brain. Processes all instructions and does all the calculating. |
| RAM | Holds the programs and data being used right now. Wiped when the power goes. |
| Hard drive or SSD | Stores files permanently, even when switched off. |
| Motherboard | The main circuit board that everything plugs into and communicates through. |
| Power supply | Converts mains electricity to the low voltages the parts need. |
| Graphics card | Handles images and video, which matters most in games and video editing. |
The CPU
The Central Processing Unit does three things over and over, billions of times per second:
- Fetch the next instruction from memory
- Decode it to work out what it means
- Execute it, actually doing the work
This never stops while the computer is on.
Clock speed measures how many of those cycles happen per second. 3 GHz means three billion per second.
Cores are complete processing units. A quad core CPU has four, so it can work on four things at once, as long as the software is written to make use of them.
RAM is temporary and fast, and it is emptied when the power goes. Storage is permanent and slower. Buying more storage will not make a slow computer faster if the problem is not enough RAM.
Binary
Computers use binary, which has only two digits: 0 and 1.
The reason is electrical. A circuit is either on or off, and those two states are easy to tell apart reliably. Ten different voltage levels for our normal digits would be far harder to build and far easier to get wrong.
Place values
In denary each column is ten times the one to its right: 1, 10, 100, 1000.
In binary each column is twice the one to its right:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|
Binary to denary
Add the place values where there is a 1.
1 0 1 1 0 1 0 0 128 + 32 + 16 + 4 = 180
Denary to binary
Work from the left, asking whether each place value fits.
Convert 45:
- 128? No. Write 0.
- 64? No. Write 0.
- 32? Yes. Write 1. 45 - 32 = 13
- 16? No. Write 0.
- 8? Yes. Write 1. 13 - 8 = 5
- 4? Yes. Write 1. 5 - 4 = 1
- 2? No. Write 0.
- 1? Yes. Write 1. 1 - 1 = 0
Result: 00101101. Check: 32 + 8 + 4 + 1 = 45.
Every mistake on this comes from trying to do it in your head.
Number base converter
Convert between denary, binary and hexadecimal, with every step of the working written out. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.
Units and how everything is stored
| Unit | Size |
|---|---|
| Bit | One 1 or 0 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1000 bytes |
| Megabyte (MB) | 1000 KB |
| Gigabyte (GB) | 1000 MB |
| Terabyte (TB) | 1000 GB |
Text
Each character is given a number, and that number is stored in binary. The agreed list of characters and their numbers is called a character set. In ASCII, capital A is 65, B is 66, and so on.
Images
An image is a grid of pixels. Each pixel has a colour, and that colour is stored as a binary number.
- More pixels means more detail and a bigger file.
- More bits per pixel means more possible colours and a bigger file.
With 1 bit per pixel you get two colours, black and white. With 8 bits you get 256 colours. With 24 bits you get over 16 million.
Sound
Sound is a wave. A computer measures the height of the wave many thousands of times per second and stores each measurement as a number. This is called sampling.
- More samples per second means a more accurate recording and a bigger file.
- CD quality takes 44,100 measurements every second.
Text, images and sound are all stored as numbers, and all numbers are stored in binary. Better quality always means more numbers, which always means a bigger file.
File size calculator
Work out the size of an image, a sound file or a block of text, one conversion at a time. This tool needs JavaScript, so turn it on to use it. Everything you need to answer the exam question is explained in the text above.
- Lossless: the file gets smaller, and decompressing gives back exactly the original.
- Lossy: the file gets much smaller, but detail is thrown away for good, so it cannot be restored exactly.
- Choose lossless when the data must be exact, and lossy when small losses do not matter.
- Image: width × height × colour depth. Every pixel costs the colour depth in bits.
- Sound: sample rate × bit depth × seconds, and × 2 for stereo.
- Text: number of characters × bits per character. ASCII uses 8.
- Divide by 8 to turn bits into bytes, then by 1,000 for each step up.
Key terms you must be able to define
- CPU
- The Central Processing Unit, which processes all instructions and does all the calculating.
- RAM
- Temporary fast memory holding what the computer is using now. Emptied when the power goes.
- Binary
- A number system using only 0 and 1, which matches the on and off states of electronic circuits.
- Bit
- A single binary digit, either 0 or 1.
- Byte
- Eight bits.
- Pixel
- The smallest single dot of colour in an image.
- Sampling
- Measuring a sound wave at regular intervals and storing each measurement as a number.
- Character set
- The agreed list of characters and the number used to represent each one.
Flashcards
Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.
Reach the top grade on this topic
The top level here comes from explaining causes, not just stating facts.
Why binary? Not "because computers like it". Because circuits are either on or off, and those two states can be told apart reliably.
Why does a higher quality image have a bigger file? Because every extra pixel and every extra bit of colour is more data that has to be stored.
Check your conversions. Convert back and see whether you get the original number. It takes ten seconds and catches almost every mistake.
- Convert any 8 bit binary number to denary and back, reliably
- Explain why computers use binary rather than denary
- Explain how text, images and sound are all stored as numbers
- Explain the difference between RAM and storage using volatility
Mistakes that cost marks here
- Writing the place values the wrong way round. The 1 is on the right.
- Saying RAM stores files permanently. It is wiped when the power goes.
- Confusing bits and bytes. Eight bits make one byte.
- Saying a bigger image file is 'better quality' without explaining that it holds more pixels or more colours.
If you counted on your fingers in binary instead of one per finger, you could count to 1023 on two hands. Each finger becomes a place value: 1, 2, 4, 8, 16 and so on.
Knowledge check
Exam-style questions
Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.
- LElectronic components have two states, on and off
- LThese two states can represent 1 and 0 reliably
Computers are built from electronic components that have exactly two reliable states: a circuit is either carrying current or it is not. These two states can be used to represent the digits 1 and 0, and because there are only two of them they can be told apart reliably even if the voltage varies a little. Trying to use ten different levels for ordinary denary digits would be far harder to build and far more likely to produce errors.
- LUses place values starting from 128
- LShows subtraction working
- LCorrect answer 01011001
Working from the largest place value downwards: 128 does not fit into 89, so write 0. 64 fits, leaving 25, so write 1. 32 does not fit into 25, so write 0. 16 fits into 25, leaving 9, so write 1. 8 fits into 9, leaving 1, so write 1. 4 does not fit, write 0. 2 does not fit, write 0. 1 fits, leaving 0, so write 1. The answer is 01011001, and checking gives 64 + 16 + 8 + 1 = 89.
- LRAM holds the data and programs currently in use
- LRAM is wiped when the power is switched off
- LA hard drive stores data permanently and is much larger but slower
RAM holds the programs and data that the computer is using at that moment, and the CPU reads directly from it because it is very fast. However, RAM is temporary: its contents are wiped as soon as the power is switched off, which is why unsaved work is lost in a power cut. A hard drive stores data permanently, so files are still there when the computer is switched back on. It has a much larger capacity than RAM but is far slower to access, which is why programs are copied from the hard drive into RAM when they are opened.
- LThe image is divided into a grid of pixels
- LEach pixel is given a colour stored as a binary number
- LMore pixels means more detail
- LMore bits per pixel means more possible colours, and both increase file size
An image is stored as a grid of tiny squares called pixels. Each pixel holds a single colour, and that colour is represented by a binary number, so the whole image becomes a long list of binary values. The number of pixels is called the resolution, and using more pixels means the picture captures finer detail and looks sharper. The number of bits used for each pixel decides how many different colours are available, so 8 bits gives 256 colours while 24 bits gives over 16 million. Increasing either the number of pixels or the number of bits per pixel improves the quality of the image but also increases the amount of data that has to be stored, so the file becomes larger.
- LThe CPU processes instructions
- LIt fetches, decodes and executes instructions repeatedly
- LClock speed measures how many cycles the CPU performs each second
The CPU is the part of the computer that processes all the instructions, and it does this by repeatedly fetching the next instruction from memory, decoding it to work out what it means, and then executing it. Clock speed measures how many of these cycles the CPU carries out each second, and it is given in hertz. A processor running at 3 gigahertz completes three billion cycles every second, so a higher clock speed generally means more instructions are processed and the computer feels faster.