Explain Three, Two, One and Zero Address Instruction with Examples ?
Three, Two, One and Zero Address Instruction :-
(a) Three Address instructions :- In these type of instructions, all operand addresses are explicitly defined. Here the instructions format has three different address fields specifying or memory or processor register operand.
Advantage :-
(i) It results in short programs when evaluating arithmetic expressions.
(ii) Less execution time.
Disadvantage :-
(i) Too many bits are required for binary-coded instructions to specify three addresses
(ii)More complex decoding and processing circuits are needed.
Uses :-
Cyber 170 is a Commercial Computer using three-address instructions.
(b) Two Address instructions :- Here the instruction format has two different address fields, each specifying either a memory or a processor register operand.
Here X,Y - explicit Operands
OR
OR
Advantage :-
(i)Less execution time compare to one-address instructions.
(ii) Number of instructions needed to evaluate a arithmetic expression is much less compared to are address instructions.
Disadvantage :-
(i) It result in comparatively longer programs, then three-address instructions, when evaluating arithmetic expression.
(ii) Comparatively more execution time then three address instruction.
Uses :-
Two address instructions are used in all commercial computer.
(c) One Address Instructions :- Such instruction format has a single explicit address field and uses an implied accumulator (AC) register for all data manipulation.
i.e The operand at memory location X is added to the accumulator content and the result is stored in the accumulator it self. So there are only see explicit operand address field (i.e,x) and two implicit operand addresses.
Advantage :-
(i) Match L number of bets is required to Specify the single operand address.
(ii) Less complicated decoding is needed.
Disadvantage :-
(i) Number of instructions needed to evaluate an arithmetic expression is much more compared to two and three address instructions.
(ii)More execution time needed compare to two and three address instructions.
(iii) Limited range of functions each instruction can perform.
Uses :-
In INTEL 8085 machines.
(d) Zero Address Instructions :-
Such instructions do not contain any explicit addresses (except for PUSH and pop instructions). As the operand are stored in a pushdown stack (the operand required must be there in the to P Positions in the stack hence no addresses are required.
Here the top two operands X and Y in the stack are removed from the stack and added. The result is then again placed at the top of the stack (TOS).
Advantage :-
Do not Contained any explicit address. So, instructions are simple.
Disadvantage :-
(i) To evaluate arithmetic expression in a stack computer.
It is necessary to convert the expression into Reverse POLISH Notation (RPN).
Uses :-
In all stack type computers.
Subscribe to:
Post Comments
(
Atom
)
Nowadays, modern civilizations are mostly dependent on technologies. And the base of technologies is their database system. Here The company fungible helps you with IPU and solves most challenges like cost, production, supply chain, sourcing strategy, factor analysis, distribution business strategy. And their main goal and vision are to prevent invalid data-centric calculations between server nodes and invalid data exchanges between server nodes and to strengthen reliability security.
ReplyDelete