You are on page 1of 2

ITDR2102: Computer Organization – Tutorial Answers

Tutorial 6
From Lecture 6 (Computer Structure)

1. Explain the purpose of:


1. ALU
2. control unit
3. IR
4. PC
5. MAR
6. MBR
7. Processor status word (status flags)

Answer:
a. ALU – Performs all arithmetic and logical operations.
b. Control unit – provides signals to move data between registers, in and out of the CPU,
and external signals to memory and I/O devices.
c. IR – The instruction register holds the bit pattern of the instruction currently being
executed.
d. PC – The program counter holds the address of the next instruction to be fetched. It is
incremented after an instruction is fetched.
e. MAR – The memory address register holds the address of the memory location to be
read/written.
f. MBR – (memory buffer register): For a write, the MBR contains the data to be written to
memory. For a read operation, the MBR contains the data read from memory.
g. Processor status word – Also called Status flags or condition flags. Contains individual
bits to indicate the result of the last arithmetic or logical operation. Examples include:
result was zero, result was negative, overflow resulted, result produced a carry
2. Write the sequence of actions that must be done to add the number in register B to the number
in register C and leave the result in register B. Try to be as specific and detailed as possible
about data movement.

Answer: (the sequence could be written in a different way)

• Move the contents of register B to ACC via the internal bus


• Move the contents of register C to Temp via the internal bus
• Instruct the ALU to perform an add operation. The result is put into ACC
• Move the contents of ACC to register B

Page 1
ITDR2102: Computer Organization – Tutorial Answers

3. Write the micro-operations of the fetch cycle in Register Transfer Notation.

Answer:
• MAR ← (PC)
• READ
• MBR ← (Memory)
• IR ← (MBR)
• PC ← (PC) + 1

4. Write the micro-operations of the execute cycle for the instruction ADD E in Register Transfer
Notation.

Answer:
• ALU (input b) ← (register E)
• ALU (input a) ← (ACC)
• ADD
• ACC ← result

5. What are the 5 groups of machine instructions?

Answer:
1. Arithmetic group
− add, subtract, multiply, divide.
2. Logic group
− AND, OR, SHIFT, ROTATE.
3. Move or copy group
− Transfer data between memory locations and/or registers.
− Transfer data between memory locations and I/O devices.
4. Transfer of control group
− (conditional) jump or branch.
− subroutine (function) calls.
− return from subroutine.
5. Specialised group
− reset.
− halt.
− interrupt control.

Page 2

You might also like