Menu

Edexcel GCSE Computer Science (1CP2) Exam Questions

Build a practice paper from 604 exam-style questions, each with its mark scheme and example answers. Print it, or answer it on paper and then open the mark schemes. Or browse the questions by topic.

Build a paper

Topics (none ticked: all of them)
Question types (none ticked: all of them)

Practice paper

4 questions · 12 marks

Pick again
Print
1Short recall2 marksUnits & Conversion Swap Remove

Data storage is measured in binary multiples.

Define the term bit.

[2 marks]
Mark scheme

Award one mark for any of the following up to a maximum of two marks:

  • A binary digit (1)
  • Has the value 0 or 1 (1)
  • The smallest unit of data storage (1)
  • A single 0 or 1 (1)

Allow binary digit/binary place value for binary digit

Allow a single binary digit for a single 0 or 1

Do not accept a group of 8 bits/half a nibble of 4 bits, which describe a byte or a nibble

Do not accept a binary number/binary on its own

Example answers and how they were marked
Full marks2/2

A binary digit that can have the value 0 or 1.

Why: A binary digit (1) and has the value 0 or 1 (1).

Some marks1/2

It is the smallest unit of data storage.

Why: Smallest unit of data storage (1), but does not state that it is a binary digit or that it has the value 0 or 1.

No marks0/2

A group of 8 bits.

Why: Describes a byte, not a bit; no creditworthy point and named in the Do not accept line.

2Describe2 marksTranslators Swap Remove

High-level code can be translated by a compiler or by an interpreter.

Describe how a compiler translates high-level code differently from an interpreter.

[2 marks]
Mark scheme

Award up to two marks for a linked description such as:

  • The compiler translates the whole program/complete source code in one go (1) whereas the interpreter translates one line/statement at a time (1)
  • The compiler translates all of the source code before any of it is run/executed (1) but the interpreter translates each line/statement as it reads it (1)
  • The interpreter translates one line/statement at a time (1) and the compiler translates the whole program/source code together (1)

Accept the compiler point and the interpreter point in either order.

Do not accept responses about object code/executable files, when the translated code is executed, how errors are reported, or speed/memory use.

Do not accept 'the interpreter executes/runs each line' on its own, without saying that it translates one line/statement at a time.

Example answers and how they were marked
Full marks2/2

A compiler translates the whole program in one go, while an interpreter translates one line at a time.

Why: Whole program translated in one go (1) and interpreter translates one line at a time (1).

Some marks1/2

A compiler translates the whole program in one go.

Why: Whole program translated in one go (1); no linked point about the interpreter translating a line at a time.

No marks0/2

A compiler produces an executable file, but an interpreter does not.

Why: Describes the output, not the amount translated at a time; object code/executable files are not accepted.

3Calculate2 marksAdding Binary Numbers Swap Remove

Binary patterns can represent numbers.

Complete the table to show the result of the 8-bit binary addition.

[2 marks]
1286432168421
10010110
01011100
Mark scheme

Award one mark for each correct nibble in the correct order:

  • 1111 (1)
  • 0010 (1)

0 marks if the response is not 8-bit binary.

Example answers and how they were marked
Full marks2/2

1111 0010

Why: 150 + 92 = 242, carrying where a column adds to 2: both nibbles are correct (2).

Some marks1/2

1111 0011

Why: A slip in the last bit. The first nibble is correct (1); the second is not.

No marks0/2

1101 1110

Why: Writes 1 in every column with a 1 and never carries. Neither nibble is correct.

4Discuss6 marksTranslators Swap Remove

A company writes a photo editing program in a high-level language. The company will sell the finished program to customers. Each customer will install the program on their own computer and run it many times.

Discuss whether the company should use a compiler or an interpreter to translate the program before it is sold.

Your answer should include:

  • the output of each type of translator
  • whether the program has to be translated each time it is run
  • what the customer needs on their computer to run the program.
[6 marks]
Mark scheme

Indicative content

The output of each type of translator

  • A compiler translates the whole program in one go and produces object code.
  • The object code is saved as an executable file, which is already in machine code so the processor can run it directly.
  • An interpreter does not produce object code, so no translated file exists for the company to save and sell.
  • An interpreter translates one line at a time and executes it immediately, but that translation is not kept.

Whether the program has to be translated each time it is run

  • Compiled code is translated once, so the executable can be run as many times as the customer likes without being translated again.
  • If the source code is edited, the whole program has to be compiled again to produce a new executable.
  • An interpreted program is translated again every time it is run, so a customer who runs the program often waits for translation at every run.
  • An executable runs faster than interpreted code because it is already in machine code.

What the customer needs on their computer to run the program

  • A customer who installs the executable needs no compiler on their computer, so the program will run straight away.
  • If the company supplied the source code instead, the customer would need an interpreter installed, and it would have to be an interpreter for their type of computer.
  • A customer given only the executable does not have the source code, so cannot change the program.

Conclusion

  • A compiler is the better choice for this company, because the executable can be sold and the customer runs it without it being translated again and without being given the source code.
  • Using an interpreter would mean supplying the source code to customers and translating the program on every run.

Levels

  • Level 0 (0 marks): No rewardable content.
  • Level 1 (1–2 marks): Basic, independent points are made, showing elements of understanding of key concepts/principles of computer science. (AO1) The discussion will contain basic information with little linkage between points made or application to the context. (AO2)
  • Level 2 (3–4 marks): Demonstrates adequate understanding of key concepts/principles of computer science. (AO1) The discussion shows some linkages and lines of reasoning with some structure and application to the context. (AO2)
  • Level 3 (5–6 marks): Demonstrates comprehensive understanding of key concepts/principles of computer science to support the discussion being presented. (AO1) The discussion is well developed, with sustained lines of reasoning that are coherent and logically structured, and which clearly apply to the context. (AO2)

Level 3 responses must cover all three bullets for this company's program, including translating once rather than on every run, and reach a conclusion.

Do not accept 'a compiler fixes errors' (a compiler reports syntax errors at the end of translation, it does not fix them) or 'a compiler is easier to use' with no link to output, translation or the customer. Do not accept answers about translating to assembly language.

Example answers and how they were marked
Full marks6/6

The company should use a compiler. A compiler translates the whole program in one go and produces object code, which is saved as an executable file. This executable is already in machine code, so the customer's processor can run it directly. The program is translated only once, so a customer who runs the program many times does not wait for it to be translated again, and it runs faster than interpreted code would. An interpreter produces no object code, so the company would have nothing to sell as an executable. The customer would have to be given the source code and would need an interpreter installed on their computer, and the program would be translated again every time it was run.

Why: Level 3. Covers the output of both translators (executable from the compiler, no object code from the interpreter), the effect of translating once rather than on every run, and what the customer needs on their computer, all applied to the company selling the program, with a clear conclusion.

Some marks3/6

A compiler produces an executable file, which the company can save and sell to its customers. An interpreter does not produce an executable file, so the customer would need the source code and an interpreter installed on their computer to run the program. This means a compiler is better for the company, because customers can just run the file they are given.

Why: Level 2. Gives the output of both translators and links this to what the customer needs, with a conclusion, but never says the compiled program is translated once while an interpreted one is translated on every run, so the reasoning is not developed enough for Level 3.

No marks0/6

The company should use a compiler because it is easier to write programs with a compiler and it fixes the errors in the program before the customers get it.

Why: Level 0. No creditworthy point: 'easier to write programs' is not linked to the output, the translation each run or the customer, and 'fixes the errors' is a misconception, as the mark scheme's guidance says a compiler only reports errors at the end of translation.

Questions by topic

More ways to revise Edexcel GCSE Computer Science (1CP2)

Teachers: build a paper, print it with the mark schemes at the end, and sign your school up to set your classes activities on every topic.

Fetch Decode Explain isn't affiliated with or endorsed by Pearson Edexcel.