ITC544_Assignment 2 PDF

Title ITC544_Assignment 2
Author Himal Rai
Course Computer Organisation and Archhitecture
Institution Charles Sturt University
Pages 5
File Size 211.4 KB
File Type PDF
Total Downloads 107
Total Views 138

Summary

Assignment 2...


Description

Assignment 2: MARIE and ISA

Submitted to: Dr Indra Seher Lecturer, Computer Organisation and Architecture (ITC544) Charles Sturt University

In partial fulfillment of the requirements for the degree of Master of Information Technology (12 subjects)

Sydney, Australia September 29, 2018 Question 1 1. The instruction set consists of 122 different operations. 27 = 128 Therefore, 7 bits are needed for the opcode.

Page 1 of 5

2. As the instruction in this question has only two parts, opcode and address parts. As the whole length is 16, so 16 – 7 = 9 bits. Opcod e 122 7 bits

Address ? 16 – 7 = 9 bits

3. Because of the memory unit with 9 bits, so the maximum allowable size for memory is 29. 4. Each word is 16 bits long. So, the largest unsigned binary number that can be accommodated in one word of memory is 216 – 1. Question 2 ADDRESSIN G MODE Immediate

Direct

Indirect

Indexed

Value loaded Clarification into the operand 1500 AC current value is 500, and the value 1000 will be added to it to implement the Add 1000. Then, 1000 + 500 = 1500 1,900 The value 1400 that is available in address 1000 in memory will be added to the AC current value 500. So, the result will be 1400 + 500 = 1900. 1,800 The value 1400 in address 1000 is address as well. Then, the value 1300 in address 1400 will be added to the AC current value. Then, 1300 + 500 = 1800. 1,500 Address 1000 + Address 200 in base register = 1200. The content 1000 in address 1200 will be added to current AC; 1000 + 500 = 1500.

Question 3 Infix: S = (A + B) - (C + D) Postfix: S = AB + - CD + = AB + CD + For MARIE architecture (1 address ISA),

Page 2 of 5

Load A Add B Store Temp Load C Add D Store Temp Subt Temp Store S For Register architecture (2 address ISA), Load R1, A Add R1, B Load R2, C Add R2, D Subt R1, R2 Store S, R1 For Register architecture (3 address ISA), Add R1, A, B Add R2, C, D Subt S, R1, R2 The instructions length for MARIE is comparatively longer than that for 2 or more registers. So, higher the number of registers, lower the number of times memory is accessed. Short instructions are typically better because they take up less space in memory and can be fetched quickly.

Page 3 of 5

Question 4

a) List the hexadecimal code for each instruction. Load A = 1108 Add B = 3109 Store D = 210B Clear = A000 Output = 6000 Addi D = B10B Store B = 2109 Halt = 7000 Hex 00FC = 00FC Dec 14 = 000E Hex 0108 = 0108 Page 4 of 5

Hex 0000 = 0000 b) Draw the symbol table. Symbo l Start A B C D

Locatio n 100 108 109 10A 10B

c) What is the value stored in the AC when the program terminates? When the program terminates, the value stored in the AC is 0108.

Page 5 of 5...


Similar Free PDFs