construct the program for our imaginary computer!   There must be made of at least 5 instructions   There should be at least 3 different types of instructions (write, move, decrement, add, or)

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter3: Hardware: Input, Processing, Output, And Storage Devices
Section: Chapter Questions
Problem 3SAT: The time it takes to perform the fetch instruction and decode instruction steps is called the...
icon
Related questions
Question

  construct the program for our imaginary computer!

  There must be made of at least 5 instructions

  There should be at least 3 different types of instructions (write, move, decrement, add, or)

Write [number] to EAX
This instruction takes the operand number and puts it in the EAX register, overwriting whatever's
already in that location. It takes 3 cycles: one cycle each to fetch, decode, and execute the
instruction. The operand can be in decimal or binary, but it will be converted to binary when it is
put into EAX.
Move from [memory] to [other memory]
This instruction takes the value from the first memory operand and copies it into the other
memory operand, overwriting whatever's in the destination. If the first memory operand is EAX,
it takes 3 cycles (fetch, decode, execute), but if the first memory operand is address 1 or address
2, it takes 4 cycles (fetch, decode, get value from RAM, execute).
Decrement EAX
This instruction subtracts 1 from the value in EAX, storing the result in EAX. It takes 3 cycles:
fetch, decode, and execute. If the value in EAX is 00000000, then the decrement will cause it to
underflow and become 11111111.
Add [memory] to EAX
This instruction takes the value inside of the memory operand (either address 1 or address 2) and
adds it to the number inside of EAX, storing the result in EAX. This takes 4 cycles: fetch,
decode, get the memory value from RAM, and execute the addition. If this would cause the value
in EAX to be greater than 8 bits, it instead just leaves the lowest 8 bits of the result.
OR [memory] with EAX
This instruction takes the value inside of the memory operand (either address 1 or address 2) and
the value inside of EAX and performs a binary OR operation with the two, storing the result in
EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the
OR. (Review section 1.4 from chapter 1 if you don't remember how to perform the binary OR
operation.)
Transcribed Image Text:Write [number] to EAX This instruction takes the operand number and puts it in the EAX register, overwriting whatever's already in that location. It takes 3 cycles: one cycle each to fetch, decode, and execute the instruction. The operand can be in decimal or binary, but it will be converted to binary when it is put into EAX. Move from [memory] to [other memory] This instruction takes the value from the first memory operand and copies it into the other memory operand, overwriting whatever's in the destination. If the first memory operand is EAX, it takes 3 cycles (fetch, decode, execute), but if the first memory operand is address 1 or address 2, it takes 4 cycles (fetch, decode, get value from RAM, execute). Decrement EAX This instruction subtracts 1 from the value in EAX, storing the result in EAX. It takes 3 cycles: fetch, decode, and execute. If the value in EAX is 00000000, then the decrement will cause it to underflow and become 11111111. Add [memory] to EAX This instruction takes the value inside of the memory operand (either address 1 or address 2) and adds it to the number inside of EAX, storing the result in EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the addition. If this would cause the value in EAX to be greater than 8 bits, it instead just leaves the lowest 8 bits of the result. OR [memory] with EAX This instruction takes the value inside of the memory operand (either address 1 or address 2) and the value inside of EAX and performs a binary OR operation with the two, storing the result in EAX. This takes 4 cycles: fetch, decode, get the memory value from RAM, and execute the OR. (Review section 1.4 from chapter 1 if you don't remember how to perform the binary OR operation.)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning