Professional Documents
Culture Documents
Untitled Document
Untitled Document
Name-Manikant Pandey
Roll No.-
Dept.- Information technology
Sec- B
Semester- 3rd
Sub- Computer Organisation
(PCC CS-302)
Introduction
Instruction Formats
A computer executes a task in accordance with the given instructions. Computer
education is divided into sections called domains. Since everything in a computer is a 0
or a 1, each of these fields holds a distinct piece of information from which the CPU
derives its actions. The most typical fields include:
● The operation to be carried out, such as addition, is specified in the operation field.
● Address field that specifies the register or memory location of the operand.
● Mode field, which describes how to establish operand.
The amount of addresses an instruction contains determines its length. Based on the
quantity of address fields, CPU organisation typically falls into one of three categories:
1. Single Accumulator organization
2. General register organization
3. Stack organization
In the first company, the operation is carried out using a unique register known as the
accumulator. Multiple registers are employed for computation from the second on. There
is no address field since stack-based operations are used in the third organisation. A
combination of different organisations is typically what we perceive, thus just one
organisation needs to be used.
A stack-based computer does not use the instruction's address field. An expression is first
translated to reverse Polish Notation, or Postfix Notation, in order to be evaluated.
PUSH A TOP=A
PUSH B TOP=B
PUSH C TOP=C
PUSH D TOP=D
ADD TOP=C+D
Expression: X = (A+B)*(C+D)
AC is accumulator
M[] is any memory location
M[T] is temporary location
LOAD A AC = M[A]
ADD B AC = AC + M[B]
STORE T M[T] = AC
LOAD C AC = M[C]
ADD D AC = AC + M[D]
MUL T AC = AC * M[T]
STORE X M[X] = AC
Two Address Instructions
This is typical of desktop computers. Here, the instruction has the option of
specifying two addresses. The result can now be stored in several locations rather
than just accumulators, which requires more bits to represent the address than it did
in prior address instructions where the result was saved in the accumulator.
Expression: X = (A+B)*(C+D)
R1, R2 are registers
M[] is any memory location
MOV R2, C R2 = C
ADD R2, D R2 = R2 + D
MUL R1, R2 R1 = R1 * R2
MOV X, R1 M[X] = R1
Three Address Instructions
Three address fields on this allow you to define a register or memory location. The
size of the programmes developed is substantially less, but the number of bits per
instruction rises. These instructions simplify programme construction, but they do
not result in faster programme execution because each micro operation (such as
altering a register's contents or loading an address into the address bus) is still
completed in a single cycle.
Expression: X = (A+B)*(C+D)
R1, R2 are registers
M[] is any memory location
BOOKS:
Computer organisation and design by Chowdhury P. Pal
WEBSITE:
Google
GeeksforGeeks
Tutorialspoint