Instruction codes and computer registers

18,003 views

Published on

Sanjeev Patel 4x

Published in: Education
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
18,003
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
343
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Instruction codes and computer registers

  1. 1. INSTRUCTION CODES AND COMPUTER REGISTERS Nikhil Gaba 8125
  2. 2. Instruction code <ul><li>An instruction code is a group of bits that instruct the computer to perform a specific operation. </li></ul><ul><li>Two parts- </li></ul><ul><li>Operation code-specifies the operation </li></ul><ul><li>Address-specifies operands, registers or memory word </li></ul>Address Opcode 0 11 12 15
  3. 3. Stored program organization Memory 4096 X 16 Address Opcode 0 11 12 15 Processor register 0 15 Binary operand Instructions (program) Operands (data)
  4. 4. Direct and Indirect address <ul><li>When the second part of an instruction code specifies the actual operand instruction is said to have an immediate operand. </li></ul><ul><li>When the second part specifies the address of operand it is called direct address. </li></ul><ul><li>When the second part specifies the address of the memory word in which address of the operand is found is called indirect address . </li></ul>
  5. 5. Address Opcode 0 11 12 15 I Memory Memory 0 ADD ADD + + AC AC 22 457 operand operand 457 1 300 300 1350 1350 Direct address Indirect address 14
  6. 6. Basic computer registers 0 0 0 0 0 0 0 11 11 15 15 15 0 15 7 7 Program counter Address register Instruction register Temporary register Data register Accumulator Input register Output r
  7. 7. Functions <ul><li>DR -Holds memory operand </li></ul><ul><li>AC -Processor register </li></ul><ul><li>IR -Holds instruction code </li></ul><ul><li>TR -Holds temporary data </li></ul><ul><li>AR -Holds address for memory </li></ul><ul><li>PC -Hold address of next instruction </li></ul><ul><li>INPR -Holds input character </li></ul><ul><li>OUTR -Holds output character </li></ul>
  8. 8. Common bus sysytem

×