2023 24 3a

Computer Organization and Architecture2023-247 marksProcessor organization, general registers organization, stac

What do you mean by processor organization? Explain various types of processor organization with suitable example.

What do you mean by processor organization? Explain various types of processor organization with suitable example.

Quick answer

Processor organization is the way the registers, ALU and control unit inside a CPU are arranged and connected. It decides where operands are kept while an instruction works on them. Three types are common.

Single accumulator organization

One special register, the accumulator (AC), holds one operand and also receives the result. The instruction has one address field for the other operand. For example, ADD X means $AC \leftarrow AC + M[X]$. To compute $Z = X + Y$ the program is LOAD X, ADD Y, STORE Z. It is simple and cheap, but every result passes through AC, so many load and store instructions are needed. Early machines such as the IBM 701 used it.

  Memory ---> [ ALU ] ---> [ AC ] ---+
                 ^                   |
                 +-------------------+

General register organization

A group of registers R1 to R7 can each hold data. Two multiplexers select the two source registers for the ALU, and a decoder selects the destination register. For example, ADD R1, R2, R3 means $R1 \leftarrow R2 + R3$. Data stays in the CPU, so fewer memory accesses are needed and the program is fast. Instructions are longer as they carry register numbers. ARM and RISC-V processors use this type. The program for $Z = X + Y$ is LOAD R1, X, LOAD R2, Y, ADD R3, R1, R2 and STORE R3, Z.

Stack organization

The CPU works with a LIFO stack, and the operations use the top items. Most instructions are zero-address. For example, ADD pops two items and pushes their sum. The program for $Z = X + Y$ is PUSH X, PUSH Y, ADD and POP Z. It suits expressions in reverse Polish notation, and the instructions are very short. But random access to the middle of the stack is not possible. The Burroughs B5500 used it.

Comparison

PointAccumulatorGeneral registerStack
Address fieldsonetwo or threezero
Speedslowfastmedium
Instruction sizeshortlongvery short
ExampleIBM 701ARM, RISC-VBurroughs B5500

Most modern processors use the general register organization along with some stack support for subroutine calls.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.

Up nextDifferentiate between Memory stack and register stack.