General Register CPU Organisation: Two and Three Address Instructions

출처
en
Aug 25, 2019 Oct 22, 2026
Video preview
공유:

This video explains the general register organization, contrasting it with the single accumulator organization, and details how two-address and three-address instruction formats are used to evaluate expressions like A + B * C + D.

General Register Organization vs. Single Accumulator ⏱ 0:00

  • •General register organization uses more registers than the single accumulator organization.
  • •Single accumulator uses the same register to minimize cost; general register organization accepts higher cost for more speed.
  • •It includes an ALU for arithmetic and logical operations and multiple registers.
  • •Single accumulator had one accumulator, a program counter, and an instruction register.
  • •General register organization supports two-address or three-address instructions.
  • Three-Address Instructions ⏱ 1:32

  • •Instruction format: mode, opcode, destination operand, source operand, and another source operand.
  • •Example expression: A + B * C + D.
  • •Three-address sequence:
  • - Add R1, A, B — adds memory values A and B, stores result in R1.

    - Add R2, C, D — adds memory values C and D, stores result in R2.

    - Mul X, R1, R2 — multiplies R1 and R2, stores result in memory X.

  • •Uses 3 instructions total.
  • •Instruction length increases, increasing instruction register size and bus size.
  • •Fewer instructions reduce execution time and increase speed, but hardware cost is higher.
  • Two-Address Instructions ⏱ 4:38

  • •Instruction format: mode, opcode, destination operand, source operand.
  • •Two-address sequence for the same expression:
  • - Move R1, A — moves A to R1.

    - Add R1, B — adds B to R1 (result A+B).

    - Move R2, C — moves C to R2.

    - Add R2, D — adds D to R2 (result C+D).

    - Mul R1, R2 — multiplies R1 and R2, stores result in R1.

  • •Uses 5 instructions total.
  • •Instruction size is smaller than three-address, but the increased number of instructions affects speed.
  • Key Takeaways

  • •General register organization uses multiple registers and supports two-address or three-address instructions.
  • •Three-address instructions solve A + B * C + D in 3 instructions but increase instruction length and bus size.
  • •Two-address instructions require 5 instructions for the same expression, reducing instruction size but increasing execution time.
  • •Fewer instructions lead to higher speed, at the cost of larger instruction register and bus size.
  • Conclusion

    General register organization trades higher hardware cost for greater speed by using more registers and supporting two-address or three-address instructions, with three-address instructions minimizing instruction count while two-address instructions reduce instruction size.

    실시간 웹 검색으로 검증 — 추측이 아니라 실제 출처와 대조합니다.

    이 영상에 대해 질문하기

    비주얼 하이라이트베타