AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Integer division, including remainders.

    Full specification wording

    Arithmetic operations in a programming language: integer division, including remainders.

    Integer division divides one whole number by another and discards any fractional part, keeping only the whole-number quotient.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 6 of 8

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    Integer division divides one whole number by another and discards any fractional part, keeping only the whole-number quotient. The remainder is what is left over after that whole-number quotient is taken. In many languages the operator DIV (or //) gives the quotient while MOD (%) gives the remainder, so 11 DIV 2 is 5 and 11 MOD 2 is 1, because 2 × 5 = 10 and 11 − 10 = 1. Learners must keep the two results distinct: the quotient answers 'how many whole times does the divisor fit', and the remainder answers 'what is left'. A reliable check is quotient × divisor + remainder = original number, so 5 × 2 + 1 = 11. Contrast this with real division, where 11/2 gives 5.5.

    What earns the marks

    • Integer division returns the whole-number quotient and discards the fractional part, so 11 DIV 2 = 5.
    • The remainder is the amount left after the whole-number quotient is taken, so 11 MOD 2 = 1.
    • Quotient and remainder are different values and must not be confused; DIV gives 5 while MOD gives 1 for 11 and 2.
    • The relationship quotient × divisor + remainder = original number can be used to verify both results.
    • Integer division differs from real division, which would give 5.5 for 11/2.

    Common mistakes and how to put them right

    • Giving 5.5 as the result of integer division.

      Put it right: Integer division discards the fraction and gives 5.

    • Reporting the remainder as 5 or as 0.5.

      Put it right: The remainder is 1 because 11 − (2 × 5) = 1.

    • Swapping the DIV and MOD results.

      Put it right: DIV gives the quotient (5) and MOD gives the remainder (1).

    Exam tips

    • Work out the whole-number quotient first, then subtract quotient × divisor from the original number to find the remainder.
    • Use the check quotient × divisor + remainder = original number to confirm both answers before selecting an option.
    • Read the operator carefully: DIV (or //) asks for the quotient, MOD (%) asks for the remainder, and a plain division sign asks for the real value.

    Try the lesson

    The start of the Arithmetic operations in a programming language: integer division, including remainders. lesson, made from checked teaching notes for this specification point.

    Have a go first

    A program evaluates 20 MOD 4. What value is produced?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Arithmetic operations in a programming language: integer division, including remainders.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge