Upcoming SlideShare
×

# Instruction format(report)

1,638 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
1,638
On SlideShare
0
From Embeds
0
Number of Embeds
27
Actions
Shares
0
47
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Instruction format(report)

1. 1. Punjab College of Technical Education<br />Report<br />Instruction Format<br />Presented by <br />432Mr.Pratik Jain Mr. Parmod Kumar1 Mr. Sanjeev Aggarwal Mr. Gulrez Bawa<br /><br />INSTRUCTION FORMAT<br /><ul><li>An instruction format or instruction code is agroup of bits used to perform a particularoperation on the data stored in computer.
2. 2. Processor fetches an instruction frommemory and decodes the bits to execute
3. 3. the instruction.
4. 4. Different computers may have their owninstruction set.
5. 5. Instruction code is divided into twoparts namely operation code andaddress of data.
6. 6. Operation code consisting group ofbits to define an operation such asadd,subtract, multiply etc.</li></ul>In an instruction format:<br /><ul><li>First 12 bits (0-11) specify an address.
7. 7. Next 3 bits specify operation code (opcode).
8. 8. Left most bit specify the addressing mode I</li></ul>I = 0 for direct address<br />I = 1 for indirect address<br />TYPES OF INSTRUCTIONS<br />The basic computer has three 16-bit instruction code formats:<br /><ul><li> Memory Reference Instructions
9. 9. Register Reference Instructions
10. 10. Input/Output Instructions</li></ul>Memory Reference Instructions<br />In Memory reference instruction:<br /><ul><li>First 12 bits(0-11) specify an address.
11. 11. Next 3 bits specify operation code (opcode).
12. 12. Left most bit specify the addressing mode I</li></ul>I = 0 for direct address<br />I = 1 for indirect address<br />(Opcode = 000 through 111)<br />In Memory reference instruction:<br /><ul><li>First 12 bits (0-11) specify an address.
13. 13. The address field is denoted by three x’s (in hexadecimal
14. 14. notation) and is equivalent to 12-bit address.
15. 15. The last mode bit of the instruction represents by symbol I.
16. 16. When I = 0, the last four bits of an instruction have ahexadecimal digit equivalent from 0 to 6 since the last bit iszero (0).
17. 17. When I = 1 the last four bits of an instruction have ahexadecimal digit equivalent from 8 to E since the last bit isone (1).</li></ul>Hexadecimal codeSymbolI = 0I = 1DescriptionAND0xxx8xxxAND memory word to ACADD1xxx9xxxADD memory word to ACLDA2xxxAxxxLOAD Memory word to ACSTA3xxxBxxxStore content of AC in memoryBUN4xxxCxxxBranch unconditionallyBSA5xxxDxxxBranch and save return addressISZ6xxxExxxIncrement and Skip if zero<br />Register Reference Instructions<br />In Register Reference Instruction:<br /><ul><li>First 12 bits (0-11) specify the register operation.
18. 18. The next three bits equals to 111 specify opcode.
19. 19. The last mode bit of the instruction is 0.
20. 20. Therefore, left most 4 bits are always 0111 which is equal tohexadecimal 7.</li></ul>SymbolHexadecimal codeDescriptionCLA7800Clear ACCLE7400Clear ECMA7200Complement ACCME7100Complement ECIR7080Circulate right AC and ECIL7040Circulate left AC and EINC7020Increment ACSPA7010Skip next instruction if AC positiveSNA7008Skip next instruction is AC is negativeSZA7004Skip next instruction is AC is 0SZE7002Skip next instruction is E is 0HLT7001Halt computer<br />I/O Reference Instructions<br />In I/O Reference Instruction:<br /><ul><li>First 12 bits (0-11) specify the I/O operation.
21. 21. The next three bits equals to 111 specify opcode.
22. 22. The last mode bit of the instruction is 1.
23. 23. Therefore, left most 4 bits are always 1111 which is equal tohexadecimal F.</li></ul>SymbolHexadecimal codeDescriptionINPF800Input character to ACOUTF400Output character from ACSKIF200Skip on input flagSKOF100Skip on Output flagIONF080Interrupt onIOFF040Interrupt off<br />