��Chapter-4�Central Processing Unit: � �
Introduction
General Register Organization
Register set with common ALU
R 1 <--R2 + R3
1. MUX A selector (SELA): to place the content of R2 into bus A .
2 . MUX B selector (SELB): to place the content o f R 3 into bus B .
3 . ALU operation selector (OPR): to provide the arithmetic addition A + B .
4. Decoder destination selector (SELD): t o transfer the content o f the output bus into R 1 .
Control Word
Stack Organization
The register that holds the address for the stack is called a stack pointer (SP) because its value always points at the top item in the stack.
Register Stack
Push operation
Pop operation
Reverse Polish Notation
A • B + C • D
A + B Infix notation
+ AB Prefix or Polish notation
AB + Postfix or reverse Polish notation
A • B + C • D
is written in reverse Polish notation as
AB • CD • +
Evaluation of Arithmetic Expressions
(3 * 4) + (5 * 6)
In reverse Polish notation, it is expressed as
34 • 56 • +
Operation
Instruction Formats
1. An operation code field that specifies the operation to be performed.
2. An address field that designates a memory address or a processor register.
3. A mode field that specifies the way the operand or the effective address is determined
Thus the instruction
Three-Address Instructions
Two-Address Instructions
One-Address Instructions
Zero-Address Instructions
Addressing Modes
1. To give programming versatility to the user by providing such facilities as pointers to memory, counters for loop control, indexing of data, and program relocation.
2. To reduce the number of bits in the addressing field of the instruction