Data is the raw material that computers process. Understanding how data is represented, stored, compressed and protected is central to the edexcel igcse computer science data section, and it produces some of the most methodical, calculation-driven questions in the entire exam.

This section covers four topics: binary, data representation, data storage and compression, and encryption. Each one rewards a systematic approach. If you can lay out your working clearly and follow each step without shortcuts, the marks follow. These edexcel igcse computer science revision notes for the 4CP0 specification work through each topic with worked examples designed to build confidence in the method, not just the answer.

Binary: the language of computers

Computers store and process all data as binary: sequences of 0s and 1s. Every number, character, image and sound is ultimately represented in binary. The data edexcel igcse section requires you to convert between binary and denary, perform binary arithmetic, work with hexadecimal, and understand signed integers.

Binary to denary conversion

Each position in a binary number represents a power of 2. An 8-bit binary number uses the place values 128, 64, 32, 16, 8, 4, 2, 1 from left to right.

Worked example: Convert 10110101 to denary.

1286432168421
10110101

128 + 32 + 16 + 4 + 1 = 181. The answer is 181.

Denary to binary conversion

Worked example: Convert 200 to binary.

Start with the largest place value that fits: 128 fits into 200 (200 - 128 = 72). 64 fits into 72 (72 - 64 = 8). 32 does not fit into 8. 16 does not fit. 8 fits exactly (8 - 8 = 0). Result: 11001000.

Binary addition

Binary addition follows simple rules: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (write 0, carry 1). When three 1s meet (including a carry): 1+1+1=11 (write 1, carry 1).

Worked example: Add 01101010 + 00110110.

  01101010
+ 00110110
----------
  10100000

Working from right to left: 0+0=0, 1+1=10 (write 0, carry 1), 0+1+1=10 (write 0, carry 1), 1+0+1=10 (write 0, carry 1), 0+1+1=10 (write 0, carry 1), 1+1+1=11 (write 1, carry 1), 1+0+1=10 (write 0, carry 1), 0+0+1=1. Result: 10100000.

Overflow occurs when the result of a calculation is too large to be stored in the available number of bits. If two 8-bit numbers are added and the result requires 9 bits, the ninth bit is lost. This changes the stored value and produces an incorrect result. The exam may ask you to identify when overflow has occurred and explain why.

Binary shifts

A logical shift left moves all bits one position to the left, filling the vacated position on the right with 0. This has the effect of multiplying the value by 2. A logical shift right divides by 2.

An arithmetic shift preserves the sign bit (the leftmost bit) when shifting right, which keeps negative numbers negative. Logical shifts do not preserve the sign.

Worked example: Shift 00101100 (denary 44) one place left logically. Result: 01011000 (denary 88). The value has doubled.

Hexadecimal

Hexadecimal (base 16) uses digits 0-9 and letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It is used because it provides a compact way to represent binary values: each hexadecimal digit corresponds to exactly four binary digits (a nibble).

Worked example: Convert binary 10101111 to hexadecimal. Split into nibbles: 1010 | 1111. 1010 = A, 1111 = F. Answer: AF.

Signed integers

The specification covers two methods for representing negative numbers: sign and magnitude (the leftmost bit indicates the sign: 0 = positive, 1 = negative, and the remaining bits represent the magnitude) and two's complement (the leftmost bit has a negative place value). Two's complement is the more commonly examined method because it allows straightforward binary addition of positive and negative numbers.

Data representation

The igcse 4cp0 data section also covers how computers represent characters, images and sound.

Character encoding: ASCII and Unicode

ASCII uses 7 bits to represent 128 characters, covering the English alphabet (upper and lower case), digits 0-9, punctuation and control characters. Unicode extends this to represent characters from virtually every writing system in the world, using up to 32 bits per character. The advantage of Unicode is inclusivity; the trade-off is that each character requires more storage space than ASCII.

Bitmap images

A bitmap image is made up of pixels arranged in a grid. Each pixel stores a colour value. Two properties define the quality and size of the image:

  • Resolution: the number of pixels in the image (width x height). Higher resolution means more detail but a larger file.
  • Colour depth: the number of bits used to store the colour of each pixel. 1 bit = 2 colours, 8 bits = 256 colours, 24 bits = over 16 million colours.

File size formula: File size (bits) = width x height x colour depth.

Worked example: An image is 800 x 600 pixels with a colour depth of 24 bits. File size = 800 x 600 x 24 = 11,520,000 bits = 1,440,000 bytes = approximately 1.37 MiB.

Sound representation

Sound is an analogue signal. To store it digitally, it must be sampled: the amplitude of the sound wave is measured at regular intervals. The two key properties are:

  • Sampling frequency (sample rate): how many samples are taken per second, measured in Hz. Higher sampling frequency captures more detail.
  • Bit depth (resolution): the number of bits used to store each sample. Higher bit depth means each sample is more precise.

File size formula: File size (bits) = sampling frequency x bit depth x duration (seconds).

The limitations are clear: more bits per sample and more samples per second both increase quality but also increase file size, often dramatically.

Data storage and compression

Units of data storage

The specification requires you to know both binary-based and decimal-based units:

UnitSize
BitSingle binary digit (0 or 1)
Nibble4 bits
Byte8 bits
Kibibyte (KiB)1,024 bytes
Mebibyte (MiB)1,024 KiB
Gibibyte (GiB)1,024 MiB
Tebibyte (TiB)1,024 GiB
Kilobyte (KB)1,000 bytes
Megabyte (MB)1,000 KB
Gigabyte (GB)1,000 MB
Terabyte (TB)1,000 GB

The distinction between binary prefixes (kibi, mebi, gibi) and decimal prefixes (kilo, mega, giga) is tested. Do not confuse them: 1 KiB = 1,024 bytes, while 1 KB = 1,000 bytes.

Compression

Compression reduces file size to save storage space and speed up transmission. There are two approaches:

  • Lossy compression permanently removes some data to achieve smaller files. The original cannot be perfectly restored. JPEG (images) and MP3 (audio) use lossy compression.
  • Lossless compression reduces file size without losing any data. The original can be perfectly restored. Lossless is essential where data integrity matters (text files, program code).

Run-length encoding (RLE)

RLE is a lossless compression algorithm that replaces consecutive repeated values with a count and the value itself.

Worked example: The data sequence AAABBBCCCCDDDD becomes 3A3B4C4D. Instead of storing 14 characters, you store 8. RLE works well when data contains long runs of the same value (such as large areas of a single colour in an image) but is ineffective or even counterproductive when there is little repetition.

Encryption

Encryption transforms readable data (plaintext) into an unreadable form (ciphertext) to protect it from unauthorised access. The edexcel igcse computer science explained material covers four cipher methods.

Caesar cipher

Each letter is shifted by a fixed number of positions in the alphabet. With a shift of 3, A becomes D, B becomes E, and so on. It is simple but very easy to break because there are only 25 possible shifts.

Worked example: Encrypt "HELLO" with a shift of 3. H becomes K, E becomes H, L becomes O, L becomes O, O becomes R. Ciphertext: KHOOR.

Vigenere cipher

The Vigenere cipher uses a keyword to vary the shift for each letter. Each letter of the keyword provides a different shift amount. This makes frequency analysis much harder than with a Caesar cipher.

Rail Fence cipher

The Rail Fence cipher writes the plaintext in a zigzag pattern across a set number of rows (rails), then reads off each row in sequence. It is a transposition cipher: the letters are not changed, only their positions.

Pigpen cipher

The Pigpen cipher replaces each letter with a symbol derived from a grid pattern. It is a substitution cipher, where each letter maps to a unique geometric shape.

Exam approach for encryption questions: Show every step of your working. If the question asks you to encrypt a word using the Caesar cipher, write out the alphabet, mark the shift, and show the mapping for each letter. Examiners award method marks, so even if you make one letter wrong, a clear method earns partial credit.

Common mistakes in this section

  • Losing carries in binary addition. The most frequent error. Write your carries above the calculation clearly, and double-check by converting your answer back to denary.
  • Confusing logical and arithmetic shifts. Logical shifts fill with zeros from both ends. Arithmetic right shifts preserve the sign bit. The exam can ask for either, so read the question carefully.
  • Mixing up KiB and KB. 1 KiB = 1,024 bytes (binary). 1 KB = 1,000 bytes (decimal). If the question specifies kibibytes, divide by 1,024, not 1,000.
  • Forgetting to convert units in file size calculations. The formula gives a result in bits. To convert to bytes, divide by 8. Then divide by 1,024 for KiB, or by 1,000 for KB, depending on what the question asks for.
  • Assuming RLE always reduces file size. RLE only saves space when there are repeated runs. The string ABCDEFGH compressed with RLE becomes 1A1B1C1D1E1F1G1H, which is longer than the original.

Self-check questions

Work through these edexcel igcse computer science practice questions to test your fluency. Refer back to these edexcel igcse computer science notes only after attempting each one.

  1. Convert the denary number 213 to an 8-bit binary number.
  2. Add the binary numbers 01011011 and 00101110. Does overflow occur?
  3. An image is 1024 x 768 pixels with a colour depth of 16 bits. Calculate the file size in kibibytes.
  4. A sound file is sampled at 44,100 Hz with a bit depth of 16 bits and lasts 30 seconds. Calculate the file size in mebibytes.
  5. Encrypt the word "SCIENCE" using a Caesar cipher with a shift of 5.
  6. Apply RLE compression to the data: WWWWWBBRRRRRRR. What is the compressed output?

The data section rewards precision. Every conversion, every calculation, every cipher has a method. Learn the method, practise it until it is automatic, and always show your working in the exam. Marks in this section are earned step by step, and they are some of the most reliable marks on the paper.

Téléchargez l'application sur Google Play.

Tout ce dont vous avez besoin pour exceller au JAMB, WAEC et NECO.

Green Bridge CBT Mobile App
Assistant de chat d'apprentissage personnalisé par IA
Des milliers d'anciens sujets IGCSE, JAMB, WAEC et NECO.
Plus de 1200 notes de cours
Assistance Hors Ligne - Apprenez à Tout Moment, Partout
Horaire du Pont Vert
Résumés littéraires et questions potentielles
Suivez vos performances et votre progression
Explications Approfondies pour un Apprentissage Complet
Résumé

Complete revision notes for edexcel igcse computer science data: binary arithmetic, data representation, compression, encryption and file sizes.