OCR GCSE Computer Science sample questions and answers (J277)
Guide overview All 11 topics Sample questions Papers and weighting Look inside Questions and answers
53 sample questions and answers
Taken from every topic of OCR GCSE Computer Science, specification J277. The full guide has 740.
J277/01
Systems Architecture
46 questions in the guide, across 3 subtopics. More from this topic
-
CPU components and the fetch-execute cycle
What is the role of the Control Unit?
Show the answer
The Control Unit decodes instructions and sends control signals to coordinate the other parts of the CPU. The CU also controls the flow of data between the CPU and memory. -
CPU components and the fetch-execute cycle
What does the Memory Data Register (MDR) store?
Show the answer
The MDR holds the data or instruction that has just been read from memory. The MDR also holds data that is waiting to be written to memory. -
Factors affecting CPU performance
What is overclocking?
Show the answer
Overclocking is running a CPU at a higher clock speed than its manufacturer set. The extra heat can cause crashes or shorten the life of the processor. -
Factors affecting CPU performance
How does having more cores improve performance?
Show the answer
A multi-core CPU can process several instructions at the same time, one on each core. Several programs, or several parts of one program, can then run simultaneously. -
Embedded systems
Why must many embedded systems be highly reliable?
Show the answer
Many embedded systems run for years without being restarted or maintained. Some control safety-critical equipment, such as car brakes or pacemakers, where a failure could cause harm.
J277/01
Memory and Storage
143 questions in the guide, across 9 subtopics. More from this topic
-
RAM, ROM, cache and virtual memory
What does it mean to say that RAM is volatile?
Show the answer
Volatile memory loses its contents when the power is switched off. RAM needs a constant power supply to keep its data. -
Secondary storage: magnetic, optical and solid state
What do capacity, speed and portability mean when comparing storage devices?
Show the answer
Capacity is how much data a device can hold. Speed is how quickly data can be read and written. Portability is how easy a device is to carry around. -
Data units and storage capacity calculations
Is a kilobyte 1,000 bytes or 1,024 bytes?
Show the answer
A kilobyte is 1,000 bytes, using the standard metric prefix. A value of 1,024 bytes is also widely used and accepted, because 1,024 is 2¹⁰. -
Binary, denary and hexadecimal conversions
Convert the binary number 01001101 to denary.
Show the answer
The denary value is 77. The column values are 64 + 8 + 4 + 1 = 77. -
Binary addition, overflow and binary shifts
How can you tell that an 8-bit binary addition has overflowed?
Show the answer
A 1 is carried out of the most significant bit column. The true total is then larger than 255.
J277/01
Computer Networks, Connections and Protocols
99 questions in the guide, across 6 subtopics. More from this topic
-
LANs, WANs and network performance
Why would a bank with branches all over the country use a WAN?
Show the answer
A WAN links every branch to the bank's central systems. Staff in any branch can then reach the same customer records and accounts. -
LANs, WANs and network performance
How can distance from a wireless access point affect a device's connection?
Show the answer
A wireless signal weakens with distance and when it passes through walls. A weaker signal lowers the data rate and causes more data to be resent. -
Client-server and peer-to-peer networks
Apart from web and file servers, name two types of server and what each provides.
Show the answer
A print server manages a queue of jobs sent to shared printers. A mail server stores, sends and receives email for its users. -
Client-server and peer-to-peer networks
Give two disadvantages of a peer-to-peer network.
Show the answer
Files are spread across many machines, so backups and security are hard to manage. A file becomes unavailable when the computer holding it is switched off. -
Network hardware, DNS, hosting and the cloud
What is a wireless access point (WAP)?
Show the answer
A wireless access point lets wireless devices join a wired network. A WAP sends and receives radio signals and passes the data on to the wired network.
J277/01
Network Security
51 questions in the guide, across 3 subtopics. More from this topic
-
Malware, social engineering and brute-force attacks
What is spyware, and what is its purpose?
Show the answer
Spyware secretly monitors what a user does on their computer. A keylogger is spyware that records keystrokes to capture passwords and card numbers. -
Malware, social engineering and brute-force attacks
Give two signs that an email may be a phishing attempt.
Show the answer
A phishing email often uses a generic greeting and urges the reader to act immediately. The sender's address or the link may not match the real organisation's website. -
Denial of service, data interception and SQL injection
What is data interception?
Show the answer
Data interception is capturing data as it travels across a network. The attacker copies the data without the sender or receiver knowing. -
Denial of service, data interception and SQL injection
What is SQL injection?
Show the answer
SQL injection is an attack where SQL code is typed into an input box on a website or app. The system then runs that code against its database. -
Identifying and preventing vulnerabilities
What attacks can a firewall help to limit?
Show the answer
A firewall helps block hackers trying to reach the network from outside. A firewall can also stop some malware sending data out and filter traffic from a denial of service attack.
J277/01
Systems Software
45 questions in the guide, across 3 subtopics. More from this topic
-
User interfaces, memory management and multitasking
Why might an experienced technician prefer a command-line interface to a GUI?
Show the answer
Typed commands can be quicker for someone who knows them, and they can be combined into scripts to automate tasks. A command-line interface also uses far less memory and processing power. -
User interfaces, memory management and multitasking
Why must the operating system allocate memory to applications?
Show the answer
Each running program needs its own area of RAM for its instructions and data. The OS keeps these areas separate so one program cannot overwrite another's data. -
Peripheral, user and file management
How does the operating system stop a slow printer from holding up the CPU?
Show the answer
The OS stores the document in a buffer, an area of memory that feeds data to the printer. The CPU carries on with other work while the printer takes the data at its own speed. -
Peripheral, user and file management
What does the file management function of an operating system do?
Show the answer
The OS organises files into a hierarchy of folders, also called directories, on storage devices. Users can create, rename, move and delete files through the OS. -
Utility software
Why would a company install encryption software on its staff laptops?
Show the answer
A lost or stolen laptop could expose all the data stored on it. Full-disk encryption makes that data unreadable to anyone without the key.
J277/01
Ethical, Legal, Cultural and Environmental Impacts of Digital Technology
64 questions in the guide, across 4 subtopics. More from this topic
-
Ethical and cultural issues in digital technology
How can bias in artificial intelligence be an ethical problem?
Show the answer
An AI system learns from past data, and that data may reflect unfair human decisions. The system can then treat some groups unfairly, for example when screening job applications. -
Ethical and cultural issues in digital technology
How can technology help people with disabilities?
Show the answer
Screen readers, voice control and speech-to-text software let people with disabilities use computers and the internet. Well-designed websites work with these tools. -
Environmental impact of digital technology
How can the amount of e-waste be reduced?
Show the answer
Devices can be repaired, reused or passed on instead of thrown away. Old devices should be recycled so their metals can be recovered. -
Environmental impact of digital technology
Why does leaving devices on standby waste energy?
Show the answer
A device on standby still draws a small amount of power. Millions of devices on standby add up to a large waste of electricity. -
Privacy and digital technology
Why do websites ask permission before storing tracking cookies?
Show the answer
UK law requires websites to ask users before storing most non-essential cookies. The user can then choose whether to be tracked.
J277/02
Algorithms
81 questions in the guide, across 5 subtopics. More from this topic
-
Abstraction, decomposition and algorithmic thinking
What can go wrong if abstraction removes too much detail?
Show the answer
A model that ignores an important detail gives inaccurate results. A weather forecast that left out wind speed would make poor predictions. -
Abstraction, decomposition and algorithmic thinking
Why must every step of an algorithm be unambiguous?
Show the answer
A computer follows each instruction exactly and cannot guess what was meant. A vague step could be followed in different ways and give different results. -
Flowcharts, pseudocode and structure diagrams
Define the term pseudocode.
Show the answer
Pseudocode is a way of writing an algorithm in structured, English-like statements. Pseudocode does not follow the strict syntax of any one programming language. -
Flowcharts, pseudocode and structure diagrams
How is a sub program shown in a flowchart?
Show the answer
A sub program is drawn as a rectangle with an extra vertical line down each side. The sub program's own steps can be set out in a separate flowchart. -
Trace tables and correcting algorithms
Which values appear in the total column of a trace table for total = 0, for i = 1 to 3, total = total + i * i, next i?
Show the answer
The total column shows 0, then 1, 5 and 14. Each pass adds the square of i, so the final value of total is 14.
J277/02
Programming Fundamentals
99 questions in the guide, across 6 subtopics. More from this topic
-
Variables, constants, operators and assignment
What is output by x = 4, then x = x + 3, then x = x * 2, then x = x - 5, then print(x)?
Show the answer
The code outputs 9. The value of x goes from 4 to 7, then to 14, then to 9. -
Variables, constants, operators and assignment
How can MOD test whether the number held in n is even?
Show the answer
The test n MOD 2 == 0 is True when n is even. An odd number always leaves a remainder of 1 when divided by 2. -
Sequence, selection and iteration
How many times is Hi printed by for i = 3 to 7, print("Hi"), next i?
Show the answer
The word Hi is printed 5 times. The variable i takes the values 3, 4, 5, 6 and 7, and both ends are included. -
Sequence, selection and iteration
What is output by mark = 65, if mark >= 70 then print("Merit") elseif mark >= 50 then print("Pass") else print("Fail") endif?
Show the answer
The code outputs Pass. The first test, 65 >= 70, is False, so the elseif test 65 >= 50 is checked and is True. -
Data types and casting
Which data type suits the price of a sandwich, such as £3.49?
Show the answer
The price should be stored as a real. The value has a fractional part, so an integer cannot hold it.
J277/02
Producing Robust Programs
48 questions in the guide, across 3 subtopics. More from this topic
-
Defensive design, input validation and authentication
What do a presence check and a length check test?
Show the answer
A presence check makes sure a field has not been left empty. A length check makes sure the input has an allowed number of characters, such as at least 8. -
Defensive design, input validation and authentication
How does verification differ from validation?
Show the answer
Verification checks that data has been entered exactly as intended, such as by typing a new password twice. Validation checks only that data follows the rules. -
Writing maintainable code
What is camel case?
Show the answer
Camel case joins words without spaces and starts each word after the first with a capital letter. Examples are totalPrice and highScore. -
Writing maintainable code
What is a comment?
Show the answer
A comment is a note in the code written for human readers. The translator ignores comments, so they do not change what the program does. -
Testing, errors and test data
What is a logic error?
Show the answer
A logic error lets the program run but makes it give the wrong result. An example is a loop that stops one pass early, so the last item is never processed.
J277/02
Boolean Logic
32 questions in the guide, across 2 subtopics. More from this topic
-
Logic gates and truth tables
What are conjunction, disjunction and negation?
Show the answer
Conjunction is another name for AND, and disjunction is another name for OR. Negation is another name for NOT. -
Logic gates and truth tables
How are the input columns of a three-input truth table filled so that no combination is missed?
Show the answer
The rows count up in binary from 000 to 111. Column A changes every four rows, B every two rows and C every row. -
Combining gates in logic diagrams
What is the output of NOT (A OR B) when A = 0 and B = 0?
Show the answer
The output is 1. A OR B gives 0 because neither input is 1, and NOT 0 gives 1. -
Combining gates in logic diagrams
For P = A AND (B OR C), which rows of the truth table give P = 1?
Show the answer
The rows ABC = 101, 110 and 111 give P = 1. A must be 1 and at least one of B and C must be 1.
J277/02
Programming Languages and Integrated Development Environments
32 questions in the guide, across 2 subtopics. More from this topic
-
High-level and low-level languages and translators
Why can a program written in a high-level language run on different types of processor?
Show the answer
High-level code is not tied to one processor's instruction set. The code can be translated into the machine code of whichever processor will run it. -
High-level and low-level languages and translators
What does an interpreter do?
Show the answer
An interpreter translates and runs a program's source code one line at a time. The interpreter produces no separate executable file, so the code is translated every time it runs. -
The integrated development environment (IDE)
Why does an IDE editor display line numbers?
Show the answer
Line numbers let the programmer find the exact line that an error message refers to. Line numbers also make it easier to discuss code with other programmers. -
The integrated development environment (IDE)
What is a variable watch in an IDE?
Show the answer
A watch window displays the current values of chosen variables while the program runs. The programmer can see the moment a variable takes an unexpected value.
OCR GCSE Computer Science Active Recall Guide
The other 687 questions, with the answers printed after each section.