Please enable JavaScript.
Coggle requires JavaScript to display documents.
computer science studynotes, computer science exam paper 2 - Coggle Diagram
computer science studynotes
how the CPU and RAM work together
For the OCR GCSE Computer Science exam, understanding the intricate relationship between the CPU (Central Processing Unit) and RAM (Random Access Memory) at a high level is crucial for a Grade 9. The interaction is managed through a specific cycle and a system of buses.
Key Concepts
RAM (Primary Memory): This is the computer's short-term, volatile memory. When you open a program, its instructions and associated data are copied from slower secondary storage (like a hard drive or SSD) into the RAM because the CPU can access RAM much faster. Data in RAM is lost when the power is turned off.
CPU (Processor): The "brain" of the computer. Its job is to process data and execute program instructions using the Fetch-Decode-Execute (FDE) cycle.
How They Work Together: The Fetch-Decode-Execute Cycle
The CPU and RAM work in a constant loop, synchronised by the CPU's internal clock:
Fetch: The CPU sends a request along the address bus to the RAM, specifying the memory location (address) of the next instruction or data it needs. The RAM retrieves this data and sends it back to the CPU along the data bus. The CPU temporarily stores this in its internal registers (tiny, super-fast memory stores within the CPU).
Decode: The CPU's Control Unit (CU) then interprets (decodes) the instruction to figure out what needs to be done.
Execute: The CPU performs the instruction. This might involve:
Performing a calculation or logical operation using the Arithmetic Logic Unit (ALU).
Storing a result back into the RAM (via the data bus).
Reading more data from a different memory location in RAM.
This cycle repeats billions of times per second.
The Role of Buses
Communication between the CPU and RAM is facilitated by three key buses on the motherboard:
Address Bus: Carries the memory address of the location the CPU wants to read from or write to. It is unidirectional (CPU to RAM).
Data Bus: Carries the actual data or instruction between the CPU and RAM. It is bidirectional.
Control Bus: Carries control signals (e.g., "read from memory" or "write to memory") between the CPU and other components, coordinating the entire process.
Optimising Performance: Cache
The CPU also uses cache memory, which is a small amount of extremely fast memory located inside the CPU chip.
Function: It stores frequently used instructions and data from RAM.
Benefit: Accessing cache is much faster than accessing the main RAM, preventing the CPU from having to wait as often. A larger cache size generally means better CPU performance because more data can be accessed quickly.
cache memory
Cache Memory: Core Concepts
Definition: Cache memory is a small amount of very high-speed, volatile RAM that is built directly into or very close to the CPU chip.
Purpose: Its primary function is to temporarily store data and instructions that the processor is likely to reuse, allowing for quicker access than fetching them from the main RAM.
Volatile: Like RAM, cache memory is volatile, meaning it loses its contents when the power is turned off.
Speed & Cost: Cache is significantly faster but also much more expensive per byte than standard RAM. This is why it is kept small in size.
How Cache Works: Hits and Misses
The efficiency of the cache relies on the locality of reference (the principle that data used once is likely to be used again soon or data nearby it will be used next).
CPU Request: When the CPU needs data or an instruction, it first checks the cache memory.
Cache Hit: If the data is found in the cache, it is called a cache hit. The CPU accesses the data from the cache very quickly, significantly speeding up processing.
Cache Miss: If the data is not found, it is called a cache miss. The CPU must then retrieve the data from the slower main RAM (or secondary storage). A copy of this data is often then placed into the cache for potential future use.
Levels of Cache Memory (L1, L2, L3)
Modern CPUs use a hierarchy of cache levels to balance speed and capacity:
L1 Cache (Level 1):
Location: Integrated directly into the CPU chip itself.
Characteristics: Smallest in size (e.g., in KB), but the fastest level of cache. It holds the most frequently used instructions and data.
L2 Cache (Level 2):
Location: Can be on the CPU chip (like L1) or on a separate chip with a fast connection to the CPU.
Characteristics: Larger capacity than L1 (e.g., in MB), but slightly slower in speed.
L3 Cache (Level 3):
Location: Typically on the processor chip, but often shared by all CPU cores in multi-core processors.
Characteristics: Largest of the three levels (e.g., 4MB to 8MB), but the slowest of the caches (though still much faster than RAM). It boosts L1 and L2 performance.
Impact on Performance
Speed Enhancement: A larger cache size generally improves CPU performance because more frequently used data can be stored closer to the processor, reducing the need for slower access to main memory (RAM).
Reducing Bottlenecks: Cache helps to bridge the speed gap between the fast CPU and the slower RAM, ensuring the CPU is kept busy and preventing performance bottlenecks.
Hit Rate: The effectiveness of a system's cache is measured by its hit rate (the percentage of times requested data is found in the cache). A higher hit rate means a faster system.
fetch - decode - execute cycle
The Fetch-Decode-Execute (FDE) cycle, also known as the instruction cycle, is the fundamental sequence of operations carried out by the CPU (Central Processing Unit) to process a single instruction from a program.
This cycle is repeated continuously, billions of times per second (dictated by the system clock speed), as long as the computer is running.
The Three Stages of the FDE Cycle
The cycle is comprised of three main stages, facilitated by specific CPU components and memory buses:
Stage 1: Fetch
The CPU retrieves the next program instruction from the main memory (RAM).
Process:
The Program Counter (PC) holds the memory address of the next instruction to be executed.
This address is copied from the PC to the Memory Address Register (MAR), via the address bus (unidirectional).
A signal is sent via the control bus to the RAM to read the data at that specific address.
The instruction stored at that address is then transferred from the RAM to the Memory Data Register (MDR), via the data bus (bidirectional).
The instruction in the MDR is copied to the Current Instruction Register (CIR), where it is held temporarily.
Simultaneously, the Program Counter increments its value to point to the next instruction in sequence.
Stage 2: Decode
The Control Unit (CU) translates the instruction and prepares the CPU components for the next action.
Process:
The Control Unit (CU) examines the instruction in the CIR.
It decodes the instruction into a series of smaller, specific steps the CPU can perform (e.g., "add these two numbers" or "store this data in memory").
The CU prepares the relevant parts of the CPU, such as the Arithmetic Logic Unit (ALU) or the registers, for the operation required by the instruction.
Stage 3: Execute
The actual operation defined by the instruction is carried out.
Process:
The instruction is performed by the relevant part of the CPU (usually the ALU).
This might involve:
Performing a calculation (e.g., addition, subtraction).
Carrying out a logic operation (e.g., comparison, logical AND/OR).
Moving data between a register and main memory (RAM) using the data bus.
Changing the sequence of instructions by altering the Program Counter (e.g., a jump or branch instruction).
The result of the execution is often stored temporarily in registers or committed back to RAM.
register in von Neumann architecture
Key Registers in the Von Neumann Architecture (OCR GCSE)
The OCR GCSE specification requires knowledge of five specific registers and their functions:
Name Acronym Purpose
Program Counter PC Holds the memory address of the next instruction to be fetched from main memory (RAM). It increments by 1 as the FDE cycle runs.
Memory Address Register MAR Holds the address of the memory location that is currently being read from or written to. This address is sent via the address bus.
Memory Data Register MDR A two-way register that holds the actual data or instruction that has been fetched from memory, or data waiting to be stored in memory. This data is sent via the data bus.
Current Instruction Register CIR Holds the instruction that is currently being decoded and executed by the CPU.
Accumulator ACC Stores the results of calculations and logical operations carried out by the Arithmetic Logic Unit (ALU).
Summary of Register Roles in the FDE Cycle
The PC directs the MAR to the correct address in RAM during the Fetch stage.
The MDR temporarily stores the instruction fetched from RAM.
The CIR holds the instruction while it is being Decoded and Executed.
The ACC is heavily used during the Execute stage to store results of calculations.
These registers enable the CPU to manage the flow of data and instructions precisely and at extremely high speeds, making the "stored program concept" of the Von Neumann architecture work efficiently.
comparison of computer specs
Central Processing Unit (CPU)
The CPU is the "brain" of the computer and one of the most critical components for overall performance.
Metric Significance Example for comparison
Cores A core is an individual processing unit within the CPU. More cores allow for better multitasking and faster performance in applications that can use multiple cores, such as video editing or 3D rendering. A 16-core Intel Core i7-13700K will handle complex, multi-threaded tasks better than a 6-core AMD Ryzen 5 7600X.
Clock Speed Measured in gigahertz (GHz), this indicates how many instruction cycles the CPU can perform per second. Higher speeds generally mean better performance for single-threaded tasks, like older video games. The AMD Ryzen 5 9600X has a higher base and boost clock speed than many entry-level CPUs.
Cache Size A small amount of very fast memory built into the CPU. A larger cache can significantly boost performance by storing frequently used data closer to the processor, reducing the time spent accessing slower main memory (RAM). A CPU with a 96MB L3 Cache, like the AMD Ryzen 7 5800X3D, is optimized for gaming performance.
Processor Generation A newer generation of a processor (e.g., Intel 14th Gen or AMD 9000 series) typically offers architectural improvements, better efficiency, and faster performance than its predecessor. An Intel Core i7-14700K offers improvements over the Core i7-13700K, including more E-cores and higher clock speeds.
Benchmark Scores Use benchmark tests from sites like Geekbench or PassMark to get an independent, standardized score of a CPU's performance. A processor with a higher Geekbench score is generally more powerful. As of November 2025, the AMD Ryzen 5 7600X scored higher than some other high-end models.
Random-Access Memory (RAM)
RAM acts as the computer's short-term, working memory. More RAM allows the computer to handle more tasks simultaneously and reduces reliance on slower storage.
Metric Significance Example for comparison
Capacity Measured in gigabytes (GB), this is the amount of data the RAM can hold. Insufficient RAM can cause the system to slow down when multitasking or running memory-intensive programs. For most users, 16GB is sufficient, but 32GB or more is beneficial for high-end gaming, streaming, and creative tasks.
Memory Generation DDR5 is the latest standard for memory, offering higher transfer rates and better efficiency than previous generations like DDR4. A gaming PC with DDR5 RAM, like the PCSPECIALIST Nexa 880, offers a speed advantage over a comparable DDR4 system.
Speed Measured in megahertz (MHz) or megatransfers per second (MT/s), this indicates how fast the RAM can read and write data. Faster speeds can provide a performance boost, especially for gaming and productivity. DDR5-6400 is faster than DDR5-4800, and a speed of 3200MHz to 3600MHz is considered a sweet spot for DDR4 gaming.
Storage Drives (SSD vs. HDD)
Storage determines how fast your computer boots up and how quickly programs and files load.
Metric SSD (Solid-State Drive) HDD (Hard Disk Drive)
Technology Uses flash-based memory with no moving parts. Uses spinning magnetic platters and a mechanical read/write arm.
Speed Much faster read/write speeds, resulting in quicker boot times and faster application loading. Slower due to the mechanical nature of its parts.
Durability More durable and resistant to physical shocks as there are no moving parts. More prone to mechanical failure from drops or bumps.
Capacity & Cost Higher cost per gigabyte and typically available in smaller capacities. Offers larger storage capacities for a lower cost per gigabyte, ideal for mass storage.
Recommendation Ideal for your operating system and frequently used programs to maximize speed and responsiveness. NVMe SSDs are the fastest type, using the PCIe lanes on the motherboard. Suitable for bulk storage of large files that are not accessed frequently, such as photos, videos, and backups.
Graphics Processing Unit (GPU)
The GPU is essential for displaying visual content, especially for gaming, video editing, and 3D rendering.
Metric Significance Example for comparison
GPU Model The GPU model (e.g., NVIDIA GeForce RTX 5070 or AMD Radeon RX 7600) dictates its overall performance, features like ray tracing, and resolution support. An NVIDIA GeForce RTX 5080 in the PCSPECIALIST Nexa 880 will offer superior performance for high-resolution gaming compared to a lower-end model.
VRAM The dedicated memory on the graphics card. More VRAM allows for higher resolutions and more detailed textures in games and creative projects. The MSI GeForce RTX 5070 has 12GB of VRAM, while the Gigabyte Radeon RX 7600 has 8GB.
Ray Tracing A graphics technology that simulates realistic lighting, reflections, and shadows. Supported GPUs (like NVIDIA RTX and AMD Radeon RX) offer enhanced visual experiences in games. The PCSPECIALIST Nexa 880 has a GPU that supports ray tracing for high-quality visuals.
Motherboard
The motherboard connects all the computer's components and determines compatibility and potential for upgrades.
Metric Significance Example for comparison
Socket The CPU socket on the motherboard must match the CPU. A newer socket is required for newer processor generations. An AMD AM5 socket is needed for a Ryzen 7000 series processor, while an Intel LGA 1700 socket is required for a 12th, 13th, or 14th Gen Intel Core processor.
Chipset The chipset determines the features and capabilities of the motherboard, including the number of PCIe slots, RAM slots, and supported technologies like M.2 storage. A high-end chipset (e.g., AMD X670 or Intel Z790) supports overclocking and offers more expansion options.
PCIe Slots Expansion slots used for graphics cards, network cards, and NVMe SSDs. Newer PCIe 5.0 slots offer faster bandwidth than PCIe 4.0 or 3.0. A motherboard with PCIe 5.0 slots can support the fastest NVMe SSDs currently available.
How to use spec sheets for comparison
Identify your needs: Determine what you plan to use the computer for. For gaming, prioritize the GPU, CPU, and fast SSD storage. For general use, prioritize an SSD and sufficient RAM.
Use benchmarks: Look up the CPU and GPU benchmark scores from independent sites like Geekbench or PassMark for an objective performance comparison.
Cross-reference compatibility: Ensure the motherboard's socket and chipset are compatible with your chosen CPU, RAM, and other components.
Prioritize an SSD: Regardless of your use case, opting for an SSD over a traditional HDD is one of the most impactful upgrades you can make for overall system responsiveness.
dual core vs single core
Multitasking
Dual-Core: Far superior for multitasking. It can assign different tasks to each core, like running a background antivirus scan on one core while you edit a document on the other. This provides a smoother experience with less lag.
Single-Core: Less efficient at multitasking. The operating system must use time-slicing to rapidly switch between different tasks, giving each one a small amount of processor time. This makes it appear as though multiple applications are running at once, but only one is actually being processed at any given moment.
Performance
Dual-Core: Provides a significant performance boost for modern applications and operating systems, which are optimized to take advantage of multiple cores. In many cases, a slower dual-core processor can outperform a faster single-core processor because it can process two tasks at once.
Single-Core: Performance is limited by the speed of a single core. If an application is designed to use only one core (single-threaded), a faster single-core CPU might perform better for that specific task, but this is less common with modern software.
Power consumption and heat
Dual-Core: Generally uses more power than a single-core processor because it has two active processing units. This can lead to increased heat generation and, for mobile devices, a shorter battery life.
Single-Core: Consumes less power and produces less heat, making it suitable for simpler, power-efficient devices like microcontrollers.
Cost
Dual-Core: More complex to manufacture, making it more expensive than a comparable single-core processor.
Single-Core: Cheaper to produce, which is why they are still used in embedded systems or other devices where cost is a primary concern.
Application support
Dual-Core: Modern operating systems and most applications, including web browsers, games, and video editing software, are designed to take advantage of multiple cores.
Single-Core: Still sufficient for very basic tasks like simple text editing. However, many current operating systems, including Windows 11, now require at least a dual-core processor.
embedded systems
Key Characteristics
Dedicated Function: Unlike a desktop PC which can perform thousands of tasks, an embedded system is built to do one or a few tasks very well (e.g., controlling the temperature in an oven).
Real-Time Operation: Many embedded systems interact with the physical world and must respond within a strict time constraint to events as they occur (real-time operating system - RTOS). A delay could be dangerous (e.g., a car's anti-lock braking system).
Low Power Consumption: They are often battery-powered and designed to use minimal energy.
Reliability: Because they often control safety-critical operations, they must be extremely reliable and fault-tolerant.
Limited Resources: They typically have limited processing power, memory (RAM and storage), and user interfaces compared to a PC.
Physical Integration: They are integrated physically into the device they control.
Components
An embedded system typically contains:
Microprocessor or Microcontroller: The core processing unit, often a simple CPU or a single chip (microcontroller) that integrates the CPU, RAM, and input/output interfaces.
Memory: Limited RAM for the currently executing instructions and ROM (Read-Only Memory) to store the permanent, non-volatile program instructions (the firmware).
Input/Output (I/O) Interfaces: Hardware interfaces to communicate with other parts of the system or external sensors/actuators (e.g., a temperature sensor and a heating element).
Examples of Embedded Systems
Embedded systems are ubiquitous and found in countless everyday objects:
Category Examples Function
Home Appliances Microwave ovens, washing machines, smart thermostats Controlling heating cycles, wash times, and temperature regulation.
Vehicles Cars, planes, ships Engine management systems, anti-lock braking systems (ABS), airbags, entertainment systems.
Consumer Electronics Digital cameras, MP3 players, smartwatches Managing image processing, audio playback, and fitness tracking.
Medical Devices Pacemakers, MRI scanners, blood sugar monitors Monitoring vital signs and delivering treatment safely.
Industrial Control Robotic assembly lines, security systems Automated monitoring, precise motion control, and security surveillance.
Advantages and Disadvantages
Advantages:
Cost-effective: Cheaper to produce than general-purpose computers.
Reliability: Highly stable due to their dedicated nature.
Efficiency: Optimised for power consumption and speed in their specific task.
Disadvantages:
Hard to Program: They often require specialised programming languages and tools (e.g., Assembly language).
Debugging is Difficult: Finding and fixing errors in real-time systems can be complex.
Difficult to Upgrade: The firmware is often fixed in ROM and cannot be easily changed or upgraded.
binary
Key Concepts
Bit: The term "bit" is short for "binary digit". A single 0 or 1 is one bit.
Byte: A byte is a collection of 8 bits. This is the standard unit used to measure memory capacity and data transfer rates.
Representing Data: Computers use various combinations of 0s and 1s to represent all forms of data, including numbers, text, images, and instructions for the CPU.
data protection act
The Data Protection Act 2018 (DPA)
The DPA controls how personal information is used by organisations, businesses, and the government. It gives individuals rights over their data and sets strict rules for anyone processing personal data.
Key Principles (organisations must ensure data is):
Processed fairly, lawfully, and transparently.
Collected for specified, explicit purposes and not used for anything else without permission.
Adequate, relevant, and not excessive for the stated purpose.
Accurate and kept up to date where necessary.
Kept for no longer than is necessary.
Handled in a way that ensures appropriate security, including protection against unauthorised access, loss, or damage.
Individual Rights:
To be informed about how their data is used.
To access the personal data held about them (via a Subject Access Request).
To have inaccurate data updated or erased.
the computer misuse act 1990
The Computer Misuse Act 1990 (CMA)
The CMA was introduced to prevent illegal access to and modification of computer systems and data. It makes hacking and related activities a criminal offence.
The Three Primary Offences:
Unauthorised access to computer material: Gaining access to a computer system or files without permission (e.g., guessing a password to log into someone's account).
Unauthorised access with intent to commit or facilitate a further offence: Gaining unauthorised access with the purpose of performing another crime (e.g., accessing a bank account with intent to steal money).
Unauthorised acts with intent to impair, or with recklessness as to impairing the operation of a computer, etc.: Making changes to data or the way a system works without permission (e.g., installing a virus, deleting files, or causing a Denial of Service attack).
the copyright, desings and patents act 1988
The Copyright, Designs and Patents Act 1988 (CDPA)
The CDPA protects the intellectual property of creators, giving them the exclusive right to control how their original work is used. Copyright is applied automatically to original work.
Protected Works Include:
Literary works (books, text, computer software)
Musical and dramatic works
Artistic works (pictures, photos, designs)
Films and sound recordings
Illegal Activities Under the Act (without permission):
Making copies of the material.
Distributing or selling copies to the public.
Adapting the original work.
Importing or downloading illegally copied material.
This act ensures creators can earn an income from their work and prevents others from profiting from stolen intellectual property.
computer science exam paper 2
computational thinking techniques
decomposition
Definition: The process of breaking a complex problem or a large system down into smaller, more manageable sub-problems or parts.
Purpose: It makes the overall problem less daunting and easier to understand, allowing each smaller part to be solved individually.
Example: Planning a holiday can be decomposed into smaller tasks: choosing a destination, booking flights, finding accommodation, and planning activities.
pattern recognition
Definition: The ability to look for similarities, common themes, or trends among and within different problems or data sets.
Purpose: By identifying patterns, solutions that worked for a similar, previously solved problem can be applied or adapted to the current one, saving time and improving efficiency.
Example: When solving a series of maths problems, you might notice that a particular formula is used in all of them, allowing you to use the same approach rather than figuring out each one from scratch.
abstraction
Definition: The process of focusing only on the essential and relevant details needed to solve the problem, while filtering out or ignoring irrelevant details.
Purpose: It helps create a general idea or model of the problem, allowing a programmer to focus on the core logic without getting bogged down by unnecessary specifics.
Example: A map of the London Underground shows only the lines, stations, and connections (relevant details) but ignores actual geographical distance and depth (irrelevant details) to help people plan journeys effectively.
algorithms
Definition: The process of developing a step-by-step solution to the problem, or a set of rules to follow to solve the problem.
Purpose: It creates clear, unambiguous instructions that a computer (or human) can follow to reach a solution.
Example: A recipe is an algorithm for cooking a meal, providing a precise sequence of steps and ingredients to achieve the desired outcome.
sectrions
Sequence: Definition and Purpose
Sequence refers to the execution of instructions in a fixed, step-by-step order. It is the fundamental way a program flows from start to finish unless altered by selection or iteration constructs.
Core Principle: Instructions are executed sequentially, meaning the second instruction only runs after the first one is complete, the third after the second, and so on.
Order is Critical: The order in which instructions are placed determines the final output of the program. Swapping lines of code usually changes the result.
algorithms
An algorithm is a precise, step-by-step set of instructions designed to solve a specific problem or complete a task.
It is a fundamental concept in computational thinking and computer science. Algorithms must be:
Precise and Unambiguous: Every step must be clearly defined, leaving no room for interpretation.
Ordered: The sequence of steps matters.
Feasible: The task can actually be done.
Finite: The algorithm must always terminate after a certain number of steps.
Representing Algorithms
Algorithms can be presented in various ways for clarity:
Pseudocode: A structured, plain-English description of an algorithm that resembles code but is easier for humans to read and understand.
Flowcharts: Diagrams that use standard symbols (rectangles, diamonds, ovals) to represent the flow and steps of the algorithm visually.
Structured English (or just English): A simple description in plain language, useful for non-technical audiences.
Examples of Algorithm Types
At the GCSE level, you should be familiar with common algorithms for everyday tasks and computational problems:
Sorting Algorithms: Methods used to arrange data into a specific order (e.g., Bubble Sort, Merge Sort).
Searching Algorithms: Methods used to find a specific item within a data structure (e.g., Binary Search, Linear Search).
Everyday Examples:
A recipe (making a cake).
Instructions for building furniture.
The steps you follow to log into your computer.
The Importance of Algorithms
Algorithms are essential because they:
Provide the logical blueprint for writing computer programs.
Allow complex problems to be solved in a systematic way.
Enable consistent, reliable, and testable solutions.
The efficiency of an algorithm is crucial. A good algorithm will complete a task quickly using minimal resources, while a poor algorithm might be slow and use too much memory.
iteration
Iteration: Definition and Purpose
Iteration is the process of repeating a sequence of instructions a specific number of times or until a condition is met. This is commonly referred to as "looping".
Purpose: It allows a program to efficiently execute the same block of code multiple times without writing the same lines of code repeatedly.