Introduction: The "Brain" and "Body" of Your Computer
Welcome! In this chapter, we are going to dive deep inside the computer case to explore the internal hardware components. If you’ve ever wondered what actually happens when you click a button or why a faster processor makes your games run smoother, you’re in the right place!
Think of a computer like a busy restaurant. The processor is the chef, the main memory is the kitchen counter, and the buses are the waiters carrying orders and food back and forth. By the end of these notes, you’ll understand how all these parts talk to each other to make the magic happen. Don't worry if it sounds like a lot of jargon right now—we’ll break it all down piece by piece!
1. The Core Components
Every computer system relies on a few "heavy lifters" to function. According to the AQA syllabus, you need to know these key players:
The Processor (CPU)
The Central Processing Unit (CPU) is the "brain" of the computer. Its job is to carry out instructions. It fetches data, performs calculations, and makes logical decisions.
Main Memory (RAM)
This is where the computer stores data and instructions that are currently in use. It is addressable, meaning every single "slot" in memory has a unique number (an address) so the processor can find exactly what it needs.
I/O Controllers
Computers need to talk to the outside world (like keyboards or monitors). An I/O (Input/Output) Controller is a piece of hardware that sits between the processor and a peripheral device. It acts like a translator, making sure the processor doesn't have to worry about the specific "language" every different keyboard or mouse speaks.
2. The "Nervous System": Communication Buses
How do the components above talk to each other? They use buses. A bus is simply a set of parallel wires connecting independent components.
There are three main types of buses you need to know. Together, they are called the System Bus:
- Address Bus: This is used to send the location of where data needs to go. It is unidirectional (one-way), going from the processor to memory or I/O controllers.
- Data Bus: This carries the actual data (the numbers, characters, or instructions). It is bi-directional (two-way) because data needs to flow both into and out of the processor.
- Control Bus: This sends signals to coordinate everything. It tells the system whether it should be "reading" or "writing" and handles "interrupts."
Quick Review Box:
- Address Bus: Where? (One-way)
- Data Bus: What? (Two-way)
- Control Bus: How and When? (Two-way)
Memory Aid: Think of the Address Bus as the GPS (tells you where to go), the Data Bus as the Delivery Truck (carries the goods), and the Control Bus as the Traffic Lights (tells everyone when to move).
3. Computer Architectures
There are two main ways we organize the "layout" of a computer. Don't be intimidated by the names!
Von Neumann Architecture
In this design, data and instructions share the same memory and the same bus. Most general-purpose computers (like your laptop) use this. The Problem: Because they share the same bus, the processor can't fetch an instruction and data at the same time. This is known as the Von Neumann Bottleneck.
Harvard Architecture
This design uses separate memories and separate buses for data and instructions. It’s like having two different hallways in a school—one for students and one for teachers. This is much faster and is used often in Embedded Systems (like the computer in your washing machine or a digital signal processor).
Key Takeaway: Von Neumann = Shared (Cheaper, flexible); Harvard = Separate (Faster, specialized).
4. The Stored Program Concept
This is a fundamental idea in Computer Science. It states that a program must be resident in main memory to be executed. The instructions are fetched one by one and executed serially (in order) by the processor.
Did you know? Before this concept, computers had to be physically re-wired to change their task. Now, we just load a different program into memory!
5. Inside the Processor: Registers and Parts
The processor isn't just one big block; it’s made of specialized parts and tiny, super-fast storage locations called registers.
Major Components
- ALU (Arithmetic Logic Unit): The calculator. It does all the math (ADD, SUBTRACT) and logic (AND, OR).
- Control Unit (CU): The boss. It manages the Fetch-Execute cycle and sends control signals to other parts.
- Clock: The drummer. It sends out a pulse to keep all components synchronized.
The Dedicated Registers
Registers are like the "sticky notes" the processor uses to keep track of what it's doing right this second:
- Program Counter (PC): Holds the address of the next instruction to be fetched.
- Current Instruction Register (CIR): Holds the instruction that is currently being decoded/executed.
- Memory Address Register (MAR): Holds the address in memory that is being accessed.
- Memory Buffer Register (MBR): Holds the actual data being read from or written to memory. (Also called the Memory Data Register).
- Status Register: Tracks things like whether the last math result was a zero or a negative number.
6. The Fetch-Execute Cycle
This is the "heartbeat" of the computer. It repeats this cycle billions of times per second:
Step 1: Fetch
1. The address in the PC is copied to the MAR.
2. The instruction is fetched from memory and placed in the MBR.
3. The PC is incremented (adds 1) so it points to the next instruction.
4. The instruction is copied from the MBR to the CIR.
Step 2: Decode
The Control Unit looks at the instruction in the CIR and figures out what it means.
Step 3: Execute
The processor carries out the instruction (e.g., the ALU adds two numbers or data is moved between registers).
7. Processor Instructions
Every processor has its own Instruction Set. An instruction is usually made of two parts:
- Opcode: The "Operation Code" (The what—e.g., ADD, LOAD, STOP).
- Operand: The "Data" (The where or what value—e.g., an address or a number).
Addressing Modes
How does the processor interpret the Operand?
- Immediate Addressing: The operand is the actual value. (e.g., ADD 5 means "add the number 5").
- Direct Addressing: The operand is the memory address where the value is stored. (e.g., ADD 101 means "add the value found at address 101").
8. Factors Affecting Performance
Why is one computer faster than another? It usually comes down to these factors:
- Clock Speed: Measured in Hertz (Hz). More pulses per second = more instructions executed.
- Number of Cores: A core is a complete copy of a CPU. Multiple cores can work on different tasks at the same time.
- Cache Memory: A tiny, lightning-fast bit of memory inside the CPU. It stores frequently used data so the CPU doesn't have to wait for the slower RAM.
- Word Length: The number of bits the CPU can process at once (e.g., 32-bit or 64-bit).
- Bus Width: Wider buses (more wires) can carry more data at once. Think of it like adding more lanes to a highway.
Summary Takeaway: To make a processor faster, you can make it pulse faster (clock speed), give it more "brains" (cores), give it faster "sticky notes" (cache), or wider "roads" (bus width).
Great job! You've made it through the internal hardware of the computer. Don't worry if the registers (MAR, MBR, etc.) feel confusing—just remember that data always goes into the Buffer (MBR) and addresses always go into the Address register (MAR). You've got this!