ITC544 - MARIE Instruction Set Architecture and Addressing Modes

Verified

Added on Ā 2023/06/03

|4
|559
|493
Homework Assignment
AI Summary
This assignment solution provides a detailed walkthrough of MARIE (Machine Architecture that is Really Intuitive and Easy) instruction set architecture (ISA) concepts. It addresses questions related to opcode and address bit allocation, memory size, and the largest unsigned binary number that can be accommodated in a memory word. Furthermore, it explores different addressing modes, including immediate, direct, indirect, and indexed, demonstrating how each mode affects the value loaded into the accumulator. The solution also includes an analysis of memory access optimization using different numbers of registers, along with the generation of hex codes and a symbol table for a given program. The final value in the accumulator after program termination is also determined. Desklib offers a wealth of similar solved assignments and past papers to aid students in their studies.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someoneā€™s learning journey. Share your documents today.
Document Page
Name:
Student ID:
Subject Code: ITC 544
Assignment 2: MARIE & ISA
Page 1 of 4
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1.
1. As 27 = 128
26 = 64
The instructions are 122
122 > 64 and 122 < 128.
Hence, bits needed for people are 7.
2. Word bits = 16 bits.
Opcode bits = 7 bits.
Address bits = Word bits ā€“ Opcode bits
= 16 ā€“ 7
= 9 address bits.
3. While writing an instructions, memory can be accessed for any address because using any
address the memory can be accessed. 29 is the maximum allowable size as to represent the
address in any instructions, we only have 9 bits.
4. 216 ā€“ 1.
2.
1. Immediate:
For this, the immediate value is the operand for this instruction.
AC + 1000
= 500 + 1000
= 1500
1500AC will be the value.
2. Direct:
For this, in the instructions, the effective address is the operand.
AC + M[1000]
= 500 + 1400
= 1900
1900AC is the value.
3. Indirect:
For this, the effective address of the operand is at the address which is in the instruction.
= AC + M[ [1000] ]
= AC + M[1400]
= 500 + 1300
= 1800
1800AC is the value.
4. Indexed:
For this, the offset mentioned in instruction from the R1 register is the effective address of the
operand.
Page 2 of 4
Document Page
= AC + M[R1 + 1000]
= AC + M[200 + 1000]
= AC + M[1200]
= 500 + 1000
= 1500
1500 AC will be the value.
3. (A+B) ā€“ (C+D)
Using less than 4 registers, below are the steps to solve equations
LOAD A
ADD B
STORE TEMP
LOAD C
ADD D
STORE TEMP2
LOAD TEMP
SUB TEMP2
STORE SUM
9 memory accesses, are used in the above steps.
To solve the equation using 4 registers below are the steps
LOAD R1, A
LOAD R2, B
ADD R1, R2
LOAD R3, C
LOAD R4, D
ADD R3, R4
SUB R1, R3
STORE Sum
5 memory accesses are used in the above steps.
Using 2 different number of registers, from the above steps. it is proved that the less number
of memory accesses will be required, the more the number of registers are present.
4.
1. Hex codes
Hex Address Label Instruction Hex Codes
100 Start LOAD A 1108
101 ADD B 3109
102 STORE D 210B
103 CLEAR A000
104 OUTPUT 6000
105 ADDI D B10B
106 STORE B 2019
107 HALT 7000
108 A, HEX 00FC 00FC
109 B, DEC 14 000E
Page 3 of 4
Document Page
10A C, HEX 0108 0108
10B D, HEX 0000 0000
2. Symbol Table
Symbol Address
A 108
B 109
C 10A
D 10B
3. At the time of program termination 266 is the value in AC.
Page 4 of 4
chevron_up_icon
1 out of 4
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]