Ch6 - Computer Architecture (1)
Ch6 - Computer Architecture (1)
Omar El Safty
1. Primary Memory
Definition:
Main memory inside the computer that is directly accessible by the CPU.
• Volatile memory
• Can read from and written to
• Used to store:
- Instructions that are currently in use
- Data that is currently in use
- Parts of the operating system that are currently in use
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.
67
Ch.6: Computer Architecture Eng. Omar El Safty
KEY TERMS
Page – Block of data that can be transferred from virtual memory to RAM or vice versa.
• ROM is non-volatile
• Can only be read from but no written to
• Stores the firmware
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
RAM tends to have greater capacity ROM tends to have smaller capacity
68
Ch.6: Computer Architecture Eng. Omar El Safty
ROM function:
RAM function:
69
Ch.6: Computer Architecture Eng. Omar El Safty
2.2 RAM
RAM is made up of partitions. Each partition consists of an address and
its contents.
Role:
Used to store:
• Instructions that are currently in use
• Data that is currently in use
• Parts of the operating system that are currently in use
Structure
CPU contains the Arithmetic and Logic Unit (ALU) and the Control Unit.
Control Unit
Roles:
70
Ch.6: Computer Architecture Eng. Omar El Safty
IMPORTANT
2.4 Registers
Definition and Role:
They are small fast memory locations within the CPU that stores data and instructions during
processing.
Accumulator (ACC)
Temporarily stores data that is currently being used in a calculation.
71
Ch.6: Computer Architecture Eng. Omar El Safty
2.6 Buses
Definition and Role:
Pathways to transport data, addresses and control signals between the internal components
of the computer.
The following table shows three types of buses used in the Von Neumann architecture:
72
Ch.6: Computer Architecture Eng. Omar El Safty
3. Fetch-Decode-Execute Cycle
Fetch:
1 PC contains the address of 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 CPU interprets and decodes the instruction
Execute:
7 The CPU then executes the instruction
− Signals are sent using control bus to different components of the computer
− If there is an arithmetic operation, the result is stored in the accumulator
73
Ch.6: Computer Architecture Eng. Omar El Safty
4. Interrupt
Definition:
• A signal sent from a device or software that informs the CPU that its attention is
required
• Interrupts have different priorities
• Interrupts are handled by the ISR (Interrupt Service Routine)
Roles:
74
Ch.6: Computer Architecture Eng. Omar El Safty
KEY TERMS
75
Ch.6: Computer Architecture Eng. Omar El Safty
6. Embedded Systems
Definition:
An embedded system is a combination of hardware and software which is designed to carry
out a specific set of functions.
Examples:
• Domestic appliances
• Cars
• Security Systems
• Lighting Systems
• Vending Machines
IMPORTANT
Note That
76