Professional Documents
Culture Documents
UNDER THE GUIDENCE OF Er. Santosh Singh (Computer Science & Engineering) Kamla Nehru Institute of Engineering and Technology Sultanpur SESSION:2011-2012
SUBMITTED BY PREETI GUPTA M.tech(1st sem) 1110210
Instruction format
Each computer have instruction code and it is interpreted by control unit by CPU.Instruction format is represented as a rectangular box in form of bits & these bits are divided into groups called fields. Fields of Instruction format1. Opcode: the operation to be performed 2. Address field: address of operand 3. Mode field: mode of operand either direct or indirect
ADD
457
ADD
300
300
1350
457
Operand
1350
Operand
CPU Organization
Single accumulator: All operation is performed in accumulator. Ex. ADD X ACAC+M[X] General Register type: Ex. ADD R1 R2 R3 R1R2+R3 Stack Organization: Ex. PUSH X
Example. (A+B)*(C+D)
Three address field ADD R1 A B R1<- M[A]+M[B] ADD R2 C D R2<-M[C]+M[D] MUL X R1 R2 M[X]<-R1*R2
Data transfer and Manipulation Computer instructions are classified into three categories: Data transfer instruction-It transfer data from one place to another. Data manipulation- It are those that perform arithmatic,logic and shift operation. Program Control-It decide & change the path taken by program when execute.
Name
Load Store Move Exchange Input Output Push Pop
Mnemonic
LD ST MOV XCH IN OUT PUSH POP
Name
Mnemonic
Direct address Indirect address Relative address Immediate operand Index addressing Register address Register indirect Auto increment
10
The mnemonic for three address instruction that specify data type.
ADDI Add two binary integer number ADDF Add two floating point number ADD D Add two decimal number in BCD
11
12
3.Shift Instruction Name Logical shift right Logical shift left Arithmetic shift right Arithmetic shift left Rotate right Rotate left Rotate right through carry Rotate left through carry Mnemonic SHR SHL SHRA SHLA ROR ROL RORC ROLC
13
14