| Download the amazing global Makindo app: Android | Apple | |
|---|---|
| MEDICAL DISCLAIMER: Educational use only. Not for diagnosis or management. See below for full disclaimer. |
This is a textbook-style revision and learning resource for OCR GCSE Computer Science (J277). It explains the ideas properly (not just bullet points), includes worked examples, common mistakes, and OCR exam-style practice. Use it as a course book: read, annotate, then do the questions.
The Central Processing Unit (CPU) is the part of a computer that processes instructions and controls most of what the system does. Whenever you run a program (a game, a web browser, or background operating system tasks), it is converted into a sequence of instructions that the CPU can understand. The CPU follows a repeating process: it fetches the next instruction from memory, decodes what it means, and executes it. This continuous fetchโdecodeโexecute cycle is the foundation of how computers run software.
At GCSE level, it is essential to understand that the CPU does not โthinkโ โ it follows rules. The instructions are stored in memory in a pattern of bits, and the CPU interprets them as operations like โloadโ, โstoreโ, โaddโ, โcompareโ, and โjumpโ.
Most computers follow the Von Neumann architecture. The central idea is simple but powerful: program instructions and data are stored in the same memory. This means:
A common exam phrase is โstored program conceptโ. If asked what this means, say: instructions are stored in memory and fetched for execution.
The Control Unit manages the execution of instructions. It sends signals around the CPU and to other hardware to coordinate tasks. Think of it as a โtraffic controllerโ: it decides what happens next, when memory is read, when registers update, and when data is moved.
The ALU performs calculations and logical decisions. It handles arithmetic (addition, subtraction) and logic (AND, OR, NOT, comparisons). When you do a calculation in a program, the ALU is involved.
Registers are very small storage locations inside the CPU. They are much faster than RAM. OCR exam questions love registers because they show you understand how data moves during the fetchโdecodeโexecute cycle.
Common mistake: students say MAR โstores dataโ. MAR stores an address. MDR stores the data.
The CPU processes instructions in a repeated cycle. OCR expects you to describe this clearly using the registers. A high-mark answer includes the register names and what is transferred.
Imagine the next instruction is โADD 7 to accumulatorโ. The CPU fetches the instruction, decodes that it is an ADD, then executes it by sending the values to the ALU. The result goes back into the accumulator.
Clock speed is measured in Hertz (Hz). A faster clock speed means more cycles per second. However, clock speed alone is not everything because some CPUs do more work per cycle than others.
A CPU has multiple cores on it. CPUs with multiple cores have more power to run multiple programs at the same time. A core is like an independent processing unit inside the CPU. Multi-core CPUs can do tasks in parallel. This improves performance when software is designed to split work (e.g., gaming, video editing). However, doubling cores does not double clock speed as the processing cannot always be easily divided between cores so there is some inefficiency. Some headroom is needed to communicate between each core.
Cache is small, very fast memory but expensive and is used to store frequently accessed instructions/data. If the CPU can get what it needs from cache instead of RAM, performance improves because RAM is slower. Transferring data in and out of memory takes much, much longer than from cache. Therefore, placing frequently accessed data in the cache results in everything using that function (such as square roots) being executed much faster. The more cache there is, the more data can be stored closer to the CPU. CPU cache is โgradedโ at different levels depending on its speed. L1 is usually part of the CPU chip and is both the smallest and the fastest to access. Its size is often restricted to between 8 KB and 64 KB. L2 and L3 caches are bigger than L1. They are extra caches built between the CPU and the RAM. Sometimes L2 is built into the CPU with L1. L2 and L3 caches take slightly longer to access than L1. Each CPU core has its own set of L1 cache, but they can share higher levels. Cache is very expensive and is limited by the space of the CPU die, and is very small, so cannot be a full replacement for memory.
Primary storage consists of RAM (random access memory) and ROM (read-only memory). ROM is non-volatile (retains its data after being powered off) and is now often only used to boot the computer, providing the BIOS or UEFI start-up instructions. Memory/RAM is small in size compared to secondary storage, but is much faster as it does not have moving parts or have to retain that much information. It is usually from 4-32GB in size and is constantly growing (My first computer it was 1 Lb then eventually 4 MB and now 16GB). The more RAM a computer has, the more programs and instructions it can store simultaneously.
RAM is volatile, meaning it loses its contents when power is turned off. RAM stores the programs and data currently in use. If you open a game, it loads into RAM so the CPU can access it quickly.
โRandom accessโ means the CPU can access any memory location directly without reading earlier ones first.
ROM is non-volatile. It stores the boot program (firmware) that starts the computer. When you power on a machine, it uses ROM instructions to check hardware and begin loading the operating system.
Cache stores frequently used data/instructions close to the CPU. It reduces the time the CPU waits for RAM. Cache memory is incredibly fast but relatively expensive RAM located within the CPU itself, used for very common operations and calculations that may need to be immediately reused. There are typically 3 levels of cache - L1, L2 and L3 - which go down (starting from L1) in cost and speed, but up in capacity. As it is located on the CPU itself, itโs much faster than having to go to RAM all the time.
Virtual memory is a technique that uses secondary storage (like an SSD/HDD) to act like extra RAM when there is overflow from available RAM. If RAM is full, the operating system moves โpagesโ of data that are not currently needed to disk. When RAM is full, data which would have gone to memory instead goes to an area of the disk drive and, when needed by the CPU, is moved back into RAM. However, virtual memory is much slower than primary storage media, even if it uses the fastest SSDs, let alone HDDs with their moving parts, so the OS always attempts to avoid placing highly-used programs in virtual memory. More RAM = always better. Apart from its costs.
Secondary storage is non-volatile and so stores the data when the computer is off and is used for long-term storage of files and programs. OCR expects you to compare different storage types. An HDD (magnetic) has very high capacity and involves flipping magnetic polarity to store bits. It is slow to access as there are moving parts such as the read and write head. These are generally the cheapest form of bulk storage but have moving parts, so not good for portability. An SSD (solid state) has high capacity and involves trapping electrons to store bits. They are extremely fast to access, but significantly more expensive than HDDs. As solid state media has no moving parts, they are faster and much more portable than hard drives. A USB drive (also solid state) is tiny in comparison but very portable so is useful for transferring files between people and their computers. Optical storage devices like CDs and DVDs use a laser to scan the tracks, and when light reflects back, it will either reflect from โlandsโ - representing 1, or not reflect in โpitsโ - representing 0. Speeds and capacity are generally worse than HDDs or SSDs, but they are cheap to produce. Embedded systems may not need these as the instructions to run them are usually in ROM. For example, a watch does not need to edit the time as it runs all the time.
| Storage | How it works | Speed | Cost per GB | Durability | Typical Use |
|---|---|---|---|---|---|
| HDD | Magnetic spinning platters + read/write head | Medium/slow | Low | Can be damaged by knocks | Large file storage, budget PCs |
| SSD | Flash memory (no moving parts) | Fast | Higher | More shock-resistant | Laptops, fast boot drives |
| Optical (CD/DVD/Blu-ray) | Laser reads pits/lands | Slow | Low | Scratches easily | Media distribution, backups |
| Magnetic Tape | Magnetic strip, sequential access | Very slow access | Very low | Good for long-term storage | Backups, archives |
Exam trap: Tape is cheap and good for backups, but it is sequential access so retrieving a specific file is slow.
Computers use binary because electronic circuits can be reliably in two states: on/off, high/low voltage. A bit is a single binary digit. A byte is 8 bits. Larger units:
Use place values: 128 64 32 16 8 4 2 1 (for 8 bits).
156 = 128 + 16 + 8 + 4
So bits: 128(1) 64(0) 32(0) 16(1) 8(1) 4(1) 2(0) 1(0)
156 = 10011100
Rules:
1011 + 1101 =11000
If your system only stores 4 bits, the result would overflow (because 11000 needs 5 bits). OCR expects you to state that overflow means the value is too large to store in the available bits, causing incorrect results.
Hex is used as a shorthand for binary. One hex digit represents 4 bits (a nibble).
| Hex | Binary |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A | 1010 |
| B | 1011 |
| C | 1100 |
| D | 1101 |
| E | 1110 |
| F | 1111 |
OCR skill: converting large binary values into hex by grouping into 4s from the right.
Characters are stored as numeric codes. ASCII originally used 7 bits (128 symbols). Extended ASCII uses 8 bits (256). Unicode is much larger and includes symbols from most writing systems and many emojis.
Exam tip: Unicode uses more bits, so text files can become larger, but it supports more languages.
A bitmap image is made of pixels. Each pixel stores a colour value. Colour depth is how many bits are used per pixel.
File size (uncompressed) = width ร height ร colour depth รท 8
A 1920 ร 1080 image at 24-bit colour:
1920 ร 1080 = 2,073,600 pixels
2,073,600 ร 24 = 49,766,400 bits
49,766,400 รท 8 = 6,220,800 bytes โ 5.93 MB
Sound is sampled at intervals. Each sample is stored using a number of bits. Stereo uses 2 channels.
File size = sample rate ร bit depth ร channels ร duration
44,100 Hz ร 16 bits ร 2 ร 60 seconds = 84,672,000 bits
รท 8 = 10,584,000 bytes โ 10.1 MB per minute
Lossless compression reduces file size without losing any data. When decompressed, the original file is perfectly restored. This is vital for documents, program files, medical images, and anything where accuracy matters.
RLE compresses repeated data by storing the value and the number of repeats. Example: AAAAABBBCC โ (A,5)(B,3)(C,2)
Lossy compression permanently removes some data that humans are less likely to notice. It achieves much smaller file sizes, which is useful for streaming music and sharing photos quickly.
Explain how the fetchโdecodeโexecute cycle works, including the role of registers. (6)
A computer network is two or more devices connected so they can share data and resources. Networks exist because sharing is efficient: schools share printers, businesses share files and databases, and the internet lets people communicate globally. In OCR questions, always include both data sharing (files, messages) and resource sharing (printers, storage, internet connection).
A LAN covers a small area, such as a school, home, or office building. It is usually owned and managed by one organisation. LANs are typically fast (high bandwidth) and more secure because the organisation controls the devices.
A WAN covers a large geographical area. The internet is the biggest WAN. WANs rely on third-party infrastructure (telecom companies, ISPs), so they can be slower and have higher latency than LANs.
Exam tip: LAN = local + privately managed. WAN = wide + uses external networks/ISPs.
Ethernet uses cables (usually copper or fibre) to connect devices. Wired connections are typically faster and more reliable than Wi-Fi because they are less affected by interference. Fibre is especially fast and suitable for long distances because it transmits using light.
Wi-Fi connects devices using radio waves. Its key advantage is mobility and convenience, but performance can drop with distance, walls, and interference (e.g., many devices in one area). Security is also a concern because signals can be intercepted if not encrypted.
A router connects networks together. In homes, the router connects your LAN to the internet (WAN). Routers use IP addresses to send data to the correct network/device. Many home routers also provide Wi-Fi.
A switch connects devices within a LAN. It sends data only to the intended device using MAC addresses, which reduces traffic compared with older hub devices.
A WAP allows wireless devices to connect to a wired LAN. In schools you may have multiple WAPs so coverage is strong.
A NIC provides the physical connection to a network. It has a unique MAC address. A device may have Wi-Fi NIC, Ethernet NIC, or both.
A modem converts digital data from your network into a signal suitable for transmission over telephone lines, cable systems, or fibre networks (depending on the service). The word comes from modulator/demodulator.
In a star network, all devices connect to a central switch or hub. This is the most common modern LAN layout.
In a bus network, devices share a single backbone cable. It is rare today but still used in exam questions.
In a mesh network, devices are connected to many others. Full mesh connects every device to every other device.
OCR exam technique: For 4โ6 markers, compare using the words cost, reliability, ease of maintenance, performance.
A protocol is an agreed set of rules for communication. Without protocols, devices would not know how to format messages, how to address them, or how to check for errors. Protocols allow different manufacturersโ devices to communicate successfully.
TCP is reliable: it uses acknowledgements and retransmission, so data arrives in the correct order. This is important for web pages, emails, and file transfers. UDP is faster but not guaranteed: it sends data without checking delivery, so it is used for live streaming and online gaming where speed matters more than perfect accuracy.
A MAC address is a unique identifier set on a NIC. It is used inside a LAN to deliver frames to the correct device. MAC addresses are usually fixed (though can be spoofed).
An IP address identifies a device on a network and helps data reach the correct destination across networks. IPv4 is written as four numbers 0โ255 (e.g., 192.168.1.10). IPv6 is longer and created to solve IPv4 exhaustion.
Security protects systems and data from damage, theft, or misuse. OCR questions often target the CIA triad: Confidentiality (only authorised people can access data), Integrity (data is accurate and not altered improperly), and Availability (systems are accessible when needed).
Malware is malicious software designed to harm systems or steal data. Types include:
Phishing uses fake emails/messages to trick users into giving passwords or clicking malicious links. Social engineering is the broader term: manipulating people rather than hacking technology. Examples include pretexting (โIโm IT supportโ), baiting (infected USB), and tailgating (following into a secure building).
A brute-force attack tries many passwords until one works. Weak passwords are vulnerable, especially if there is no account lockout.
SQL injection occurs when a system inserts user input directly into a database query without sanitising it. Attackers can manipulate queries to access or delete data. OCR may ask you to explain how validation and sanitisation reduce this risk.
A DoS attack overwhelms a system with traffic so it cannot respond to real users. A DDoS uses many devices (often a botnet) to make the attack more powerful.
Encryption scrambles data so only someone with the key can read it. It protects confidentiality. HTTPS uses encryption so data sent to websites cannot easily be intercepted.
A firewall monitors incoming/outgoing traffic and blocks suspicious connections based on rules. It can be hardware (network firewall) or software (on a device).
Pen testers (ethical hackers) attempt to find vulnerabilities before criminals do. Results are used to improve security.
Updates patch vulnerabilities. Unpatched systems are a common reason attacks succeed.
An operating system (OS) is system software that manages hardware and provides services for applications. Without an OS, users would have to control hardware directly, which is complex. The OS acts as an interface between user, applications, and hardware.
The OS allocates RAM to programs. It keeps track of which memory locations are free or in use. With virtual memory, it also manages paging.
The OS manages running programs (processes). It schedules CPU time so multiple programs appear to run at once. This is done using rapid switching (context switching).
The OS uses device drivers to communicate with peripherals like printers, keyboards, and screens. Drivers translate OS commands into signals the device understands.
The OS organises files into folders/directories, tracks file locations, manages permissions, and handles storage devices.
The OS provides a GUI (windows, icons, menus) or a CLI (typed commands). CLI can be faster for experts and uses less memory.
The OS manages user accounts, permissions, and access control to protect data and prevent unauthorised use.
Utility software maintains and optimises a computer system. OCR questions often ask for examples and purposes:
Technology affects society. OCR rewards balanced answers: you must usually describe both benefits and drawbacks. High-mark responses use structure (PEEL) and apply to a scenario (e.g., facial recognition in schools, data collection by apps).
These laws protect personal data. Organisations must collect data fairly, store it securely, and use it for stated purposes. People have rights such as access to their data and asking for correction. Data breaches can lead to fines and reputational damage.
This law covers hacking and unauthorised access. It includes:
Protects creators. Illegal downloading and copying software/music without permission is copyright infringement.
An algorithm is a step-by-step method for solving a problem. A good algorithm is clear, correct, and efficient. OCR expects you to understand algorithms in pseudocode and be able to trace them.
Breaking a big problem into smaller manageable parts (subtasks). In programming this often becomes functions/subprograms.
Removing unnecessary detail so you focus on what matters. For example, representing a school timetable as a set of lessons rather than the full school.
Spotting similarities with previous problems so you can reuse solutions.
Developing clear steps, testing them, and refining.
Linear search checks each item one by one until it finds a match or reaches the end. It works on any list (sorted or unsorted) but can be slow for large lists.
Binary search repeatedly halves the search space. It is much faster but requires the list to be sorted.
Common OCR mark: โBinary search needs sorted data, otherwise it may miss the target.โ
Bubble sort compares adjacent items and swaps them if they are in the wrong order. It repeats passes until the list is sorted. It is easy to understand but inefficient for large lists (O(nยฒ)).
Insertion sort builds a sorted portion gradually. Each new element is inserted into its correct position. It is fast when data is nearly sorted.
Merge sort splits the list into halves until single elements remain, then merges them back in sorted order. It is efficient for large lists (O(n log n)).
Efficiency is about time and resources. OCR expects you to compare algorithms using ideas like โnumber of comparisonsโ and how performance changes as data size grows.
Instructions executed in order.
Choosing between paths using IF statements.
Repeating a section of code using loops (FOR, WHILE).
A variable stores a value that can change. Data types include integer, real/float, Boolean, character, string. Using correct types reduces errors and improves clarity.
Strings are sequences of characters. Common operations include length, slicing, concatenation, and searching.
name = "Alice Smith"
print(len(name)) # 11
print(name[0:5]) # Alice
print("Smith" in name) # True
An array stores multiple values under one name. A 2D array is a table (rows and columns). OCR sometimes uses 2D arrays for game boards or seating plans.
board = [
["X","O"," "],
[" ","X","O"],
["O"," ","X"]
]
print(board[1][1]) # X
Subprograms help manage complexity. They reduce repetition and improve maintainability. A function returns a value; a procedure does not.
SQL is used to query databases. OCR expects you to read and write simple SELECT statements with WHERE and ORDER BY.
SELECT name, age
FROM students
WHERE age > 16
ORDER BY name;
Programs fail due to user input, unexpected conditions, and programmer mistakes. Robust programs are designed to handle errors safely rather than crashing or producing incorrect results.
Breaking language rules (missing colon, wrong indentation). Program will not run.
Errors during execution (division by zero, file not found). Program stops unless handled.
Program runs but gives wrong output because the algorithm is incorrect.
Checking a user is who they claim to be (passwords, biometrics, 2FA).
Boolean values are True or False. They are used in conditions and logic circuits.
A truth table lists every possible input combination and the output. For two inputs A and B, there are 4 combinations: 00, 01, 10, 11.
XOR outputs True only when inputs are different.
Binary instructions executed directly by the CPU. Fast but difficult for humans.
Low-level language using mnemonics. Needs an assembler. Easier than machine code but still hardware-specific.
Closer to English and portable. Examples: Python, Java, C#. Need translators to run.
Translates the entire program into machine code before running. Produces an executable. Errors shown after compilation. Often faster at runtime.
Translates and runs line-by-line. Errors appear as soon as the faulty line is reached. Often easier for debugging.
Translates assembly language into machine code.
A school wants to replace desktop computers with tablets for all students. Evaluate this decision. Your answer should include technical, security, cost, and environmental points. (8)
Done. You now have the remaining chapters in full textbook style for OCR J277.