IGCSE Computer Science - Chapter 3: Hardware Study Notes

IGCSE Computer Science - Chapter 3: Hardware Study Notes

Introduction to the CPU and Modern Architecture

  • The Central Processing Unit (CPU) is the core component of modern computer systems.

  • A common misconception is that the CPU is the entire desktop or laptop; however, it is actually just a chip responsible for executing instructions and processing data in applications.

Understanding Instructions within Applications

  • Example: In the game Valorant, when shooting a bullet:

    • The CPU processes multiple instructions simultaneously, such as:

    • Reducing the bullet count.

    • Decreasing the enemy's health upon impact.

Monolithic Architecture

  • Components of the Monolithic Architecture include:

    • CPU

    • Memory Unit (RAM)

    • Input Devices

    • Output Devices

1. Arithmetic and Logic Unit (ALU)
  • Carries out arithmetic operations (addition, subtraction, multiplication, division).

  • Performs logical operations to facilitate decision-making in computing tasks.

  • A CPU may contain multiple ALUs, with each designated for specific tasks.

2. Memory Unit (RAM)
  • Acts as a storage box that holds all the instructions needed by the CPU to access.

  • The CPU moves data and programs from the hard disk drive to RAM for faster read and write operations, as RAM operations are significantly quicker than HDD operations.

  • RAM is volatile memory, meaning its contents are lost once the computer is powered off (e.g., progress in a game is lost if not saved).

3. Registers
  • Fundamental components of the CPU, enabling efficient processing by holding specific parts of instructions or data:

    • Current Instruction Register (CIR)

    • Stores the current instruction being decoded and executed.

    • Accumulator (ACC)

    • Holds the results of calculations performed by the ALU.

    • Memory Address Register (MAR)

    • Stores the address of the current memory location being read or written to.

    • Memory Data Register (MDR)

    • Temporarily holds data being transferred to and from memory.

    • Program Counter (PC)

    • Holds the address of the next instruction ready for execution.

4. Control Unit (CU)
  • The coordinator of the CPU, managing the operations of its components.

  • Receives instructions and addresses from the Program Counter, interprets them, and communicates with the other components via the control bus.

5. Buses
  • Communication pathways for data transfer within the CPU and other components:

    • Address Bus: Transfers memory addresses from the CPU to the memory unit.

    • Data Bus: Carries actual data between the CPU and memory.

    • Control Bus: Transmits control signals from the CU to other components in the architecture.

  • The width of these buses can determine the capacity for data transmission; wider buses can carry more data simultaneously.

Overview of the Fetch-Decode-Execute Cycle

  • This cycle describes how the CPU processes instructions.

  • The process occurs in a matter of milliseconds, leading to billions of cycles per second.

  • Example Steps in the Cycle:

    1. The Program Counter retrieves the address of the next instruction.

    2. The address is copied to the MAR, incrementing the PC by one.

    3. The control unit requests the instruction from memory, obtaining the data based on the address from the MAR.

    4. The data is moved to the MDR and then copied to the CIR.

    5. The instruction is decoded; if it involves arithmetic operations, the ALU processes the data.

    6. The final result is stored in the accumulator and, if necessary, written back to memory.

Factors Affecting CPU Speed

  • Clock Speed: The number of cycles per second a CPU can execute.

    • Measured in GHz (e.g., a CPU with 3.5 GHz can execute 3.5 billion instructions per second).

    • Overclocking can increase speed but may lead to overheating and stability issues.

  • Number of Cores: More cores allow parallel processing, improving efficiency. However, simply doubling cores does not guarantee double speed due to synchronization requirements.

  • Cache Memory: On-chip memory that allows the CPU to store frequently accessed data, speeding up processing times. Larger cache sizes improve performance as they reduce the need for RAM access.

Instruction Sets and Embedded Systems

  • An Instruction Set is a compiled set of operations that CPUs understand, comprising:

    • Opcode: The operation part of an instruction (e.g., LOAD, ADD).

    • Operands: The data or address to operate on.

  • Embedded Systems: Special-purpose systems that utilize computer chips to control devices (e.g., microwaves, washing machines), optimized for specific tasks.

Input Devices

  • Essential for user interaction with computers. Key input devices include:

    • Keyboard: Converts keystrokes into binary data for CPU processing.

    • Mouse: Utilizes optical sensors to track movement and communicates with the CPU via signals.

    • Touch Screens: Directly capture user input by detecting touch, available in several types:

    • Capacitive: High clarity and supports multi-touch.

    • Resistive: Measures pressure; less sensitive but versatile.

    • Infrared: Highly sensitive but prone to false touches.

    • Scanners: Digitize text/images, utilizing Optical Character Recognition (OCR) technology.

    • Barcode and QR Code Scanners: Enable automatic data entry and product identification.

Sensors

  • Sensors provide automatic input, detecting environmental changes and translating them into data for processing.

  • Examples of sensors include:

    • Temperature, Humidity, and Pressure Sensors: Monitor environmental conditions.

    • Sound and Motion Sensors: Activate based on environmental stimuli.

Data Storage Overview

  • Primary Memory: Internal storage directly accessed by the CPU (RAM - volatile; ROM - non-volatile).

  • Secondary Storage: Larger, persistent storage options (e.g., HDDs and SSDs, both non-volatile).

    • HDD: Magnetic surfaces; slower speeds with mechanical parts; may suffer from fragmentation.

    • SSD: Faster, non-mechanical flash storage.

  • Cloud Storage: Remote server storage allowing access anytime, but reliant on internet connectivity.

Networking Hardware

  • Network Interface Card (NIC): Allows devices to connect to networks.

  • IP Address: A unique identifier assigned to each device on a network.

    • Static IP: Fixed addresses for servers.

    • Dynamic IP: Temporary addresses assigned upon connection to the network.

  • MAC Address: Unique identifier used in local networks for data routing.

  • Router Functions: Direct data packets between networks, facilitate communication across protocols, and ensure data reaches the correct device.

Conclusion

  • Understanding these components and processes is crucial for mastering the fundamentals of computer science and technology applications.