Skip to content
IGCSE·Tuition

Computer Science · Practice

Computer Science original practice and explained answers

Practice only helps when you attempt the question first and then read the answer for the reasoning, not just the result.

On this page
  1. How to use this set
  2. Questions
  3. If you got these wrong
  4. When practice alone is not enough

These nine questions mix number systems, file size, error checking, logic, algorithms, testing and databases. Do them in order, on paper, and open each answer only after you have written your own.

The original mixed-practice builder can assemble longer sessions from a reviewed bank. Use this page for a first set, and keep your mistakes in the mistake log.

How to use this set

  1. Attempt the question with a pen. Write the working, not just the answer.
  2. Open the answer and compare step by step.
  3. If you were wrong, note the cause: slip, misreading, gap or term.
  4. Retest the same skill with a new question two days later.

Questions

Q1. Binary to denary. Convert 10110 to denary.

Show answer

The place values from the left are 16, 8, 4, 2, 1, so the bits 1, 0, 1, 1, 0 select 16, 4 and 2.

16 + 4 + 2 = 22.

Q2. Denary to binary. Convert 45 to binary.

Show answer

45 = 32 + 13. 13 = 8 + 4 + 1. So the 32, 8, 4 and 1 places are 1.

Places 32, 16, 8, 4, 2, 1 give 1, 0, 1, 1, 0, 1, so the answer is 101101. Check: 32 + 8 + 4 + 1 = 45. ✓

Q3. Hexadecimal. Convert hexadecimal 2F to denary.

Show answer

The 2 is in the sixteens place and F is 15. So 2 × 16 + 15 = 32 + 15 = 47.

Q4. Image size. An image is 8 pixels wide and 8 pixels high. Each pixel can be one of 16 colours, stored with the smallest whole number of bits. Find the file size in bytes, ignoring any extra data.

Show answer

16 colours need 4 bits, because 2⁴ = 16. There are 8 × 8 = 64 pixels.

64 × 4 = 256 bits. 256 ÷ 8 = 32 bytes.

Q5. Parity. Seven data bits 1011001 are sent with an even parity bit. What is the parity bit?

Show answer

Count the 1s: 1, 0, 1, 1, 0, 0, 1 has four 1s. Four is already even, so the parity bit is 0.

Q6. Logic. For inputs A = 1 and B = 0, what is the output of NOT (A AND B)? What changes if B = 1?

Show answer

With A = 1 and B = 0: A AND B = 0, and NOT 0 = 1.

With B = 1: A AND B = 1, and NOT 1 = 0.

Q7. Trace table. Trace this algorithm and state the output.

X ← 3
Y ← 0
WHILE X > 0
    Y ← Y + X
    X ← X - 1
ENDWHILE
OUTPUT Y
Show answer
PassX at startY after addingX after
1332
2251
3160

Now X = 0, so the loop stops. The output is 6. Check: 3 + 2 + 1 = 6. ✓

Q8. Test data. A program accepts ages from 13 to 18 inclusive. Give one normal value, the boundary values to test and two values that should be rejected.

Show answer

Normal: 15. Boundaries: 13 and 18, which must be accepted.

Rejected: 12 and 19, just outside the edges, plus abnormal input such as “abc”. A good set has normal, boundary and abnormal data.

Q9. SQL conditions. Use this table, Members.

NameYearClub
Aina10Chess
Ben10Drama
Chen11Chess
Dev11Drama

Which names does WHERE Year = 10 AND Club = "Chess" return? Which does WHERE Year = 10 OR Club = "Chess" return?

Show answer

AND needs both true: only Aina (Year 10 and Chess). Answer: Aina.

OR needs either true: Aina (both), Ben (Year 10), Chen (Chess). Dev is neither. Answer: Aina, Ben, Chen.

If you got these wrong

Where you slippedWhat to read
Q1 to Q3, conversionsRepresenting numbers and text
Q4, file sizeImages, sound and storage
Q5, parityData transmission and checking
Q6, logicBoolean logic
Q7, tracingRepetition and arrays and the loop help page
Q8, test dataValidation, verification and testing and the boundary help page
Q9, SQLDatabases and query reasoning

If you confused terms rather than methods, see the terminology guide. The learning guide has the full module map.

When practice alone is not enough

If you can follow every answer but cannot produce the working yourself, the gap is usually in the first step of reasoning. That is a good reason to talk it through with someone who can watch you. Online one-to-one Computer Science tuition starts with a paid one-hour trial at the assigned teacher’s confirmed rate, from RM80.

Questions people ask

Are these real exam questions?

No. Every question here is original, written for learning. We do not copy or predict past papers. They practise the skills the subject uses, and your teacher or the Cambridge site is the place to look at official specimen material for your code.

Should I look at the answer straight away?

Try the question on paper first, even if you are unsure. Write your attempt, then open the answer and compare the steps, not only the final value. If your steps differ, that difference is what to note in your mistake log.

Why are there no marks shown?

Mark allocations depend on the paper and the year, and we do not invent them. Instead, questions are ordered from easier to harder. Use them to practise the method and explain your reasoning fully, as a marker would want to see it.

What if my route uses different notation?

The pseudocode here is a simple, readable style. Your paper may use a specific notation or language depending on your code and exam year. Confirm it on the Cambridge page, then rewrite the question in your own route's form as extra practice.

Sources

  1. Cambridge IGCSE Computer Science 0478 syllabus page

Updated:

Your next step

If you get a question wrong and the explanation still does not show you why, a teacher working one to one can sit with your working and find the exact step.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

9,000+ students helped through our service