Menu

Edexcel GCSE Computer Science (1CP2) Exam Questions

Build a practice paper from 600 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
1Describe2 marksUtility Software Swap Remove

A hard disk can become fragmented as files are saved and deleted.

Describe how disk defragmentation software improves the performance of a hard disk.

[2 marks]
Mark scheme

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

  • Parts of a file are moved so they are stored together/in consecutive locations (1) so the read/write head has less distance to travel to read the file (1)
  • Files are rearranged so that each file is stored in one block (1) which reduces the time taken to open/load the file (1)
  • Free space on the disk is collected into one area (1) so new files can be saved without becoming fragmented (1)
  • The parts of each fragmented file are put in order (1) so fewer movements of the read/write head are needed to read it (1)

Do not accept responses about compressing files, deleting files or increasing the amount of storage, as these are not what defragmentation software does.

Do not accept 'it makes the disk faster' without saying how the files are changed.

Example answers and how they were marked
Full marks2/2

It moves the parts of a file so they are stored together in consecutive locations (1), so the read/write head does not have to move as far and the file opens more quickly (1).

Why: Linked point (1) and development (1): the file parts are stored together, which reduces read/write head movement.

Some marks1/2

It reorganises the files on the hard disk so that they are stored together.

Why: The point is made (1) but there is no development saying how this improves performance, so the second mark is not awarded.

No marks0/2

It compresses the files so that they take up less space on the disk.

Why: This describes data compression software, which the mark scheme says is not accepted; no creditworthy point is made.

2Describe2 marksLow and High Level Languages Swap Remove

A programmer has written a program in assembly language.

Describe why it is necessary to translate the program into machine code before it can be run.

[2 marks]
Mark scheme

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

  • The processor/CPU can only execute machine code/binary instructions (1) so the assembly instructions must be converted into machine code before the program can run (1)
  • Each assembly instruction/mnemonic matches/corresponds to one machine code instruction (1) so each line must be replaced with the machine code the processor executes (1)
  • The program is written using mnemonics (1) that must be translated into machine code for the processor to carry out the instructions (1)
  • The hardware/processor does not understand assembly language directly (1) so it must be translated into machine code that the processor can execute (1)

Do not accept 'assembly language is a low-level language'.

Do not accept 'it is hard to understand' or 'it is not English'.

Do not accept benefits, such as 'machine code runs faster' or 'the program will run more quickly'.

Do not accept 'an assembler/a translator converts it' on its own, with no reference to the processor only being able to execute machine code/binary.

Do not accept responses about high-level languages or about compilers/interpreters.

Example answers and how they were marked
Full marks2/2

The processor can only execute machine code, so the assembly instructions must be converted into machine code before the program can run.

Why: States what the processor can execute (1) and links it to converting the program's instructions into machine code (1).

Some marks1/2

Each assembly instruction matches one machine code instruction.

Why: Correct point about the one-to-one match (1) but no development saying that this is because the processor only executes machine code.

No marks0/2

Because an assembler translates assembly language into machine code.

Why: Names the translator but gives no reason tied to the processor only being able to execute machine code, so no mark; this is in the 'Do not accept' guidance.

3Calculate2 marksBinary Shifts Swap Remove

Computers manipulate binary patterns.

Complete the table with the result of applying the shift to the binary pattern.

[2 marks]
Binary patternShift8-bit binary result
1000 0001Logical shift right by 1
Mark scheme

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

  • 0100 (1)
  • 0000 (1)

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

Example answers and how they were marked
Full marks2/2

0100 0000

Why: Every bit moves 1 place right, with 0s in from the left: both nibbles are correct (2).

Some marks1/2

0100 0001

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

No marks0/2

0000 0010

Why: Shifts the bits the wrong way. 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.