Ch5 - Computer Architecture
Ch5 - Computer Architecture
Computer Architecture
Ch.5: Computer Architecture Eng. Omar El Safty
1. Primary Memory
Definition and Main Feature/Characteristic:
Main memory inside the computer that is directly accessible by the CPU.
Purpose:
• Used to store data/files currently in use
• Used to store software/programs/instructions/parts of OS currently in use
• Used to store data temporarily
• To speed up the fetch stage of the FDE cycle
KEY TERMS
Volatile – The contents of the memory are lost when the power to the RAM is turned off
Virtual Memory
Definition:
A memory management system that makes use of secondary storage and software to extend
RAM capacity.
64
Ch.5: Computer Architecture Eng. Omar El Safty
KEY TERMS
Page – Block of data that can be transferred from virtual memory to RAM or vice versa.
Purpose:
Stores the firmware and startup instructions permanently.
The following table summarizes the differences between RAM and ROM:
RAM ROM
Can be written to and read from Can only be read from but not written to
Used to store data, software, instructions or Stores the firmware and startup
parts of the operating system currently in use instructions permanently
RAM tends to have greater storage capacity ROM tends to have smaller storage capacity
65
Ch.5: Computer Architecture Eng. Omar El Safty
ROM purpose:
• Stores the factory settings permanently
• Stores permanently the start-up routines when the toy car is first switched on
RAM purpose:
• Stores the running instructions received from the remote control unit
66
Ch.5: Computer Architecture Eng. Omar El Safty
2.2 RAM
RAM is made up of partitions.
Each partition consists of an address and its contents.
Purpose:
• Used to store data/files currently in use
• Used to store software/programs/instructions/parts of OS
currently in use
• Used to store data temporarily
• To speed up the fetch stage of the FDE cycle
Structure:
Consists of an Arithmetic and Logic Unit (ALU), Control Unit, and registers.
Purpose:
To perform an FDE cycle // To process an instruction.
67
Ch.5: Computer Architecture Eng. Omar El Safty
Control Unit
Purpose:
• Sends control signals that manage the transfer of data and instructions within the CPU
• Responsible for decoding instructions using an instruction set
Registers
Definition:
A small fast memory location within the CPU.
Purpose:
To store data/address/instruction temporarily.
Temporarily stores the instruction/data that is in use from the address in MAR.
Accumulator (ACC)
Temporarily stores interim results during calculations.
68
Ch.5: Computer Architecture Eng. Omar El Safty
2.4 Buses
Definition and Purpose:
Pathways to transmit data, addresses, and control signals between the internal components
of the CPU.
The following table shows three types of buses used in the Von Neumann architecture:
69
Ch.5: Computer Architecture Eng. Omar El Safty
3. Fetch-Decode-Execute Cycle
Fetch:
1 PC contains the address of the memory location of the next instruction to be fetched
2 This address is copied from the PC to MAR using the address bus
3 The contents (instruction) of the memory location contained in MAR is copied to MDR
4 The instruction in MDR is then copied to CIR using the data bus
5 The value of the PC is incremented by one to point to the next instruction that has to
be fetched
Decode:
6 Control unit decodes the instruction using an instruction set
Execute:
7 The CPU then executes the instruction
70
Ch.5: Computer Architecture Eng. Omar El Safty
4. Interrupt
Definition and Main Purpose:
• A signal sent from a device or software that informs the CPU that its attention is
required
• Interrupts have different priorities
Purpose:
• Informs the CPU that its attention is required
• Allows the CPU to pause the current process until the interrupt is serviced
• Allows the CPU to deal with vital tasks immediately based on their priority
• It enables multi-tasking to be carried out on a computer
71
Ch.5: Computer Architecture Eng. Omar El Safty
KEY TERMS
72
Ch.5: Computer Architecture Eng. Omar El Safty
Purpose:
To perform an FDE cycle // To process an instruction.
KEY TERMS
73
Ch.5: Computer Architecture Eng. Omar El Safty
6. Embedded Systems
Definition/Features/Characteristics of an embedded system:
• Performs a single/limited function
• It has a microprocessor
• It has dedicated hardware
• Uses firmware
• It is normally built into a larger device
• Users normally cannot reprogram
• It does not require much power
• It is cheap to manufacture
• Works automatically
• It is small in size
• It is a real-time system
Examples:
• Domestic appliances
• Cars
• Security Systems
• Lighting Systems
• Vending Machines
74