Cambridge O Level Computer Science 2210 · 4.2 Types of programming language, translators and integrated development environments (IDEs)

Q21 · 2210/12/M/J/25 Q3

Worked solution from the Software Paper 1 Computer Systems booklet, Part 2 of 2.

Q212210/12/M/J/25original Q3Structured · 22 marks
Question 3 from 2210/12/M/J/25

Worked solution

(a)

Write two reasons:

It is easier to debug [1]

It is machine independent (portable), so it runs on different computers [1]

Another accepted answer: it is less likely to contain errors.

(b)(i)

Fill each gap with a word from the list:

GapTerm
translates the ... at oncewhole code
before ... itexecuting
displays ... errorsall
executes the code ...line by line
stops when an ... is founderror

whole code [1]

executing [1]

all [1]

line by line [1]

error [1]

(b)(ii)

Write two functions, each with its role:

Function 1: code editor [1]

Role: lets the programmer write and change the program [1]

Function 2: run-time environment [1]

Role: lets the programmer run the code and see the output [1]

Other accepted pairs: error diagnostics (find errors in the code), auto-completion (suggests ways to finish a command word), auto-correction (fixes misspelt command words), prettyprint (shows command words in different colours).

(c)(i)

Write: Laser [1]

Inkjet also scores.

(c)(ii)

Choose a method and explain it. One possible answer:

Data transmission method: serial [1]

Direction: half-duplex [1]

Serial sends the bits one after another down one wire, so they cannot become skewed [1]

This makes errors less likely and the speed is adequate for printing [1]

Half-duplex lets data go in both directions [1]

so the printer can send error messages or notifications back to the computer [1]

Other accepted choices: parallel (faster, many bits at once, little skewing over a short distance) or full-duplex, or simplex (data only needs to go one way). Your explanation must match the method you chose.

(c)(iii)

Describe the even parity check:

A parity bit is added to each byte [1]

to make the number of 1s even (the bit is 1 if the 1s are odd, 0 if even) [1]

After transmission the number of 1s in each byte is counted [1]

If any byte has an odd number of 1s, an error is detected [1]

KEY IDEAKnow the high-level versus low-level language trade-offs, compiler versus interpreter, serial versus parallel, and how parity works.
TOTAL 22 marks

Official mark scheme

Mark scheme for 2210/12/M/J/25 question 3
VIDEO
▶ Whole paper

Video solution of the whole paper · by Virtual Help. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.