A-Level Revision Notes - 01 Computer Architecture
A-Level Revision Notes - 01 Computer Architecture
A-Level Revision Notes - 01 Computer Architecture
A-level
Computer
Architecture
teachcomputerscience.com
1.
Revision notes
teachcomputerscience.com
Introduction
Very early computers could not store programs and, hence, in 1945,
John von Neumann developed an idea of a computer that could store
programs, which is also known as von Neumann architecture. He
suggested that data and programs could be stored in memory and
that the data would be transferred between the memory and the
processor during processing. In this article, von Neumann architecture
and its components are explained.
teachcomputerscience.com
Computer architecture
Von Neumann architecture shows the components of a computer in
detail. It shows the connection between the processor, memory and
input-output devices. These connections are called buses. The three
different kinds of buses are the address bus, control bus and data bus.
Processor Memory
unit
Input &
Output
Legend
Address bus
Data bus I/O Devices
Control bus
teachcomputerscience.com
Detailed von Neumann architecture is shown in the figure below
where the different registers are shown. Registers are high-speed data
storage areas in the computer. Memory Address Register (MAR),
Memory Data Register (MDR), Accumulator (ACC), Program Counter
(PC), Status Register (SR) and Current Instruction Register (CIR) are
shown in the diagram. Addresses are stored in the memory unit.
Memory Unit
MDR
Legend
Control
Data
teachcomputerscience.com
Memory Unit
A memory unit consists of a number of partitions. Each partition
consists of data and an address. The address uniquely identifies every
location in memory and the contents are in binary form. An example
of data and addresses stored in a memory unit is given below.
Address Contents
11010000 10010001
11010001 11110101
11010010 11100011
11010011 10101010
. .
. .
. .
11011110 11011011
READ operation 11011111 11001100
To read the contents from any location, the registers MAR (Memory
Address Register) and MDR (Memory Data Register) are used. To read
the contents from the address 11010000, the address is copied to
MAR.
Register Contents
MAR 1 1 0 1 0 0 0 0
A read signal is sent by the processor to the memory. The contents are
then copied to the MDR (Memory Data Register).
Register Contents
MDR 1 0 0 1 0 0 0 1
teachcomputerscience.com
WRITE operation
To write data into a particular address, the data is first written to the
MDR. Let us consider writing the data 10111011 to the address
11101110.
Register Contents
MDR 1 0 1 1 1 0 1 1
Register Contents
MAR 1 1 0 1 1 1 1 0
A write signal is sent by the processor to the memory unit through the
control bus and the location is written with the data in MDR.
teachcomputerscience.com
Processor
The processor contains ALU (Arithmetic and Logic Unit) and Control
Unit (CU).
The ALU is responsible for arithmetic functions such as addition,
subtraction, multiplication, etc. and logic operations such as AND, OR,
NOT, etc. Accumulator (ACC) is the register that stores the result of
arithmetic and logical operations performed by the processor.
The Control Unit is responsible for controlling the memory, processor
and input-output devices. It contains the CIR (Current Instruction
Register) and PC (Program Counter). The CIR contains the current
instruction carried out by the processor. The PC contains the location
of the instruction that is to be executed next. The Control Unit reads
the instructions from the memory, decodes it and sends control
signals to the memory and input-output devices.
Input-Output Devices
An input device like a keyboard or mouse converts the signals sent by
humans into a form that can be understood by the computer. Output
devices such as printers, monitors, etc. convert the information from
the computer into a form that is understandable by humans.
I/O controller is a device that interfaces an input or output device with
the processor. Each device has its own controller which is connected
to a control bus. I/O controller is responsible for receiving the
requests from the processor and sending control signals to the device
specified for that operation. It consists of an interface to connect it to
the system or I/O bus, a set of data, command and status registers,
and an interface that connects it to the cable connecting the device
and the processor.
teachcomputerscience.com
The fetch-decode-execute cycle
To carry out the instructions, the processor fetches the data and
instructions from the memory and stores it in suitable registers. These
instructions are decoded and then executed.
Fetch
The program counter contains the location of the instruction that is to
be executed next. This address is copied to MAR. The instruction is
fetched from the memory and copied to MDR first. Then, the content
of the MDR is copied to the CIR (Current Instruction Register). The
value in a program counter is incremented by 1 and, hence, the
instruction in the next memory location is processed.
Decode
The instruction in CIR is decoded. An instruction consists of opcode
and operand. Opcode denotes the action to be performed and
operand denotes the address or data.
Execute
The processor sends appropriate control signals to the memory unit
and input-output devices in the computer system according to the
decoded instruction.
Fetch
Decode Execute
Check
Fetch for
interrupt
Decode Execute
teachcomputerscience.com
2.
Activities
teachcomputerscience.com
Activity-1 (Internet research)
Duration: 15 minutes
Register Function
B. What is the function of the flag register? What does each bit in this
register denote? State the function of each flag bit.
Function of register:
Register diagram:
Flag Function
teachcomputerscience.com
Activity-2
Duration: 10 minutes
2004 F4 HLT
teachcomputerscience.com
Activity-3
Duration: 15 minutes
Address Contents
98 78
99 65
9A 81
9B 2F
9C 3E
9D 19
9E D4
teachcomputerscience.com
3.
End of topic
questions
teachcomputerscience.com
End of topic questions
1. What are the three types of bus in computer architecture? Specify
the function of each bus.
2. What are the different control signals transmitted via control bus?
State the function of each.
3. How are the memory locations addressed?
4. What is the function of ALU?
5. How does the control unit control the memory and peripheral
devices?
6. List out the different registers.
a) Which of these are used to hold data and instructions?
b) Which of these are used to hold addresses?
7. Explain what happens in the fetch phase of fetch-decode-execute
cycle.
8. What is vectored interrupt mechanism?
teachcomputerscience.com