← IGCSE Computer Science Paper 1

Calculating a check digit with weights and modulus 11

Multiply each digit by its weight, add them up, divide by 11 and use the remainder (often 11 minus it) as the check digit. A 10 is written X in ISBN-10.

Understanding Calculating a check digit with weights and modulus 11 in IGCSE Computer Science Paper 1

What it does: Each digit is multiplied by its own weight (20, 6 and 2), and the products add up to a weighted total of 28. 28 divided by 11 leaves a remainder of 6, so the check digit is 11 - 6 = 5. The products are added to give a total. Modulus 11 means dividing that total by 11 and keeping the remainder. 2x4 = 8, 5x3 = 15 and 1x2 = 2. Then 8 + 15 + 2 = 25. 11 x 2 = 22, and 25 - 22 = 3. The remainder is 3. The check digit must be a single character, so 10 is written as the letter X.

Common mistakes: DIV gives the whole-number quotient, but the check digit needs the remainder. It should be rem ← total MOD 11, which gives 37 MOD 11 = 4. In ISBN-10 it is a check digit of 10 that is written as X, because 10 cannot fit in one digit. The test should be check = 10.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 168–178) and word search (Modules 168–188).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What is the first step when calculating a weighted check digit?
Multiply each digit by its weightDivide the whole number by 11
Matches
Total = 130, 130 MOD 11 = 9, check digit = 9
↓
The remainder was used directly as the check digit. This scheme needs 11 minus the remainder, so the check digit should be 11 - 9 = 2.
Applying
Meanings
Term
weighted check digit
Meaning
Multiply each digit by its weight, add them up, divide by 11 and use the remainder (often 11 minus it) as the check digit. A 10 is written X in ISBN-10.
Practice
total ← 0*10 + 3*9 + 0*8 + 6*7 + 4*6
Testing
Gaps
remainder ← total MOD
Check Answer
Spots
3total ← 5*4 + 1*3 + 7*2
4rem ← total DIV 11

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Fox' badge — Cunning Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What is the first step when calculating a weighted check digit?
A. Multiply each digit by its weight ✓
B. Divide the whole number by 11
Each digit is multiplied by the weight for its position. The products are then added and divided by 11.
2. After multiplying each digit by its weight, what do you do with the products?
A. Multiply them together, then divide by 10
B. Add them up, then divide the total by 11 and find the remainder ✓
The products are added to give a total. Modulus 11 means dividing that total by 11 and keeping the remainder.
3. Digits 2, 5, 1 have weights 4, 3, 2. What is the weighted total?
A. 28
B. 25 ✓
2x4 = 8, 5x3 = 15 and 1x2 = 2. Then 8 + 15 + 2 = 25.
4. A weighted total is 25. What is the remainder when it is divided by 11?
A. 3 ✓
B. 2
11 x 2 = 22, and 25 - 22 = 3. The remainder is 3.
5. A scheme says the check digit is 11 minus the remainder. The remainder is 3. What is the check digit?
A. 8 ✓
B. 3
11 - 3 = 8. The check digit is 8, not the remainder itself.

Match the Pairs

total MOD 11 → The remainder left after dividing the weighted total by 11
11 - (130 MOD 11) = 2 → Check digit 2 for the ISBN-10 digits 030640615 when the weighted total is 130
Multiply each digit by its weight and add the results: digits 5, 2, 1 with weights 4, 3, 2 → 5*4 + 2*3 + 1*2 = 28
Divide the total by 11, find the remainder, then take 11 minus the remainder to get the check digit → 28 MOD 11 = 6, 11 - 6 = 5
Total = 130, 130 MOD 11 = 9, check digit = 9 → The remainder was used directly as the check digit. This scheme needs 11 minus the remainder, so the check digit should be 11 - 9 = 2.
11 - remainder = 10, so the ISBN-10 ends in 10 → A check digit must be a single character. In ISBN-10 a result of 10 is written as the letter X.

Key Term

weighted check digit
Multiply each digit by its weight, add them up, divide by 11 and use the remainder (often 11 minus it) as the check digit. A 10 is written X in ISBN-10.

Fill in the Blanks

1. remainder ← total MOD 11
Hint: Type the number the total is divided by in a weighted check digit scheme.
2. check ← 11 - remainder
Hint: Type the variable holding what is left after the division.
3. IF check = 10 THEN check ← "X" ENDIF
Hint: Type the number that cannot fit in one digit, so it is written as X in ISBN-10.
4. product ← digit * weight total ← total + product
Hint: Type the operator that applies the weight to each digit.
5. total ← total + product remainder ← total MOD 11
Hint: Type the keyword that gives the remainder after division.

Spot the Error

Question 1
A d ← [5, 1, 7]
B w ← [4, 3, 2]
C total ← 5*4 + 1*3 + 7*2
D rem ← total DIV 11
E check ← 11 - rem
Line D — DIV gives the whole-number quotient, but the check digit needs the remainder. It should be rem ← total MOD 11, which gives 37 MOD 11 = 4.
Question 2
A total ← 37
B rem ← total MOD 11
C check ← 11 - rem
D IF check = 11 THEN check ← "X"
Line D — In ISBN-10 it is a check digit of 10 that is written as X, because 10 cannot fit in one digit. The test should be check = 10.
Question 3
A total ← 1
B FOR i ← 1 TO 4
C total ← total + d[i] * w[i]
D NEXT i
Line A — The running total must start at 0. Starting at 1 adds an extra amount to every sum, so the check digit comes out wrong. It should be total ← 0.
Question 4
A total ← 2*5 + 7*4 + 1*3
B rem ← total MOD 11
C check ← rem - 11
D OUTPUT check
Line C — The scheme says the check digit is 11 minus the remainder, not the remainder minus 11, which would be negative. It should be check ← 11 - rem.
Question 5
A total ← 0
B FOR i ← 1 TO 9
C total ← total + d[i] + w[i]
D NEXT i
E rem ← total MOD 11
Line C — Each digit must be multiplied by its weight, not added to it. It should be total ← total + d[i] * w[i].

Student with a class code? Join your class →