Skip to topic
    ← Back to course topics

    Number base — AQA A-Level Computer Science

    Number bases define positional notation systems used to represent numerical quantities, notably binary (base-2), denary (base-10), and hexadecimal (base-16). In AQA A-Level Computer Science, mastering conversions between these bases and understanding their internal representation in digital hardware is essential for low-level systems programming and data encoding.

    Number base explained

    A number base (or radix) is the number of distinct digits a system uses and determines the value of each position within a number.

    Read the full explanation

    Decimal is base 10, with digits 0 to 9; binary is base 2, with digits 0 and 1; hexadecimal is base 16, using 0 to 9 and A to F. Each position represents a power of the base: in binary, 1011 equals 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 11 in decimal. Learners must be familiar with the concept so they can read and convert numbers across bases. Hexadecimal is a compact way to write binary because each hex digit corresponds to exactly four bits, so 1111 0000 is written as F0. Understanding base allows learners to explain why computers use binary internally and why hexadecimal is convenient for representing memory addresses and colour values.

    Your focus

    1. Be familiar with the concept of a number base, in particular:

    Which command word is this?

    Transform a numerical representation from one specified base to another, showing clear intermediate mathematical working or nibble groupings.

    Number base exam tips

    Topic Overview

    Number bases define how numerical values are systematically expressed using positional notations governed by a base (radix). In AQA A-Level Computer Science, understanding base-2 (binary), base-10 (denary), and base-16 (hexadecimal) is fundamental because computing hardware operates natively using bistable physical states that correspond directly to binary digits.

    This topic forms the conceptual foundation for all digital data representation, including signed and unsigned integers, two's complement, fixed-point and floating-point real numbers, as well as character sets like ASCII and Unicode. Gaining fluency across base conversions enables students to analyse machine architecture, memory addressing, network protocols, and low-level software execution effectively.

    Key Concepts
    • →Positional weight systems: The value of each digit is determined by the digit multiplied by the base raised to the power of its position index.
    • →Binary (Base-2): Uses digits 0 and 1, mapping directly to physical digital electronics like transistors and logic gates.
    • →Denary/Decimal (Base-10): The standard human numerical system using digits 0 through 9.
    • →Hexadecimal (Base-16): Uses digits 0-9 and letters A-F (representing 10-15), providing a compact, 1:4 mapping to binary nibbles.
    • →Range and capacity: An n-bit binary representation provides 2^n unique values, spanning from 0 to 2^n - 1 for unsigned values.
    Marking Points
    • Defines a number base as the count of distinct digits, with each position being a power of the base
    • Shows that binary uses base 2 and hexadecimal uses base 16 with digits A to F
    • Converts a binary value to decimal by summing place values
    • Explains that one hexadecimal digit corresponds to four binary digits
    Examiner Tips
    • 💡Write out place values explicitly when converting between bases to avoid errors.
    • 💡Remember that each hexadecimal digit represents exactly four binary digits.
    • 💡State the base clearly when writing numbers in different systems.
    • 💡Always write out column weight tables (e.g. 128, 64, 32, 16, 8, 4, 2, 1) in your working to prevent simple mental arithmetic slips under exam conditions.
    • 💡Ensure letters in hexadecimal are capitalised and verified carefully against denary values (A=10, B=11, C=12, D=13, E=14, F=15).
    • 💡Double check whether a question asks for a fixed bit width, such as an 8-bit byte or 16-bit word, and add necessary leading zero padding.
    Common Mistakes
    • Describes base as the number of digits in a number; base is the number of distinct digit symbols available.
    • Reads 1011 as one thousand eleven; in binary it is 11 in decimal.
    • Writes hexadecimal digits as 10 to 15 instead of A to F.
    • Believing computers actually execute programs or store data natively in hexadecimal; hex is strictly a human-readable shorthand for binary and has no native hardware presence.
    • Omitting leading zeros when writing a 4-bit nibble conversion, which leads to digit alignment errors when combining multiple nibbles into a byte.
    • Assuming that the largest value representable with n bits is 2^n rather than 2^n - 1 (for example, stating 8 bits can store the unsigned value 256).
    Revision Plan
    1. 1Day 1-2: Master positional place value tables and practice conversions between denary and unsigned binary for 8-bit and 16-bit values.
    2. 2Day 3-4: Learn hexadecimal digits (0-9, A-F) and practice converting directly between binary nibbles and hex digits.
    3. 3Day 5: Practice denary-to-hexadecimal and hexadecimal-to-denary conversions using binary as an intermediate step.
    4. 4Day 6-7: Complete timed past exam questions from AQA Paper 1, paying close attention to question wording on byte width and shorthand notation justifications.
    Exam Question Types
    • 📋Direct conversions: Converting values across binary, denary, and hexadecimal formats, often specified with fixed bit-widths.
    • 📋Theoretical justification: Explain why hexadecimal is favoured over binary or denary in computing contexts (such as memory dumps or IPv6 addresses).
    • 📋Representation bounds: Calculating the maximum value or number of distinct states possible given a specific bit-length n.
    Command Word Expectations (AQA)
    Convert

    Transform a numerical representation from one specified base to another, showing clear intermediate mathematical working or nibble groupings.

    Explain

    Set out purposes, reasons, or mechanisms clearly, showing the logical link (e.g. why 16 being 2^4 allows exact nibble grouping).

    Calculate

    Perform a mathematical computation to find a numerical value (such as the maximum unsigned range for n bits), including working.

    How Students Lose Marks (Examiner Pitfalls)
    Pitfall: Confusing the range of values an n-bit binary number can represent with the total number of unique values it can express.
    ❌ Weak Answer (Loses Marks):An 8-bit unsigned integer can represent numbers up to 256.
    Example improved answer:An 8-bit unsigned integer can represent 2^8 or 256 unique combinations, ranging from 0 to 255 (2^n - 1) inclusive.
    Examiner Tip: Always distinguish between total states (2^n) and maximum representable integer value (2^n - 1) for unsigned numbers.
    Pitfall: Incorrectly converting hexadecimal values containing digits A-F into binary by grouping digits into incorrect bit lengths.
    ❌ Weak Answer (Loses Marks):To convert 3B to binary, convert 3 to 11 and B to 11, giving 1111.
    Example improved answer:Each hexadecimal digit corresponds to exactly one 4-bit nibble. '3' converts to '0011' and 'B' (denary 11) converts to '1011', giving the full 8-bit binary representation '00111011'.
    Examiner Tip: Pad every single hex digit out to exactly 4 binary bits (nibble), preserving leading zeros for each digit before combining.
    Step-by-Step Worked Solutions

    Question: Convert the denary integer 182 into an 8-bit unsigned binary number, and subsequently convert this binary number into hexadecimal.

    1. 1.Step 1: Identify place values for an 8-bit binary number: 128, 64, 32, 16, 8, 4, 2, 1.
    2. 2.Step 2: Compare 182 to 128. Since 182 >= 128, place a 1 at 128; remainder = 182 - 128 = 54.
    3. 3.Step 3: Compare 54 to 64 (0). Compare 54 to 32 (1, rem = 22). Compare 22 to 16 (1, rem = 6). Compare 6 to 8 (0). Compare 6 to 4 (1, rem = 2). Compare 2 to 2 (1, rem = 0). Compare 0 to 1 (0). This produces 10110110_2.
    4. 4.Step 4: Split the 8-bit binary string into two 4-bit nibbles: most significant nibble 1011 and least significant nibble 0110.
    5. 5.Step 5: Convert each nibble to denary then hexadecimal: 1011_2 = 8 + 2 + 1 = 11_10, which corresponds to 'B' in hexadecimal. 0110_2 = 4 + 2 = 6_10, which corresponds to '6' in hexadecimal.
    Final Answer: Binary: 10110110, Hexadecimal: B6

    Question: Explain why hexadecimal is frequently used by software developers and computer scientists as a shorthand notation for binary values.

    1. 1.Step 1: State the exact mathematical relationship between hexadecimal and binary (2^4 = 16, meaning 1 hex digit directly maps to 4 binary bits).
    2. 2.Step 2: Explain the human readability benefit (hexadecimal strings are vastly more compact, requiring only one character for every four bits).
    3. 3.Step 3: Explain the impact on human error (compact strings reduce transcription and reading errors when dealing with long bit-strings such as memory addresses, MAC addresses, and colour codes).
    Final Answer: Hexadecimal provides a direct 1-to-4 bit mapping with binary because 16 is a power of 2 (2^4). This compactness makes memory addresses, machine code instructions, and raw data substantially easier for humans to read, write, and debug without introducing conversion errors.
    Active Recall Memory Test
    What is the maximum unsigned denary integer that can be stored in 12 bits?
    Key Fact: 4095 (calculated as 2^12 - 1, or 4096 - 1).
    What are the hexadecimal equivalents of denary 10, 12, and 15?
    Key Fact: 10 = A, 12 = C, 15 = F.
    How many bits are represented by a single hexadecimal character?
    Key Fact: 4 bits (one nibble).
    Convert binary 11010111 into hexadecimal.
    Key Fact: D7 (1101 = 13 = D, 0111 = 7).
    Frequently Asked Questions
    Why do computers use binary instead of denary?
    Computers rely on binary because digital hardware is constructed from electronic switches called transistors. These transistors can reliably hold two electrical states: on (high voltage) and off (low voltage). Engineering circuits to differentiate ten distinct voltage levels with precision would make hardware slow, prone to thermal noise, and significantly more expensive.
    Does hexadecimal take up less storage space in computer memory than binary?
    No, hexadecimal does not alter memory storage requirements. Inside computer memory and registers, data is stored solely as binary voltage states. Hexadecimal is simply a notation used by human programmers to read, write, and display binary data cleanly; it takes up zero space inside native computer processing.
    What is the quickest way to convert denary to hexadecimal?
    The most reliable method for most students is converting the denary number into binary first by subtracting powers of 2. Once you have the binary representation, divide it into 4-bit nibbles starting from the right (least significant bit), then convert each nibble directly into its corresponding hexadecimal character (0-9, A-F).
    Why is base-16 preferred over base-8 (octal) in modern computing?
    Modern computing architectures are fundamentally byte-oriented, where one byte consists of 8 bits. Hexadecimal maps seamlessly to this architecture because one byte corresponds to exactly two hexadecimal characters (4 bits each). Octal relies on 3-bit groupings, which do not align evenly into an 8-bit byte or 16-bit word.
    What is the difference between MSB and LSB in binary representations?
    MSB stands for Most Significant Bit, which is the leftmost bit carrying the highest positional weight (e.g. 128 in an 8-bit unsigned integer). LSB stands for Least Significant Bit, which is the rightmost bit carrying the lowest positional weight (value 1). Identifying them correctly is crucial when dividing bit sequences into nibbles or converting bases.