Computer Science - A Level Complete Paper 1 Revision

Structure and Function of the Processor

  • Control Unit (CU):

    • Sends control signals to CPU parts (e.g., read/write to memory).

    • Executes programs via fetch-decode-execute cycle.

    • Contains clock (coordinates activity) and decoder (interprets instructions).

    • The CU fetches instructions from memory, decodes them, and coordinates the execution by sending control signals to other components.

  • Arithmetic Logic Unit (ALU):

    • Performs calculations and logical operations (add, multiply, compare, etc.).

    • The ALU is a fundamental building block of the CPU that performs arithmetic and logical operations on data.

  • Registers:

    • Program Counter (PC): stores the memory address of the next instruction.

    • Memory Address Register (MAR): stores the address of data fetched from or sent to memory.

    • Memory Data Register (MDR): stores data fetched from or stored in memory.

    • Current Instruction Register (CIR): stores the most recently fetched instruction.

    • Accumulator (ACC): holds results of ALU calculations.

    • Registers are small, high-speed storage locations within the CPU used to hold data and instructions that are being actively processed.

Buses

  • Address Bus: provides memory address to system memory/I/O devices.

    • Carries the memory addresses from the processor to other components such as memory and I/O devices.

  • Data Bus: transfers data between CPU and memory/I/O devices.

    • Carries the actual data between the processor and other components.

  • Control Bus: provides control signals for read/write operations.

    • Carries control signals from the processor to other components, coordinating their actions.

Fetch-Decode-Execute (FDE) Cycle

  • CPU executes programs by repeatedly performing FDE cycle.

  • Fetch Stage:

    1. PC copies address of next instruction to MAR.

    2. CU loads address onto Address Bus.

    3. CU triggers read signal via Control Bus; RAM puts instruction on Data Bus.

    4. Instruction loaded from Data Bus into MDR.

    5. MDR copies instruction into CIR.

    6. PC increments.

    • The fetch stage involves retrieving the instruction from memory.

  • Decode Stage: CIR contents sent to CU, which decodes the instruction.

    • The decode stage involves interpreting the instruction to determine what operation needs to be performed.

  • Execute Stage: CPU carries out the instruction in CIR; registers may change.

    • Load/Store: address in CIR loaded into MAR; data moved between ACC and memory.

    • Calculate: MDR and ACC contents sent to ALU; result to ACC.

    • The execute stage involves performing the operation specified by the instruction.

Factors Affecting CPU Performance

  • Clock Speed: higher clock speed = more instructions per second.

    • Overclocking can increase performance but may cause damage.

    • Clock speed is the rate at which the CPU executes instructions.

  • Cache: fast memory in CPU for frequently/recently used data.

    • Cache memory is a small, fast memory that stores frequently accessed data, reducing the time it takes to retrieve data.

  • Number of Cores: more cores = more simultaneous instruction processing.

    • A multi-core processor has multiple processing units, allowing it to execute multiple instructions simultaneously.

  • Pipelining: fetches instruction while decoding the prior and executing the one before.

    • Pipelining Controller predictions of Jump instructions, to prevent degraded performance if mistakes occur.

    • Pipelining is a technique that allows the CPU to work on multiple instructions at the same time, improving performance.

Processor Architectures

  • Von Neumann: single CU and ALU; sequential processing; instructions and data in same memory.

    • Von Neumann architecture is a computer architecture in which instructions and data are stored in the same memory.

  • Harvard: separate memories for data and programs with different buses, enabling more advantages over Von Neumann architecture.

    • Harvard architecture is a computer architecture that has separate memories for data and instructions, allowing for faster execution.

  • Contemporary: uses parallel processing (pipelining, SIMD, multicore).

    • SIMD (Single Instruction Multiple Data): Example: array processing e.g., GPU.

    • MIMD (Multiple Instruction Multiple Data): Example: multicore processing.

    • Contemporary architectures use parallel processing techniques to improve performance.

Types of Processors

  • CISC (Complex Instruction Set Computing): More instructions, more transistors

    • CISC processors have a large set of complex instructions.

  • RISC (Reduced Instruction Set Computing): Fewer instructions, more transistors

    • RISC processors have a smaller set of simpler instructions.

GPUs (Graphics Processing Units)

  • Designed for graphics calculations but used in other fields like machine learning.

  • ALUs perform SIMD operations.

  • GPUs are specialized processors designed to handle graphics calculations.

Multicore and Parallel Systems

  • Parallel processing: simultaneous data processing (non-Von Neumann).

    • SIMD: same operation on multiple data (e.g., GPUs).

    • MIMD: different instructions on different data (e.g., multicore CPUs).

    • Achieved via multicore CPUs, workstations, supercomputers, or distributed computing.

    • Parallel processing involves performing multiple operations simultaneously to improve performance.

Input, Output, and Storage Devices

  • Input Devices: enter data (keyboard, mouse, etc.).

  • Output Devices: retrieve information (printers, speakers, etc.).

  • Storage Devices: hold data/programs long-term (non-volatile).

    • Considerations: cost, speed, capacity, durability, reliability.

    • Input devices are used to enter data into the computer, output devices are used to display data, and storage devices are used to store data.

Storage Device Types

  • Magnetic: uses magnetization to represent data (HDDs, magnetic tape).

    • Magnetic storage devices store data by magnetizing a magnetic material.

  • Optical: uses lasers (CDs, DVDs, Blu-rays).

    • Optical storage devices store data by using lasers to read and write data on an optical disc.

  • Flash: solid-state, overwritable (SSDs, memory cards).

    • Flash storage devices are solid-state devices that store data in memory cells.

Memory Types

  • RAM (Random Access Memory): primary, temporary storage for running programs/data (volatile).

    • RAM is the primary memory used to store data and instructions that are being actively processed.

  • ROM (Read-Only Memory): primary, non-volatile, stores BIOS or firmware.

    • ROM is a non-volatile memory that stores the BIOS or firmware, which is used to start the computer.

Virtual (Cloud) Storage

  • Data stored over the internet.

    • Advantages: accessibility, shareability, scalability, managed backup/security.

    • Disadvantages: internet needed, cost, trust in provider.

    • Virtual storage is a storage model in which data is stored on remote servers.

System Software: Operating Systems (OS)

  • Manages hardware/software; provides UI, platform for applications, security, CPU/memory management.

    • The operating system is a system software that manages computer hardware and software resources.

OS Functions

  • Memory Management: allocates RAM.

  • Interrupts: handles hardware/software requests.

    • Interrupt Service Routine (ISR) is executed for high priority calls.

    • Interrupts are signals that interrupt the normal execution of the CPU and require immediate attention.

  • Scheduling: allocates CPU time using algorithms (Round Robin, First Come First Served, Shortest Job First, Shortest Remaining Time, Multi-Level Feedback Queues).

    • Scheduling algorithms are used to allocate CPU time to different processes.

  • OS Types:

    • Multitasking, Multi-user, Distributed, Embedded, Real-time.

  • Device Drivers: software for OS to communicate with hardware.

    • Device drivers are software that allows the operating system to communicate with hardware devices.

  • BIOS: controls startup and configures hardware.

    • BIOS is a firmware that controls the startup process and configures hardware.

Virtual Machines (VMs)

  • Simulates computer in software, allows running multiple OSes, or splitting resources.

    • Enhances security.

    • A virtual machine is a software emulation of a computer system that allows multiple operating systems to run on a single physical machine.

Application Software

  • Allows users to perform tasks (word processors, spreadsheets, browsers).

  • Utilities: maintenance programs (disk cleanup, etc.).

  • Open Source vs. Closed Source:

    • Open Source: code available, free, modifiable.

    • Closed Source: proprietary, often polished, warrantied.

    • Application software is software that allows users to perform specific tasks.

Translators (Convert Source Code Into Machine Code)

  • Assembler: assembly code to machine code.

  • Interpreter: line by line (debugging).

  • Compiler: all at once (faster execution).

    • Translators are software that converts source code into machine code.

Compilation Stages

  • Lexical Analysis, Syntax Analysis (Syntax Tree), Code Generation/Optimization.

  • Libraries: reusable code.

  • Linker: add library code. Loader load compiled code.

    • Compilation is the process of converting source code into machine code.

Software Development Life Cycle (SDLC) Methodologies

  • Waterfall: sequential stages (inflexible).

  • RAD (Rapid Application Development): builds prototypes (fast development).

  • Spiral: manages risk (complex).

  • Agile (Extreme Programming): code-focused (high quality code).

    • SDLC methodologies are frameworks for managing the software development process.

Algorithmic Thinking

  • Algorithms: instruction sets for problem-solving.

  • Represented with pseudocode or flowcharts.

    • Algorithms are step-by-step instructions for solving a problem.

Programming Language Paradigms

  • Low-level (machine code, assembly).

  • High-level (imperative, declarative).

    • Imperative: procedural (BASIC, Pascal, C). Object-oriented (Java, C++).

    • Declarative: logic (Prolog), functional (Lisp).

    • Programming language paradigms are different styles of programming.

Assembly Language

  • Low-level, uses mnemonics for instructions.

  • Needs assemblers.

    • Assembly language is a low-level programming language that uses mnemonics to represent instructions.

Addressing Memory Modes

  • Immediate: has data

  • Direct: has memory address.

  • Indirect: intermediate location.

  • Indexed: offset to base address.

    • Addressing modes are ways of specifying the location of data in memory.

Object-Oriented Languages

  • OOP: programs organized around objects.

  • Class: a cookie cutter. Attributes and Methods

  • Abstraction, Encapsulation(private), Inheritance, Polymorphism

    • Object-oriented programming is a programming paradigm in which programs are organized around objects.

Compression (for smaller file sizes)

  • Lossy: data loss, irreversible, high compression.

  • Lossless: no data loss, reversible, less compression.

    • Run Length Encoding (RLE) replaces image sequences.

    • Dictionary coding.

    • Compression is the process of reducing the size of a file.

Encryption

  • Data scrambling for secure access.

    • Symmetric encryption: same key for encrypt/decrypt.

    • Asymmetric encryption: public/private key pair (internet).

    • Encryption is the process of scrambling data to prevent unauthorized access.

Hashing

  • Generates fixed size hash value

  • One-way encryption process for security

    • Hashing is a one-way encryption process that generates a fixed-size hash value.

Databases

  • Structured, persistent data collections.

  • Data should be accurate for "garbage in, garbage out".

    • A database is a structured collection of data.

Database Types

  • Flat File: single table (redundant data).

  • Relational: multiple linked tables (normalized data).

  • Primary Key: unique identifier.

  • Foreign Key: links tables.

  • ER Diagrams display table relations.

    • There are several types of databases, including flat file and relational databases.

Exchange Data Types: XML, JSON, SQL, CSV files, APIs, EDI

Normalization (up to 3NF)

  • Steps to structure data to minimize redundancy.

    • Normalization is the process of structuring data to reduce redundancy.

SQL (Structured Query Language)

  • SELECT field*names (or * ALL) FROM table*name WHERE condition.

  • JOIN: combines tables based on relations.

    • SQL is a language used to manage and manipulate data in relational databases.

Transaction Processing (ACID Rules)

  • Atomicity (all or none).

  • Consistency (database must be valid).

  • Isolation (transactions independent).

  • Durability (persisted changes).

    • Transaction processing is a method of processing transactions in a database.

Data Integrity: record-locking, verification, validation

Networks

  • Connected computing device collections for communication and reliability

  • Network Hardware: NIC, switch, WAP, router.

  • Transmission Media: copper, fiber optic, radio waves.

    • A network is a collection of connected computing devices that can communicate with each other.

Network Classifications (Extent)

  • LAN (local), WAN (wide), PAN (personal).

    • Networks can be classified by their extent, such as LAN, WAN, and PAN.

Network Topologies

  • Bus (Backbone), Ring (Circular Backbone)

  • Star (Central Switch), Mesh (Connections to Every Node). Robustness

    • Network topologies are the arrangement of devices in a network.

Network Protocols Stack

  • TCP, IP, HTTP, HTTPS, FTP, SMTP, POP, IMAP.

    • Network protocols are sets of rules that govern how devices communicate on a network.

Domain Name System (DNS)

  • Translates domain names to IP addresses.

  • URLs are important.

    • DNS is a system that translates domain names to IP addresses.

Switching Types

  • Circuit (dedicated connection), Packet (divides into packets).

    • Switching is the process of forwarding data between devices on a network.

Network Securities

  • Authentication (username/password, 2FA, biometrics).

  • Firewalls, Encryption, Proxies, VPN

    • Network security measures are used to protect networks from unauthorized access and attacks.

Architectural Types

  • Web Technologies: Client-Server, Peer-to-Peer.

    • HTML: content. CSS: presentation. JavaScript: dynamic elements.

    • Web technologies are the technologies used to build and deploy web applications.

Web Technologies: Search Engines (spiders, crawlers, or bots) and client-side scripts (JavaScript), server-side scripts (PHP).

1.4.1 Data Types

  • Primitive Data Types:

    • Character, string, Boolean, integer, real

    • Positive integers in binary. Place value conversions: start with 1, then multiply by two as moving left.

    • Binary to Denary Conversion & Denary to Binary Conversion

Data Types: Denary and Binary Conversions

  • Use Sign and Magnitude to represent negative numbers in binary.

  • Use Two's Complement to represent most significant bit as a negative value.

Binary Integers addition and subtraction:

  • Basic binary addition rules.

  • Basic binary subtraction rules.

Data Types: Hexadecimal Conversions

  • Convert Positive Integers to Hexadecimal.

  • Convert Hexadecimal to Denary.

  • Convert Binary to Hexadecimal.

  • Convert Hexadecimal to Binary.

Data Types: Representation & Normalization of Floating Numbers

  • Binary, real numbers are represented in floating form.

  • Use sign and magnitude to represent the mantissa: Reverse ones and zeros, sign is the exponent.

  • Improve number accuracy by adjusting the exponent.

  • Normalize positive & negative numbers by adding/subtracting based on exponent.

Data Types: Rules for Floating Point Numbers

  • Negative numbers will always be stored in two’s complement.

  • Floating Point Normalization: Mantissas maximize precision.

  • Unnormalize for decimal alignment prior to add and subtract calculations

Logical operation methods(ALU):

  • Bitwise Manipulation and masks.Binary Shift, Logical Operations & Masking. Standard operators NOT, AND, OR, XOR

  • Character Set: American Standard Code for Information Exchange

1.4.2 Types of Structures

  • Arrays: Fixed Sizes (Static), Records (Attributes Unordered), Lists (Order Through Indices), Tuples (cannot be modified), Linked Lists, Queues, Stacks. Trees & Graphs. Hash Tables

1.4.3 Boolean Algebra

  • Logic gates diagram.

  • Truth table diagram.

  • Flip-Flops diagram.

  • Karnaugh Map diagram.

1.5.1 Computing Related Legislation:

  • The Computer Misuse Act (1990). The Data Protection Act (2018). The Copyright, Designs and Patents Act (1988). Creative Commons licensing diagram. The Regulation of Investigatory Powers Act (2000).

1.5.2 Moral and Ethical Issues:

  • Computers in the Workplace. Automated decision-making. Environmental Issues diagram. Censorship. Monitoring Behavior. Analyzing Personal Information. Layout, Color Paradigms, and Character Sets. AI(Artificial Intelligence).