Computer Architecture Lesson 2 (Instruction Set Architecture)
Computer Architecture Lesson 2 (Instruction Set Architecture)
Computer Architecture
Lesson 2 (Instruction Set Architecture)
Introduction
1
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
2. Data types: The various types of data upon which operations are
performed.
Instruction Format
Operation part will specify the operation performed by the instruction (e.g.
AND, ADD, MOV). Types of operations include:
1. Data transfer
2. Arithmetic
3. Logical
4. Conversion
5. I/O instructions
6. System control
7. Transfer of control.
2
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
2. Numbers
3. Characters
4. Logical data
Types of ISA
3
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
CISC characteristics
4
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
RISC characteristics
Practical Example:
The diagram below represents the storage scheme for a generic computer.
The main memory is divided into locations numbered from (row) 1:
(column) 1 to (row) 6: (column) 4. The execution unit is responsible for
carrying out all computations. However, the execution unit can only operate
on data that has been loaded into one of the six registers (A, B, C, D, E, or
F). Let's say we want to find the product of two numbers - one stored in
5
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
location 2:3 and another stored in location 5:2 - and then store the product
back in the location 2:3.
6
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
value of 2:3 and "b" represent the value of 5:2, then this command is
identical to the C statement "a = a * b".
One of the primary advantages of this system is that the compiler has to do
very little work to translate a high-level language statement into assembly.
Because the length of the code is relatively short, very little RAM is required
to store instructions. The emphasis is put on building complex instructions
directly into the hardware.
RISC processors only use simple instructions that can be executed within
one clock cycle. Thus, the "MULT" command described above could be
divided into three separate commands: "LOAD," which moves data from the
memory bank to a register, "PROD," which finds the product of two
operands located within the registers, and "STORE," which moves data from
a register to the memory banks. In order to perform the exact series of steps
described in the CISC approach, a programmer would need to code four
lines of assembly:
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A
At first, this may seem like a much less efficient way of completing the
operation. Because there are more lines of code, more RAM is needed to
7
Prepared by:
Assist. Lect. Omar Haitham Alhabieb
store the assembly level instructions. The compiler must also perform more
work to convert a high-level language statement into code of this form.
However, the RISC strategy also brings some very important advantages.
Because each instruction requires only one clock cycle to execute, the entire
program will execute in approximately the same amount of time as the
multi-cycle "MULT" command. These RISC "reduced instructions" require
less transistors of hardware space than the complex instructions, leaving
more room for general purpose registers. Because all of the instructions
execute in a uniform amount of time (i.e. one clock), pipelining is possible.
8
Prepared by:
Assist. Lect. Omar Haitham Alhabieb