AS Level 9618 · Paper 1 · Chapter 1

Information Representation

How a computer that only understands 1 and 0 ends up storing your name, a family photo, and your favourite song. Binary number systems, two's complement, multimedia data, and compression, built up from first principles with interactive tools you can actually play with.

12 sections Syllabus 1.1 to 1.3 9 interactive tools

Every photo, song, password and line of code on your machine boils down to long strings of 1s and 0s. This chapter is the foundation of AS Level Computer Science 9618 Paper 1: how numbers, text, images and sound get squeezed into binary, how negative numbers survive that squeeze, and how files get compressed so they fit on disks and networks that were never big enough. Nothing here is optional background reading, every subtopic below maps directly onto a line in the Cambridge 9618 syllabus and shows up in Paper 1 exams.

1.1

Binary Magnitudes & Prefixes

Data Representation

A computer only ever stores 1s and 0s, so before anything else can make sense you need to know how those bits get counted at scale. Every spec sheet, file size and download speed you have ever seen used one of two competing counting systems, and mixing them up is one of the most common ways to lose easy marks in Paper 1.

Why two systems exist

Storage is physically built in powers of two (a memory chip has 2, 4, 8, 16... address lines), so it is natural for computer scientists to count in powers of 2. Marketing departments, on the other hand, count in the everyday powers of 10 you already know, because "1 terabyte" sounds cleaner and, not coincidentally, sounds bigger than the true binary equivalent. Both systems are still in daily use, so you need both.

Decimal (SI) prefixes: base 10
  • Kilo (K) = 103 = 1,000
  • Mega (M) = 106 = 1,000,000
  • Giga (G) = 109 = 1,000,000,000
  • Tera (T) = 1012 = 1,000,000,000,000
Binary (IEC) prefixes: base 2
  • Kibi (Ki) = 210 = 1,024
  • Mebi (Mi) = 220 = 1,048,576
  • Gibi (Gi) = 230 = 1,073,741,824
  • Tebi (Ti) = 240 = 1,099,511,627,776
Exam technique
Hard drive manufacturers advertise using decimal prefixes (1 GB = 1,000,000,000 bytes) because it makes the number look bigger on the box. Your operating system reports size using binary prefixes (1 GiB = 1,073,741,824 bytes). That mismatch is exactly why a drive sold as "500 GB" shows up as roughly "465 GB" in Windows or macOS, it is the same physical storage, just counted two different ways. If a question gives you a size in GB and asks you to work in bytes, always check which system it means.
Worth remembering
The gap between the two systems grows as the numbers get bigger. At the kilo/kibi level the difference is only 2.4%, but by the tera/tebi level it has grown to almost 10%. This is why the difference actually matters for large modern storage devices and is a favourite place for exam questions to test whether you really understand the distinction, rather than just memorising it.
1.1

Number Systems & Conversion

Data Representation

The 9618 syllabus expects you to move confidently between four number systems. You will not just be asked to define them, you will be asked to convert between them under exam pressure, so the goal here is fluency, not just recognition.

SystemBaseDigits usedNotation you'll see
Binary20, 10b1010 or a trailing B in pseudocode
Denary (decimal)100 to 9No prefix, this is the default
Hexadecimal160 to 9, A to F0x1F or a leading & in pseudocode
Binary Coded Decimal10 (encoded in binary)0 to 9, each in its own 4 bitsEach denary digit becomes a 4-bit group

How positional (place value) works in any base

Every number system you will meet in this course is positional: each digit's value depends on where it sits. In binary, each position is worth double the one to its right, starting from 1 on the far right. An 8-bit binary number therefore has place values of 128, 64, 32, 16, 8, 4, 2 and 1. To convert binary to denary, you simply add up the place values of every position holding a 1.

Interactive tool
Binary place-value builder
Tap any bit below to flip it between 0 and 1. Watch the denary and hexadecimal values update live, this is exactly how the exam expects you to reason through a conversion by hand.
Denary value0
Hexadecimal value0x00

Converting the other way: denary, binary or hex to any base

To convert denary to binary, repeatedly find the largest place value that fits, subtract it, and move on, or use the classic "divide by 2, read remainders bottom to top" method. To convert binary to hex, group the bits into nibbles of 4 (see section 6 for a full walkthrough). Use the tool below for arbitrary numbers rather than just 8 bits.

Interactive tool
Denary ↔ Binary ↔ Hex converter
Type a value into any one field, the other two update instantly. Works for unsigned whole numbers.
Start typing in any field.
Worked example: converting 172 to binary

Use the "does it fit?" method against the standard 8-bit place values.

128 64 32 16 8 4 2 1 172 ≥ 128? yes → 1 (172 - 128 = 44) 44 ≥ 64? no → 0 44 ≥ 32? yes → 1 (44 - 32 = 12) 12 ≥ 16? no → 0 12 ≥ 8? yes → 1 (12 - 8 = 4) 4 ≥ 4? yes → 1 (4 - 4 = 0) 0 ≥ 2? no → 0 0 ≥ 1? no → 0
172 = 10101100
1.1

Binary Addition & Subtraction

Data Representation

A CPU has no separate "subtract" circuit tucked away next to its "add" circuit. Building two different pieces of hardware would waste transistors, so real processors do both operations with the same adder circuit, and subtraction is simply addition in disguise. Understanding that trick is exactly what this section, and the two's complement section right after it, is building towards.

Binary addition, column by column

Binary addition works exactly like the denary addition you already do, except there are only four possible column sums to memorise:

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 1 = 10  (write 0, carry 1)
  • 1 + 1 + 1 = 11  (write 1, carry 1, this happens when a carry lands on a column that is already 1 + 1)
Interactive tool
Column-by-column addition, animated
Set two 8-bit denary values and press Play to watch the carry ripple through each column exactly the way you should work it out on paper.
Press Play to animate.

Overflow

Overflow happens when the true result of an addition needs more bits than the register you are storing it in actually has. An 8-bit register can only hold values from 0 to 255 unsigned, or -128 to +127 in two's complement, so if the maths produces a result outside that range, the extra bit simply falls off the end and the stored answer is wrong.

  • Unsigned overflow: a carry is generated out of the most significant bit with nowhere left for it to go.
  • Signed (two's complement) overflow: adding two positive numbers produces a result that looks negative, or adding two negative numbers produces a result that looks positive. The rule examiners want: overflow has occurred if the carry into the sign bit does not equal the carry out of the sign bit.
Worked example: signed overflow in 8 bits

127 is the largest positive number an 8-bit two's complement register can hold. Add 1 to it and watch it break.

0 1 1 1 1 1 1 1 = 127 + 0 0 0 0 0 0 0 1 = +1 ----------------- 1 0 0 0 0 0 0 0 = -128 (wrong! true answer is 128)
Overflow: the sign bit flipped even though we only added positive numbers
Why this matters
Every real CPU keeps a Status Register (also called flags register) with an overflow bit that gets set to 1 the instant this happens. Programs and the operating system can check that flag and decide what to do, silently ignoring it is how real bugs and security vulnerabilities happen.

Binary subtraction: addition of a negative number

Rather than build separate subtraction circuitry, computers rewrite A − B as A + (−B), convert B into its two's complement (negative) form, and then run it through the ordinary adder. Any carry that gets generated out of the very top (sign) bit is simply discarded, it does not represent an overflow here, it is an expected side effect of the method.

Worked example, step by step
45 − 27, done as addition
Click through each step. This is precisely the method the syllabus expects you to show in a "perform this subtraction" question.
Step 1 · rewrite as addition
45 − 27 becomes 45 + (−27)
Step 2 · find the two's complement of 27
27 = 00011011. Invert every bit: 11100100. Add 1: 11100101.
-27 = 11100101
Step 3 · add the two 8-bit values
0 0 1 0 1 1 0 1 = 45 + 1 1 1 0 0 1 0 1 = -27 ------------------- 1 0 0 0 1 0 0 1 0 (9 bits produced)
Step 4 · discard the carry-out bit
Drop the leading 1 that spilled out of the 8-bit register: 00010010
00010010 = 18
45 - 27 = 18 ✓
Exam technique
If a question asks you to "perform" a binary subtraction, do not try to borrow like you would in denary column subtraction. Examiners are testing whether you know computers do it via two's complement addition, so show that method explicitly for full marks.
1.1

One's & Two's Complement

Data Representation

So far every number we have stored has been positive. Real programs need negative numbers too: temperatures below freezing, bank balances, offsets in memory. The syllabus wants you to know two ways of representing them in binary, and to understand why one of them completely took over in real hardware.

One's complement

One's complement is the simple option: to make a number negative, invert every bit (every 0 becomes a 1, every 1 becomes a 0). It is quick to compute but it has two awkward properties that stopped it from being used in modern processors: it has two representations of zero (00000000 and 11111111), and doing arithmetic with it requires an extra "end-around carry" correction step.

Worked example: one's complement of 45
45 = 00101101 invert = 11010010
One's complement of 45 = 11010010

Two's complement: the one computers actually use

Two's complement fixes both problems with one extra step: invert every bit exactly as before, then add 1 to the result. This gives every value, including zero, exactly one binary pattern, and it means the same adder circuit used for addition can be reused for subtraction with no special-case logic at all, which is exactly the trick from the previous section.

Interactive tool
Two's complement, step by step
Enter a positive value from 1 to 127 and press Play to watch it get inverted, incremented, and flagged negative by its sign bit.
Press Play to begin.
Watch the sign bit (leftmost box): it turns red the moment the value becomes negative.

Ranges: how many values fit in 8 bits

8-bit unsigned
  • Minimum: 0
  • Maximum: 255 (28 − 1)
  • Total distinct values: 256
  • No negative numbers possible
8-bit two's complement
  • Minimum: -128
  • Maximum: +127
  • Total distinct values: 256
  • Most significant bit = sign bit (1 means negative)

Notice both ranges hold exactly 256 values, that never changes since 8 bits can only ever form 28 unique patterns. What changes is how those 256 patterns get interpreted. This is a critical exam idea: the same bit pattern, say 11111111, means 255 if you are told to treat it as unsigned, but means -1 if you are told to treat it as two's complement. The bits never lie, but they need context.

One's complement vs two's complement
One's complement just inverts every bit. Two's complement inverts, then adds 1. Real processors use two's complement because it has only one representation of zero and its arithmetic works consistently with ordinary binary addition, with no special-case circuitry needed for negative numbers.
1.1

Binary Coded Decimal (BCD)

Data Representation

Straight binary is the most compact way to store a number, but it is a nightmare for a device that only ever needs to display denary digits, like a digital clock or a calculator. BCD trades away some of that compactness in exchange for a much simpler translation back to the digits humans actually read.

How BCD works

BCD encodes each denary digit separately, using exactly 4 bits per digit, rather than converting the whole number to binary at once. This is the single most common misconception students have about BCD, so compare it directly against ordinary binary below.

Worked example: 29 in BCD vs. plain binary
Denary: 2 9 BCD: 0010 1001 → 0010 1001 Plain binary of 29: 11101 (totally different pattern!)
BCD keeps each digit separate: 0010 1001. It is not the same as converting 29 as a whole number.

Because each 4-bit group only ever needs to represent a digit from 0 to 9, the patterns 1010 through 1111 (10 to 15) are never valid in BCD. If you ever see one of those six patterns inside a BCD number, that is a broken or corrupted value.

Invalid BCD patterns
1010, 1011, 1100, 1101, 1110, 1111 can never legally appear as a BCD digit group. Spotting one of these in an exam question is a quick way to identify an error in the data.

Practical applications of BCD

BCD trades storage efficiency for accuracy and simplicity of display, which is exactly what these situations need:

Where you'll find it
  • Digital clocks and seven-segment displays
  • ATMs and point-of-sale systems handling currency
  • Calculators
  • Any embedded system where digit-by-digit display matters more than saving a few bits
Why not just use binary?
  • Converting binary back to individual denary digits for a display is slow and error-prone
  • BCD avoids rounding errors that can creep in with binary representations of decimal currency values
  • Each digit can be decoded and sent to its own display segment independently
1.1

Hexadecimal

Data Representation

Reading a 32-bit binary number is exhausting for a human, and typing 32 characters accurately is even worse. Hexadecimal exists purely as a compact, human-friendly way to write binary down, because each single hex digit maps onto exactly 4 bits with nothing left over.

DenaryBinaryHexDenaryBinaryHex
000000810008
100011910019
200102101010A
300113111011B
401004121100C
501015131101D
601106141110E
701117151111F

Converting binary to hex: group into nibbles

Because 16 = 24, every hex digit corresponds to exactly one group of 4 bits, called a nibble. To convert, split the binary number into nibbles starting from the right, pad the leftmost group with leading zeros if needed, then convert each nibble to its hex digit independently.

Interactive tool
Nibble grouping, animated
Enter an 8, 12 or 16-bit binary string and press Play to watch it split into nibbles and convert one group at a time.
Press Play to begin.

Practical applications of hexadecimal

Where you'll find it
  • Memory addresses in low-level programming and debugging
  • MAC addresses (e.g. 3C:15:C2:9A:4B:01)
  • HTML/CSS colour codes (e.g. #FF5733)
  • Assembly language operands and machine code dumps
  • IPv6 addresses
Why not just use binary directly?
  • A 32-bit binary address is 32 characters long, its hex equivalent is only 8
  • Far fewer transcription errors when a person is reading or typing it
  • The 4-bit-per-digit mapping means conversion is instant, with no arithmetic required
Exam technique
Hexadecimal is never used because computers understand it directly, computers only ever work in binary internally. Hex exists purely for human convenience. If a question asks "why is hexadecimal used", always frame your answer around readability, shorter length and fewer transcription errors for people, not anything to do with computer performance.
1.1

Character Sets: ASCII & Unicode

Data Representation

A computer cannot store the letter "A" directly, it can only store binary. A character set is simply an agreed table that maps every character you might want to type onto a specific binary number, so that every device reading that number agrees on which character it represents.

ASCII (7-bit)
  • 128 characters, codes 0 to 127
  • Extended ASCII stretches this to 256 characters using the full 8 bits (1 byte)
  • Covers English letters, digits and common symbols only
  • 'A' = 65, 'a' = 97, '0' = 48
  • Uses exactly 1 byte per character
Unicode (UTF-8 / UTF-16 / UTF-32)
  • Over 1 million possible code points
  • Covers every world language plus emoji and symbols
  • UTF-8 uses a variable 1 to 4 bytes per character
  • Backwards compatible with ASCII (the first 128 codes match exactly)
  • The de facto standard for the modern web

The reason Unicode had to exist at all is that ASCII's 128 or 256 slots simply are not enough characters to represent Chinese, Arabic, Cyrillic, emoji and every other writing system in the world at once. Unicode solves this by using a much larger address space, and by making that address space variable-length (UTF-8) so that plain English text does not waste extra bytes it does not need.

You will not be tested on memorising codes
You do not need to memorise individual character codes. You should, however, know that uppercase letters come before lowercase letters in the ASCII table ('A' = 65 is less than 'a' = 97), because this directly affects how text sorting algorithms behave, capital letters sort before lowercase ones unless a program specifically corrects for it.
Interactive tool
ASCII character explorer
Type any single character to see its decimal, binary and hexadecimal ASCII/extended-ASCII code.
1.2

Bitmap Images

Multimedia · Graphics

Photos, screenshots and scans are all stored the same way underneath: as a grid of tiny coloured dots, each one a binary number. Understanding exactly what is being counted here is what lets you calculate, and explain the trade-offs of, file size.

Key terms

TermDefinition
PixelA single dot in the image grid, the smallest controllable unit of a bitmap ("picture element")
Image resolutionThe number of pixels that make up the image, e.g. 1920 × 1080
Screen resolutionThe number of pixels per inch (PPI) a display is able to show
Colour depth / bit depthThe number of bits used to store the colour of each pixel, e.g. 8-bit gives 256 possible colours
File headerMetadata stored at the start of the file: width, height, colour depth and other information needed to decode the pixel data that follows

Calculating bitmap file size

Every pixel needs the same number of bits to store its colour, so the total file size is just the pixel count multiplied by how many bits each pixel costs.

Formula and worked example
File size (bits) = image width × image height × colour depth File size (bytes) = file size (bits) ÷ 8 Example: an 800 × 600 image at 24-bit colour depth ("true colour") Bits = 800 × 600 × 24 = 11,520,000 bits Bytes = 11,520,000 ÷ 8 = 1,440,000 bytes MB = 1,440,000 ÷ 1,000,000 = 1.44 MB
This is the theoretical, uncompressed size. Real files are usually smaller because of compression, see section 11.
Interactive tool
Bitmap file size calculator
Change any value and see the theoretical uncompressed file size update instantly.

What happens if you change the resolution or the colour depth

Changing image resolution
  • More pixels means more detail can be captured, a sharper, higher-quality image
  • File size grows in direct proportion to the pixel count, doubling both width and height quadruples the file size
  • Displaying a low-resolution image on a high-resolution screen makes it look blocky or blurred
Changing colour depth
  • More bits per pixel means more distinct colours are available, smoother gradients and shading
  • File size is directly proportional to colour depth, doubling the colour depth doubles the file size
  • Reducing colour depth causes colour banding (posterisation), visible harsh edges between colour bands where a smooth gradient used to be
1.2

Vector Graphics

Multimedia · Graphics

A bitmap stores what an image looks like. A vector graphic stores instructions for how to draw it, a fundamentally different approach that solves the scaling problem bitmaps struggle with.

Key terms

TermMeaningExample
Drawing objectA shape defined mathematically rather than pixel-by-pixelCircle, rectangle, line, curve
PropertyAn attribute attached to a drawing object that controls how it is renderedRadius = 50, Fill = blue, Stroke width = 2px
Drawing listThe ordered list of every drawing object that makes up the complete image, stored inside the fileThe vector file format itself is essentially this list

To display a vector image, software reads the drawing list and recalculates every shape from its mathematical definition at whatever size is needed. That recalculation step is exactly why vector graphics can be scaled to any size, tiny icon or huge billboard, with no loss of quality whatsoever, while a bitmap enlarged past its native resolution just becomes a blurry grid of oversized pixels.

Choosing between bitmap and vector

Use a bitmap when...
  • The image is a photograph with complex, continuous colour variation
  • You need pixel-level editing (retouching, filters)
  • The image has gradients or heavy texture
  • It will be displayed at one fixed size
Use a vector when...
  • It is a logo or icon that needs to scale to many sizes
  • It is a technical or engineering diagram
  • It is text or typography
  • It needs infinite zoom with no loss of quality
Exam technique: justifying your choice
"Justify" questions want a comparison, not just a label. For a company logo used on both a business card and a billboard, the correct answer is vector, and the justification is that the drawing list is recalculated at any size with zero quality loss, whereas a bitmap large enough for a billboard would be an enormous file, and a bitmap small enough for a business card would look pixelated when blown up to billboard size.
1.2

Sound Encoding

Multimedia · Sound

Real sound is a continuous, smoothly varying vibration in the air, an analogue signal. A computer can only store discrete binary numbers, so to record sound digitally we have to measure that continuous wave at regular moments in time and store each measurement as a binary value. This process is called sampling.

Sampling: turning a wave into numbers

TermDefinitionEffect of increasing it
SamplingMeasuring the amplitude (height) of the sound wave at a regular interval and storing that value in binary
Sampling rateThe number of samples taken per second, measured in Hertz (Hz)Captures the wave more faithfully and at higher frequencies, but produces a larger file
Sampling resolutionThe number of bits used to store each individual sample (its bit depth)Records finer differences in volume/amplitude, but produces a larger file
Sampling rate vs. sampling resolution: they measure different things
Sampling rate controls how often you check the wave (like taking more photos per second of something moving). Sampling resolution controls how precisely you record the height at each check (like using a ruler with finer markings). A recording can have a high rate but low resolution, or the reverse, they are independent choices and both cost file size.

What happens if the rate or resolution is too low

If the sampling rate is too low, fast changes in the wave get missed entirely between samples, the played-back sound loses high-frequency detail and can sound muffled or distorted, an effect called aliasing. If the sampling resolution is too low, each sample gets rounded to the nearest available level, introducing quantisation error, audible as background hiss or a "grainy" quality. Both problems trade accuracy for a smaller file, and both are the reason low-bitrate audio sounds noticeably worse than a CD.

Visualisation
Analogue wave to digital samples
The smooth curve is the original analogue sound. The vertical bars are what actually gets stored, a sample taken at a fixed interval. Fewer, shorter bars mean less accuracy but a smaller file.

Calculating sound file size

Formula and worked example
File size (bits) = sampling rate × sampling resolution × duration (s) × channels Example: CD-quality audio Sampling rate: 44,100 Hz Sampling resolution: 16 bits Duration: 3 minutes = 180 seconds Channels: 2 (stereo) Size = 44,100 × 16 × 180 × 2 = 254,016,000 bits = 31,752,000 bytes ≈ 31.75 MB
Interactive tool
Sound file size calculator
Change any value and see the uncompressed file size update instantly.
1.3

Compression

Compression

Every calculation in this chapter so far has produced an uncompressed, theoretical file size. Real files are almost always smaller, because compression re-encodes data to take up less space.

Why compression is needed

  • Storage is limited. Phones, cameras and servers all have a finite amount of disk space, compression lets more files fit.
  • Bandwidth is limited. Networks, including the internet, can only move a certain number of bits per second, a smaller file transfers faster.
  • Streaming needs to keep up in real time. Video and music services must deliver data at least as fast as it plays back, which is only realistic once the file is compressed.

Lossy vs. lossless: the fundamental choice

Lossless compression
  • Original data is fully and exactly recoverable
  • Zero quality loss, ever
  • Achieves a smaller size reduction than lossy methods
  • Used for: text files, program code, PNG images
  • Example methods: run-length encoding (RLE), Huffman coding
Lossy compression
  • Some data is permanently discarded and cannot be recovered
  • Quality degrades, though often imperceptibly to humans
  • Achieves a much greater size reduction
  • Used for: photographs (JPEG), music (MP3), video
  • The process cannot be reversed once applied
Exam technique: which one to justify
Use lossless whenever exact reproduction matters and losing even one bit would break the file, text documents, program source code, or any image where later editing needs the original pixel data. Use lossy when the removed data is imperceptible to a human and small file size genuinely matters more, streaming audio or video, or web images where load speed is a priority.

Run-length encoding (RLE): compressing repetition

RLE is a lossless technique that replaces a run of consecutive, identical values with a short (count, value) pair instead of writing the value out every single time. It works brilliantly on images with large flat areas of a single colour, like simple clipart or logos, and is almost useless on photographs, where neighbouring pixels rarely repeat exactly.

Interactive tool
Run-length encoding, animated
This row represents one line of pixels from a simple bitmap. Press Play to scan across and watch each run get collapsed into a (count, value) pair.

How each type of file gets compressed

The syllabus expects you to describe compression for four specific file types. Each one uses a different technique because each one has different redundancy to exploit.

File typeCompression usedWhy
Text file (.txt)Lossless, e.g. Huffman coding or dictionary-based methods (ZIP)Every character matters, losing even one changes the meaning of the text. Common letters/words are given shorter codes to shrink the file without losing anything
Bitmap image (.bmp)Lossless, e.g. RLE or PNG's compressionRLE exploits large runs of identical pixels in simple images; PNG-style methods find repeating patterns without discarding any pixel data
Vector graphic (.svg)LosslessThe file is already just a compact list of mathematical instructions, there is no pixel data to lose. Compression here just re-encodes the instruction list more efficiently (e.g. removing redundant whitespace or repeated values)
Sound file (.mp3)LossyRemoves frequencies that are outside the range of typical human hearing, or masked by louder nearby sounds, so the file shrinks dramatically with minimal perceived quality loss
Quick sanity check
If you are ever unsure which category a file falls into, ask: "would losing a single bit of this file be noticeable or catastrophic?" Text and vector data answer yes, so they stay lossless. Photographs and audio answer "not really, if done carefully", so lossy compression is fair game.

Practice Questions

Exam technique

Try each of these before reading the model answer. They are written in the same style as Cambridge 9618 Paper 1 questions.

2 marks
Q1. A hard drive is advertised as having a capacity of 2 TB. Explain why an operating system might report its capacity as approximately 1.82 TB.
Answer

Manufacturers state capacity using decimal (SI) prefixes, where 1 TB = 1012 bytes. Operating systems report capacity using binary (IEC) prefixes, where 1 TiB = 240 bytes, a larger number of bytes for the "same" labelled unit. Because 240 is bigger than 1012, dividing the same physical byte count by the larger binary unit produces a smaller reported number.

3 marks
Q2. Find the two's complement representation of -52 using 8 bits.
Answer

52 in binary is 00110100. Invert every bit to get 11001011. Add 1 to get 11001100.

-52 = 11001100

2 marks
Q3. An 8-bit two's complement register is used to add 01100100 and 01000001. State whether overflow occurs, and explain your reasoning.
Answer

01100100 = 100 and 01000001 = 65. Their true sum is 165, but the maximum positive value an 8-bit two's complement register can hold is 127. Adding the two positive numbers produces a result with the sign bit set to 1 (appears negative), so overflow does occur.

4 marks
Q4. A bitmap image measures 1024 × 768 pixels and uses a colour depth of 16 bits. Calculate the file size in megabytes (MB), showing your working.
Answer
Bits = 1024 × 768 × 16 = 12,582,912 bits Bytes = 12,582,912 ÷ 8 = 1,572,864 bytes MB = 1,572,864 ÷ 1,000,000 = 1.57 MB (2 d.p.)
3 marks
Q5. A company is choosing between storing its logo as a bitmap or a vector graphic, because the logo will be used on a website favicon (16 × 16 pixels) and on a large printed banner. Justify which format should be used.
Answer

The logo should be stored as a vector graphic. A vector stores the logo as a drawing list of mathematical shapes and properties rather than a fixed pixel grid, so it can be re-rendered at any size, from a tiny favicon to a large banner, with no loss of quality and no need to store multiple versions. A single bitmap could not do both well: one small enough for a favicon would look pixelated when enlarged for the banner, and one large enough for the banner would be an unnecessarily large file for a favicon.

2 marks
Q6. A streaming music service reduces the sampling rate of its audio for users on a slow connection. State two effects this will have.
Answer

1. The file size (and therefore the required bit rate) will decrease, so it streams more easily on a slow connection. 2. Sound quality will decrease, high-frequency detail will be lost because the wave is being measured less often, which can make the audio sound duller or muffled.

Stop wrestling with confusion.
Join thousands of students mastering Computer Science without the academic jargon.
Explore all AS Level notes

Stop wrestling with confusion.

Join thousands of students mastering Computer Science without the academic jargon.

From syntax to systems. We break down the hardest ideas in computer science so you can actually build things.

© 2026 Painless Programming. Built for students.
Scroll to Top