





























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























































INSTRUCTION- Instruction is a command to the processor to perform a given task on specified data. A computer instruction refers to a binary code that controls how a computer performs micro-operations in a series. They are saved in the memory. Every computer has its own set of instructions. INSTRUCTION FORMATS- An instruction format or instruction code is a group of bits used to perform a particular operation on the data stored in computer. • Processor fetches an instruction from memory and decodes the bits to execute the instruction. • Different computers may have their own instruction set.
ONE-ADDRESS INSTRUCTIONS- One-address instructions use an implied accumulator (AC) register for all data manipulation. For multiplication and division there is a need for a second register. However, here we will neglect the second and assume that the AC contains the result of all operations. The program to evaluate X = (A + B) (C + D) is- LOAD A AC ← M [A] ADD B AC ← A C + 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 All operations are done between the AC register and a memory operand. T is the address of a temporary memory location required for storing the intermediate result. ZERO-ADDRESS INSTRUCTIONS- A stack-organized computer does not use an address field for the instructions ADD and MUL. The PUSH and POP instructions need an address field to specify the operand that communicates with the stack. The following program shows how X = (A + B) (C + D) will be written for a stack organized computer. PUSH A TOS ← A PUSH B TOS ← B ADD TOS ← (A + B) PUSH C TOS ← C PUSH D TOS ← D ADD TOS ← (C + D) MUL TOS ← (C + D) (A +B) POP X M [X] ← TOS To evaluate arithmetic expressions in a stack computer, it is necessary to convert the expression into Reverse Polish Notation RPN. The name “zero-address” is given to this type of computer because of the absence of an address field in the computational instructions.
Complex Instruction Set Computer (CISC)- The main idea is that a single instruction will do all loading, evaluating, and storing operations just like a multiplication command will do stuff like loading data, evaluating, and storing it, hence it’s complex. Characteristics of CISC-
Hardwired v/s Micro-programmed Control Unit- To execute an instruction, the control unit of the CPU must generate the required control signal in the proper sequence. There are two approaches used for generating the control signals in proper sequence as “Hardwired Control unit” and “Micro-programmed control unit.” Hardwired Control Unit –The control hardware can be viewed as a state machine that changes from one state to another in every clock cycle, depending on the contents of the instruction register, the condition codes and the external inputs. The outputs of the state machine are the control signals. The sequence of the operation carried out by this machine is determined by the wiring of the logic elements and hence named as “hardwired”. Fixed logic circuits that correspond directly to the Boolean expressions are used to generate the control signals. Hardwired control is faster than micro-programmed control. A controller that uses this approach can operate at high speed. Characteristics:-
Micro-programmed Control Unit –