How computers store text with character sets (ASCII, Extended ASCII, Unicode) and images as pixels — colour depth, resolution, DPI, metadata and file sizes. Revise the notes, try the interactive demos, then take the 15-question quiz.
Computers can only store binary. To store text, every character is given its own unique binary code. The agreed list of characters and their codes is called a character set. When you press a key, the computer stores the code for that character; when it displays text, it looks the code up and draws the matching character.
| Character set | Bits per character | Number of characters | Details |
|---|---|---|---|
| ASCII | 7 | 27 = 128 | Standard English letters, digits, punctuation and some control codes (e.g. backspace). A 0 is often added at the front so each code fills a whole byte. |
| Extended ASCII | 8 | 28 = 256 | Uses the full byte. The extra 128 codes hold accented letters and symbols for languages such as French or German (é, ü, ç). |
| Unicode | 16 or 32 | Over 65,000 (16-bit) — billions possible (32-bit) | Covers every major alphabet, symbols and emoji. Better for international keyboards because it can represent characters from any language, not just English. The first 128 codes are the same as ASCII. |
| Character | Binary | Hex | Denary |
|---|---|---|---|
| B | 01000010 | 42 | 66 |
| + | 00101011 | 2B | 43 |
| backspace | 00001000 | 08 | 8 |
Bitmap images are made of a grid of pixels. Each pixel stores a binary value that represents its colour. The number of bits used for each pixel is the colour depth (or bit depth). The more bits per pixel, the more different colours can be shown.
Colour depth
Pick a colour, then click pixels
The whole image in binary (one row of pixels per line)
| Colour depth | Number of colours |
|---|---|
| 1-bit | 21 = 2 (e.g. black and white only) |
| 2-bit | 22 = 4 |
| 4-bit | 24 = 16 |
| 8-bit | 28 = 256 |
| 16-bit | 216 = 65,536 |
| 24-bit | 224 = 16,777,216 (‘true colour’) |
This image is 4 × 5 = 20 pixels and uses 8 different colours.
Look at the pixel-art image from the lesson slides. How many bits are needed to represent all the pixels of this image?
Count the pixels, count the different colours, then use the same two steps as above.
Resolution is the number of pixels that make up an image (width in pixels × height in pixels). DPI (dots per inch) is how many pixels are printed within one inch. Increasing resolution or DPI gives a sharper, more detailed image — but the file gets bigger.
Metadata is data about a file, rather than the file’s actual content. Without it, the computer would just see a long string of bits and wouldn’t know where each row ends or how many bits belong to each pixel, so it couldn’t recreate the image.
For an image, metadata typically includes its dimensions, resolution, colour depth and, for photos, details about the camera used.
| Metadata from this photo | Value |
|---|---|
| Dimensions (width × height) | 6240 × 4160 pixels |
| Resolution | 238 dpi |
| Bit (colour) depth | 24-bit |
| Camera | FUJIFILM X-T30 |
Check your working with the calculator — but make sure you can do it by hand for the exam!