SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Linda Null ,julia Lobur
Chapter:
Marie An Introduction To A Simple Computer
Exercise:
Review Of Essential Terms And Concepts
Question:27 | ISBN:9780763704445 | Edition: 3

Question

27. Explain how each instruction in MARIE works.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

 INSTUCTIONS IN MARIE :

  •  A computer’s instruction set architecture (ISA) specifies the format of its instructions and the primitive operations that the machine can perform.
  •  The ISA is an interface between a computer’s hardware and its software.
  •  Some ISAs include hundreds of different instructions for processing data and controlling program execution.
  •  The MARIE ISA consists of only 13 instructions.

​​​​​​​some of the instuctions are :

The Load instruction
 Allows us to move data from memory into the CPU (via the MBR and theAC). All data (which includes anything that is not an instruction) from
memory must move first into the MBR and then into either the AC or theALU; there are no other options in this architecture.
Notice that

  •  The Load instruction does not have to name the AC as the final destination;this register is implicit in the instruction. Other instructions reference the ACregister in a similar fashion.
  •  A transfer from one register to another always involves a transfer onto the bus from the source register, and then a transfer off the bus into the destination register. However, for the sake of clarity, we do not include these bus transfers, assuming that you understand that the bus must be used fordata transfer.

 The Store instruction
Allows us to move data from the CPU back to memory.
 The Add and Subt instructions
● Add and subtract, respectively, the data value found at address X to or from the value in the AC. The data located at address X is copied into the MBR where it is held until the arithmetic operation is executed.

 Input and Output

  •  Allow MARIE to communicate with the outside world.
  •  Input and output are complicated operations. In modern computers, input and output are done using ASCII bytes. This means that if you type in thenumber 32 on the keyboard as input, it is actually read in as the ASCIIcharacter “3” followed by “2.” These two characters must be converted to the numeric value 32 before they are stored in the AC.
  • We are glossing over a very important concept:How does the computer know whether an input/output value is to be treated asnumeric or ASCII, if everything that is input or output is actually ASCII? The answer is that the computer knows through the context of how the value is used.

The Halt command  causes the current program execution to terminate.

 The Skipcond instruction

  •  Allows us to perform conditional branching (as is done with “while” loops or “if” statements).
  •  When the Skipcond instruction is executed, the value stored in the AC must be inspected.Two of the address bits (let’s assume we always use the two address bits closest to the opcode field, bits 10 and 11) specify the condition to be tested.

 

 

0 0

Discussions

Post the discussion to improve the above solution.