Opcode Table Opcodes Operations 00 ADD Instruction 2 Bit Opcode 4 bit operand 4 Bit operand 01 OR Memory 16 - 10 0 0011111110 1 0110000111 2 1011111110 3 1110000111 10 AND 11 XOR Accumulator CPU Registers 10 bit 0000000000 Program Counter 0000000001 6 0000000001 7 0000001011 Base Register 000000010 8 0000001111 9 0000001010 10 0000000000
Added by Lorena K.
Close
Step 1
- Instruction format (10 bits total): 2-bit opcode | 4-bit operand1 | 4-bit operand2. - Opcode table: 00 = ADD, 01 = OR, 10 = AND, 11 = XOR. Show more…
Show all steps
Your feedback will help us improve your experience
Rachel Gore and 70 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
The two word instruction is stored in memory at an address designated by symbol $W .$ The address field of the instruction (stored at $W+1$ ) is designated by the symbol $Y$. The operand used during the execution of the instruction is stored at address symbolized by $Z$. An index register contains the value $X$. State how $Z$ is calculated from the other addresses if the addressing mode of the instruction is (A) Direct (1) $Z=\operatorname{Mem}(Y)$ (B) Indirect (2) $\quad Z=Y+W+2$ (C) Relative (3) $Z=Y+X$ (D) Indexed (4) $\quad Z=Y$ (A) $\mathrm{A}-4, \mathrm{~B}-1, \mathrm{C}-2, \mathrm{D}-3$ (B) $\mathrm{A}-3, \mathrm{~B}-1, \mathrm{C}-2, \mathrm{D}-4$ (C) $\mathrm{A}-4, \mathrm{~B}-2, \mathrm{C}-1, \mathrm{D}-3$ (D) $\mathrm{A}-3, \mathrm{~B}-2, \mathrm{C}-1, \mathrm{D}-4$
Computer Organization and Architecture
Machine Instructions, Addressing Modes
Simulate the execution (contents in memory and registers in hexadecimal). Both instructions and data are 16 bits long. The instruction format provides 4 bits for the opcode, and the remaining 12 bits can be directly addressed. The list of opcodes: 0x01 = Load AC from Memory 0x02 = Store AC to Memory 0x03 = Load AC from I/O (e.g. 3005: Load AC from I/O device 5) 0x05 = Add to AC from Memory 0x07 = Store AC to I/O (e.g. 7006: Store AC to I/O device 6) Memory: 200: 3005 201: 5500 202: 2501 500: 0005 501: Assume the value retrieved from device 5 is 0x2. The value in the PC is 200. 3.1. Simulate the execution: List the values in PC, AC, and IR in both fetch and execute cycles for each instruction. (6 points) 3.2. What is the value in address 501 at the end of the execution? (1 point)
Akash M.
A two word instruction is stored in memory at an address designated by symbol W. The address field of the instruction (stored at W+1) is designated by symbol Y. The operand used during the execution of the instruction is stored at an address symbolized by Z. An index register contains the value X. State how Z calculated from other addresses if the addressing mode is the instruction is
Alex L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD