0% found this document useful (0 votes)
2 views5 pages

Tutorial 8 ISA

The document outlines key concepts in computer system architecture, including machine instruction elements, operand locations, and instruction set design issues. It also explains the differences between arithmetic and logical shifts, the necessity of transfer of control instructions, and provides examples of instructions for a specific mathematical expression across different machine architectures. Additionally, it includes examples of bit manipulation through various shift and rotate operations.

Uploaded by

okay8
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Tutorial 8 ISA

The document outlines key concepts in computer system architecture, including machine instruction elements, operand locations, and instruction set design issues. It also explains the differences between arithmetic and logical shifts, the necessity of transfer of control instructions, and provides examples of instructions for a specific mathematical expression across different machine architectures. Additionally, it includes examples of bit manipulation through various shift and rotate operations.

Uploaded by

okay8
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Tutorial 8: WRES1201 – Computer System Architecture

1. What are the typical elements of a machine instruction?


Opcode- specifies the operation do
Operand- specify the input and output instructions, next instruction reference

Opcode, source and destination operand references, next instruction refence

2. What type of locations can hold source and destination operands?


Register or memory

3. If the instruction contains four addresses, what might be the purpose of each
address?
One for storing the result of the operation, two for the operand, and one for the
memory address of the next instruction
4. List and briefly explain five important instruction set design issues?
-operation (what operations should be provided and how complex the instructions
are
-data types (how many data types required, and what are them)
-instruction format (instruction length, number of addresses, size of field)
-addressing (the mode or modes by which the address of an operand is specified)

5. What is the difference between an arithmetic shift and logical shift?


-Arithmetic shift preserve signed bits, logical shifts does not
-Arithemetic shift perform multiplication and division operation, logical shift is
used for unsigned interpretation

-logical shift: everything shifted out will be replaced with a 0

-Arithmetic shift: the sign bit will be remain in the left arithmetic shift
-the sign bit is replaced to the right bit next to it in arithmetic right shift
6. Why are transfer of control instruction needed?

-important to be able to execute each instruction more than once


-all programs involve some decision-making
-breaking the task into smaller pieces that can be worked on one at a time
-execute repeatedly, decision making, breaking the task

7. List all the instruction to perform X = (A + B  C)/(D – E  F) for each


following machine:
a. One-Address Machine
b. Two-Addresses Machine
c. Three-Addresses Machine

Instructions that can be use are:


One-Address Two-Address Three-Address
LOAD M MOVE (X  Y) MOVE (X  Y)
STORE M ADD (X  X + Y) ADD (X  Y + Z)
ADD M SUB (X  X - Y) SUB (X  Y - Z)
SUB M MUL (X  X  Y) MUL (X  Y  Z)
MUL M DIV (X  X / Y) DIV (X  Y / Z)
DIV M

Assume that T1, T2, T3 and etc are temporary storage, and for 2 and 3 addresses
machine, we have register R1, R2, R3, …… as temporary storage.
X = (A + B  C)/(D – E  F)

a. one address machine


LOAD E
MUL F
STORE T1
LOAD D
SUB T1
STORE T1
LOAD B
MUL C
ADD A
DIV T1

b. two address machine


MOVE R1, B
MUL R1, C
ADD R1, A
MOVE R2, E
MUL R2, F
MOVE R3, D
SUB R3, R2
DIV R1, R3

c. three address machine


MUL R1, B, C
ADD R1, R1, A
MUL R2, E, F
SUB R2, D, R2
DIV R1, R1, R2

8. Given the original bit = 10101110. Find the bit after the following shifting.
a. Logical right shift (4 bits)
b. Logical left shift (4 bits)
c. Arithmetic right shift (4 bits)
d. Arithmetic left shift (4 bits)
e. Right rotate (4 bits)
f. Left rotate (4 bits)

a. 0000 1010
b. 1110 0000
c. 1111 1010
d. 1110 0000
e. 1110 1010
f. 1110 1010

You might also like