Skip to topic
    ← Back to course topics

    Fundamentals of data representation — AQA A-Level Computer Science

    Test yourself on Fundamentals of data representation with AQA A-Level practice questions.

    Start free

    7 days Premium · Then free forever · No card, no charge

    Fundamentals of data representation explained

    This subtopic covers the representation of real numbers in binary using the IEEE 754 floating point standard.

    Read the full explanation

    It explores how numbers are stored with a sign, mantissa, and exponent to balance range and precision. Practical applications include scientific computation, graphics, and any system requiring fractional values.

    Your focus

    1. Explain the need for floating point representation in computer systems.
    2. Apply the IEEE 754 standard to convert denary numbers into binary floating point format.
    3. Analyse the effects of limited mantissa bits on calculation precision.
    Show all 4 objectives
    1. Evaluate the trade-offs between range and precision in floating point representation.

    Fundamentals of data representation exam tips

    Quick Revision Summary (Key Takeaway)

    Fundamentals of data representation covers how computers store and interpret data using binary, including number systems (binary, denary, hexadecimal), character encoding (ASCII, Unicode), images (bitmap, vector), sound (sampling), and compression. Understanding these concepts is essential for AQA A-Level Computer Science as they underpin all data processing and storage.

    Topic Overview

    Fundamentals of data representation is a core topic in AQA A-Level Computer Science that explains how all data, from numbers to text, images, and sound, is stored and processed by computers. It begins with the binary number system, which is the foundation of all computing, and extends to hexadecimal as a shorthand for binary. You will learn how to convert between number bases and perform binary arithmetic, which is essential for understanding how processors work.

    Beyond numbers, this topic covers character encoding systems like ASCII and Unicode, which allow text to be represented digitally. You will also explore how images are stored as bitmaps or vectors, and how sound is digitised through sampling. Understanding these concepts is crucial for calculating file sizes, which is a common exam question, and for appreciating the trade-offs between quality and storage space.

    Finally, data compression techniques, both lossy and lossless, are introduced to show how files can be reduced in size for efficient storage and transmission. This topic is not only examinable in its own right but also underpins many other areas of the specification, such as data structures, networking, and the internet. Mastering it gives you a solid foundation for the rest of the course.

    Key Concepts
    • →Binary, denary, and hexadecimal number systems and conversions between them.
    • →Binary arithmetic: addition, subtraction, and shifts (logical and arithmetic).
    • →Character encoding: ASCII (7-bit) and Unicode (variable length, e.g., UTF-8).
    • →Bitmap images: resolution, colour depth, and file size calculation.
    • →Vector graphics: primitives, attributes, and advantages over bitmaps.
    • →Sound representation: sampling, sample rate, bit depth, and file size calculation.
    • →Compression: lossy vs lossless, and common algorithms like run-length encoding (RLE).
    Marking Points
    • Award credit for correctly identifying the sign bit appropriate to the number.
    • Award credit for accurate conversion of the mantissa to a normalised form.
    • Award credit for applying the correct exponent bias and storing the exponent in biased form.
    • Award credit for recognising and handling edge cases such as zero, denormalised numbers, infinity, and NaN.
    Examiner Tips
    • 💡Always begin by identifying the sign bit before proceeding with conversion.
    • 💡Memorise the exponent bias values for single (127) and double (1023) precision.
    • 💡Clearly show intermediate steps including normalisation and bias application in your working.
    • 💡Check for special representations such as all-zeros or all-ones in exponent fields to avoid common pitfalls.
    • 💡Always show your working in calculations, especially for file size questions, as method marks are awarded even if the final answer is wrong.
    • 💡Use the correct units: bits, bytes, KiB, MiB, etc. Know the difference between decimal (MB) and binary (MiB) multiples.
    • 💡When comparing lossy and lossless compression, always mention the trade-off between file size and quality, and give a specific example (e.g., JPEG vs PNG).
    Common Mistakes
    • Omitting the exponent bias when converting to stored format.
    • Failing to normalise the mantissa correctly, leaving leading zeros.
    • Confusing the bit allocation between single and double precision fields.
    • Assuming floating point arithmetic is exact, neglecting rounding errors.
    • Misconception: 'Hexadecimal is a different type of data.' Correction: Hexadecimal is just a different way of representing binary numbers; it is not a separate data type.
    • Misconception: 'Higher sample rate always means better quality sound.' Correction: While higher sample rate improves frequency capture, the bit depth also affects dynamic range; both must be considered.
    • Misconception: 'Vector images are always smaller than bitmap images.' Correction: Vector images are resolution-independent and can be smaller for simple graphics, but complex vector images may be larger than a simple bitmap.
    Revision Plan
    1. 1Week 1, Days 1-2: Revise number systems – practice converting between binary, denary, and hexadecimal. Use flashcards for quick recall.
    2. 2Week 1, Days 3-4: Focus on binary arithmetic and shifts. Work through past paper questions on addition and logical shifts.
    3. 3Week 1, Days 5-6: Study character encoding (ASCII and Unicode) and image representation. Create a summary table of key terms.
    4. 4Week 2, Days 1-2: Learn about sound representation and file size calculations. Practice with different sample rates and bit depths.
    5. 5Week 2, Days 3-4: Understand compression techniques. Compare lossy and lossless with examples.
    6. 6Week 2, Days 5-7: Consolidate by doing mixed exam questions under timed conditions. Review mark schemes to understand command words.
    Exam Question Types
    • 📋Multiple-choice questions on conversions or definitions (e.g., 'What is the hexadecimal representation of 1111 0010?').
    • 📋Short-answer questions asking to explain a concept, such as 'Explain the difference between lossy and lossless compression.'
    • 📋Calculation questions requiring file size or binary arithmetic, often with 'Show your working'.
    • 📋Extended response (6-mark) questions evaluating the suitability of a representation method for a given scenario, e.g., 'Evaluate the use of vector graphics for a company logo.'
    Command Word Expectations (AQA)
    Calculate

    You must perform a numerical calculation and show your working. The final answer should include appropriate units. Marks are awarded for method and accuracy.

    Explain

    Provide a detailed reason or account of how something works. Use specific terminology and give examples where relevant. Do not just describe; you must show cause and effect.

    Evaluate

    Consider both advantages and disadvantages, then make a judgement. In AQA Computer Science, you should structure your answer with points for and against, and conclude with a justified decision.

    How Students Lose Marks (Examiner Pitfalls)
    Pitfall: Students often confuse the terms 'bit depth' and 'resolution' when discussing image representation, leading to incorrect calculations of file size.
    ❌ Weak Answer (Loses Marks):The image has a higher resolution, so it has more colours.
    Example improved answer:Resolution refers to the number of pixels in an image (width × height), while bit depth (colour depth) determines the number of bits used to represent the colour of each pixel, which affects the range of colours. Increasing either increases file size, but they are distinct concepts.
    Examiner Tip: Always define both terms explicitly in your answer and use the correct formula: file size = resolution × bit depth.
    Pitfall: When calculating sound file sizes, students often forget to include the duration of the sound or mix up sample rate and bit depth.
    ❌ Weak Answer (Loses Marks):File size = sample rate × bit depth.
    Example improved answer:File size (bits) = sample rate (Hz) × bit depth (bits) × duration (seconds). For example, a 10-second sound with a sample rate of 44,100 Hz and 16-bit depth gives 44,100 × 16 × 10 = 7,056,000 bits, which is 882,000 bytes.
    Examiner Tip: Always check the units: sample rate is in Hz (samples per second), and remember to multiply by the duration in seconds. Convert to bytes or KB as required.
    Step-by-Step Worked Solutions

    Question: A bitmap image has a resolution of 1920 × 1080 pixels and a colour depth of 24 bits. Calculate the file size in MiB. Show your working.

    1. 1.Step 1: Calculate total number of pixels: 1920 × 1080 = 2,073,600 pixels.
    2. 2.Step 2: Multiply by colour depth: 2,073,600 × 24 = 49,766,400 bits.
    3. 3.Step 3: Convert bits to bytes: 49,766,400 ÷ 8 = 6,220,800 bytes.
    4. 4.Step 4: Convert to MiB: 6,220,800 ÷ (1024 × 1024) = 5.93 MiB (approximately).
    Final Answer: The file size is approximately 5.93 MiB.

    Question: A sound file is recorded with a sample rate of 44.1 kHz and a bit depth of 16 bits. The recording lasts 2 minutes. Calculate the file size in megabytes (MB). Show your working.

    1. 1.Step 1: Convert sample rate to Hz: 44.1 kHz = 44,100 Hz.
    2. 2.Step 2: Convert duration to seconds: 2 minutes = 120 seconds.
    3. 3.Step 3: Calculate total bits: 44,100 × 16 × 120 = 84,672,000 bits.
    4. 4.Step 4: Convert to bytes: 84,672,000 ÷ 8 = 10,584,000 bytes.
    5. 5.Step 5: Convert to MB (using 1 MB = 1,000,000 bytes): 10,584,000 ÷ 1,000,000 = 10.584 MB.
    Final Answer: The file size is approximately 10.58 MB.
    Active Recall Memory Test
    What is the difference between bit depth and sample rate in sound representation?
    Key Fact: Bit depth determines the number of bits used to represent each sample, affecting the dynamic range (loudness levels). Sample rate is the number of samples taken per second, affecting the frequency range that can be captured.
    How do you convert a denary number to hexadecimal?
    Key Fact: First convert the denary number to binary, then split the binary into groups of 4 bits (nibbles) from the right, and convert each nibble to its hexadecimal equivalent (0-9, A-F).
    What is run-length encoding (RLE) and when is it most effective?
    Key Fact: RLE is a lossless compression method that replaces sequences of repeated data with a single value and a count. It is most effective on images with large areas of solid colour, such as simple graphics or black-and-white images.
    Why is Unicode preferred over ASCII for international text?
    Key Fact: Unicode supports a much larger range of characters from different languages and symbols, using variable-length encoding (e.g., UTF-8) to represent over a million characters, whereas ASCII only has 128 characters.
    Frequently Asked Questions
    What is the difference between lossy and lossless compression?
    Lossy compression reduces file size by permanently removing some data, which can degrade quality. It is used for images (JPEG) and audio (MP3) where some loss is acceptable. Lossless compression reduces file size without losing any data, allowing perfect reconstruction, and is used for text files (ZIP) and images (PNG). The choice depends on the need for quality versus storage space.
    How do I calculate the file size of an image?
    To calculate the file size of a bitmap image, multiply the width by the height to get the total number of pixels, then multiply by the colour depth (bits per pixel). This gives the size in bits. Divide by 8 to get bytes, and then convert to KB, MB, or MiB as needed. For example, a 1920×1080 image with 24-bit colour is 1920×1080×24 = 49,766,400 bits = 6,220,800 bytes ≈ 5.93 MiB.
    Why do we use hexadecimal in computer science?
    Hexadecimal is a base-16 system that provides a more human-friendly representation of binary numbers. Each hexadecimal digit corresponds to exactly 4 bits, making it easy to convert between the two. It is used in memory addresses, colour codes, and debugging because it is shorter and less error-prone than writing long binary strings.
    What is the difference between ASCII and Unicode?
    ASCII uses 7 bits to represent 128 characters, mainly English letters, digits, and punctuation. Unicode is a more comprehensive standard that can represent over a million characters from many languages and symbols, using variable-length encoding like UTF-8. Unicode is backwards-compatible with ASCII, so the first 128 characters are the same.
    How does sampling work for sound?
    Sound is an analogue wave that is sampled at regular intervals to convert it to digital. The sample rate is the number of samples taken per second (measured in Hz), and the bit depth is the number of bits used to represent the amplitude of each sample. Higher sample rates and bit depths result in better quality but larger file sizes.
    What is a logical shift and how does it differ from an arithmetic shift?
    A logical shift moves bits left or right and fills the vacated positions with zeros. It is used for unsigned numbers and effectively multiplies or divides by 2. An arithmetic shift preserves the sign bit for signed numbers, so when shifting right, the vacated positions are filled with the sign bit (0 for positive, 1 for negative). This maintains the correct sign of the number.