Unit6 1
Unit6 1
Memory - Registers
Instruction Sets
CPU Components
Concept of Registers
Definition:
Small, permanent storage location within
the CPU used (wired) for a specifically
defined purpose
Manipulated directly by the CPU
Limited in size to bits or bytes (not MB like
internal memory)
Typically configured to hold data, an
address, an instruction, a status flag, etc.
General Purpose Registers
Operation:
•CPU retrieves address and stores in
MAR
• CPU simultaneously sets read or
write line reflecting load or store
operation
•CPU turns on switch via activation
line
•Data is transferred between MDR
and Memory
Memory Capacity
OPCODE
Source OPERAND (address)
Result OPERAND (address)
Source Result
OPCODE
Address Operand
Addressing
Y = (A - B) / (C + D + E)
Instruction Comment
SUB Y, A, B Y A - B
ADD T, D, E T D+E
ADD T, T, C T T + C
DIV Y, Y, T Y Y / T
2-Address Instructions
Y = (A - B) / (C + D + E)
Instruction Comment
MOV Y, A Y A
SUB Y, B Y Y - B
MOV T, D T D
ADD T, E T T + E
ADD T, C T T + C
DIV Y, T Y Y / T
Instruction Word Length
Considerations
• Number of instructions - op code size
to support reasonable set of
instructions
• Number of addresses - address size to
accommodate increasing amounts of
memory
Simple 32-bit Instruction
Objective :
to allow the addressing of large amounts
of memory while maintaining a reasonably
sized instruction word address field
BASE REGISTER ADDRESSING
3945 + 13
Arithmetic
• Integer Add/Subtract/Multiply/Divide
• Floating Pt Add/Subtract/…
Logical
• NOT, AND, OR
Bit Manipulation Instructions
• Setting and Testing bits in a data word
Program Control
• Branch on 0, ...
Single operand manipulation instructions
• Incrementing/Decrementing by 1
• Negating
• Setting to zero
Instruction Types
Shift and Rotate
Instruction Types
Jump Subroutine and Return
Subroutine
Recursive Calls
Recursive Calls
Stack Implementation
Stack Implementation