Вы находитесь на странице: 1из 3

Assignment 2: MARIE and ISA

Value: 15%
Due Date: 30-Sep-2018
Return Date: 18-Oct-2018
Length:
Submission method options: Alternative submission method
Task
Question 1:
A digital computer has a memory unit with 16 bits per word. The instruction set consists of
122 different operations. All instructions have an operation code part (opcode) and an address
part (allowing for only one address). Each instruction is stored in one word of memory. [10
marks]

1. How many bits are needed for the opcode?


2. How many bits are left for the address part of the instruction?
3. What is the maximum allowable size for memory?
4. What is the largest unsigned binary number that can be accommodated in one word of
memory?

Question 2:
Consider an instruction Add 1000. Memory contents, Accumulator (AC), and R1 Register
contents are depicted in the below figure: (such as memory address 1000 contains a value
1400, memory address 1100 contains a value 400 etc. All the numbers used here are
decimals.) [8 marks]

Assuming R1 is implied in the indexed addressing mode, determine the actual value
loaded into the accumulator (AC) using the following addressing modes:

1. Immediate
2. Direct
3. Indirect
4. Indexed

Question 3:
More registers appears to be a good thing, in terms of reducing the total number of memory
accesses a program might require. Using the arithmetic expression S = (A+B)-(C+D), support
this statement. [Hints: First, determine the number of memory accesses necessary using
MARIE and the two registers for holding memory data values (AC and MBR). Then perform
the same arithmetic computation for a processor that has more than three registers (for
example, R1, R2, R3, R4) to hold memory data values.] [6 marks]

Question 4:
Assemble the MARIE program below. [6 marks]

Hex Address Label Instruction


100 Start LOAD A
101 ADD B
102 STORE D
103 CLEAR
104 OUTPUT
105 ADDI D
106 STORE B
107 HALT
108 A, HEX 00FC
109 B, DEC 14
10A C, HEX 0108
10B D, HEX 0000

a) List the hexadecimal code for each instruction [2 marks]


b) Draw the symbol table [2 marks]
c) What is the value stored in the AC when the program terminates? [2 marks]

Marking criteria and standards

Criteria HD (85%- DI (75%- CR (65%- PS (50%-64%) FL (0%-


100%) 84%) 74%) 49%)

Correct Answers are Answers are Answers are Student Incorrect


Calculation in correct and correct, an correct, an demonstrates the answer with
Q1 and Q2 clearly show omission of omission of understanding, no
the few many however, the demonstration
calculations calculations. calculations. calculations are of
incorrect. understanding
the topic.
Correct steps Assembly Assembly Assembly Student Incorrect
in assembly Program is Program is Program is demonstrate the program with
code in Q3 correct and correct, an correct, an understanding in no
clearly show omission of omission of writing assembly demonstration
the steps few steps many steps program related of
to each understanding
architecture, the topic.
however, the
steps are
incorrect.

Correct Answers are Answers are Answers are Student Incorrect


Answer in Q4 correct in a, b, correct, correct, an demonstrates the program with
and c omission of omission of understanding, no
one of three two of three however, the demonstration
branches branches results in 3 of
branches are understanding
incorrect. the topic.

Total marks available = 5 marks · Answers are


incorrect
Subtract the marks are set in marking criteria for each incorrect
or missing instruction value in the code assembly;
Subtract 1 mark for each incorrect or missing symbol;

Вам также может понравиться