Author:
Joyce Buda

http://theperfecthomework.com/cmis-310-week-4-homework-4/

1. Show how the value ASCII “MIRIAM” is stored in memory in Big Endian and in Little Endian format starting at location 200 hexadecimal. Assume that each memory location stored two ASCII characters.

Memory Location

Big Endian

Little Endian

200

201

202

2. For X = 1000 0110, show the result of the following independent operations (i.e. each instruction occurs with X starting at the value above):

a) Logical Shift left

b) Rotate left

c) Logical Shift right

d) Rotate right

e) Arithmetic Shift right

3 a. Convert the following formula from postfix (Reverse Polish Notation) to infix:

AB+C+D*

3 b.. Convert the following formula from infix to postfix (Reverse Polish Notation):

( A + B * C) / ( D + E * F)

Write code that performsthe computation in problem 3b

( A + B * C) / ( D + E * F)

using CPUs that have the following instruction formats:

You may only use registers A through F, plus X and T.

Registers A through F may not be changed, i.e. their values are fixed.

Register T may be used as a temporary register, and Register X must contain the final answer.

4 a. Three-operand instructions

4 b. Stack instructions

5. Suppose we have the instruction Load 500. Given that memory and register R1 contain the values below:

Assuming R1 is implied in the indexed addressing mode, determine the actual value loaded into the accumulator and fill in the table below:

Mode

Value Loaded into AC

Immediate

Direct

Indirect

Indexed

Tutorial