Solved Computer Organization and Architecture Homework Task

Verified

Added on  2023/06/04

|5
|507
|488
Homework Assignment
AI Summary
This assignment solution covers key concepts in computer organization and architecture. It begins by determining the number of bits required for the opcode and address part of an instruction, along with calculating the maximum allowable memory size and the largest unsigned binary number that can be accommodated. The solution then explores different addressing modes (immediate, direct, indirect, and indexed) and calculates the value loaded into the accumulator for each mode. Furthermore, it presents a MARIE program to realize the expression S = (A+B)(C+D) and compares it with a register-based implementation. Finally, the assignment includes a code snippet with address, hex values, and assembly instructions, along with a symbol table and the final value stored in the accumulator upon program termination. Desklib provides this and many other solved assignments for students.
Document Page
Running head: COMPUTER ORGANIZATION AND ARCHITECTURE
Computer Organization and Architecture
Name of the Student:
Name of the University:
Author Note
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1
COMPUTER ORGANIZATION AND ARCHITECTURE
Answer to question number 1
a. 122 instructions imply that 2^7, hence 7 bits are required for the opcode.
b. The number of bits in a word is 16. Hence the address part is 16 – 7 = 9 bits.
c. Maximum allowable size of the memory is 2^9 bits.
d. 2 ^16 - 1 or 16 ones is the highest number to be allocated in the memory.
Answer to question number 2
1. Immediate Addressing mode
Value added into the accumulator is 1000.
Value in accumulator is 500.
Therefore, the value loaded into the accumulator is 1000 +500 =1500.
2. Direct Addressing mode
Effective address: 1000
Value added into the accumulator is 1400.
Value in accumulator is 500.
Therefore, the value loaded into the accumulator is 1400 +500 = 1900.
3. Indirect Addressing mode
The effective address is the value in 1000 which is 1400.
Therefore, the value added into the accumulator is 1300
Value in accumulator is 500.
Therefore, the value loaded into the accumulator is 1300 +500 = 1800.
4. Indexed Addressing mode
The value of R1 is 200.
Document Page
2
COMPUTER ORGANIZATION AND ARCHITECTURE
The effective address is 1000 + 200 = 1200. Hence the value in 1200 location would
be added to the accumulator.
Value in location 1200 is 1000. Hence the value loaded into the accumulator is 1000 +
500 = 1500.
Answer to question number 3
The following MARIE program can be utilized to realise the expression S = (A+B)-
(C+D).
100 LOAD A
101 ADD B
102 STORE X
103 CLEAR
104 LOAD C
105 ADD D
106 STORE Y
107 CLEAR
108 LOAD X
109 SUBT Y
10A STORE S
10B HALT
Now for the Register memories the following program is to be used:
ADD R1, A, B
Document Page
3
COMPUTER ORGANIZATION AND ARCHITECTURE
ADD R2, C, D
SUBT A, R1, R2
Hence for the first program the system would be required to store the results in three
addresses and for the second program would require only a single memory unit for storing the
data.
Answer to question number 4
a.
Address Hex
100 1108 Start LOAD A
101 3109 ADD B
102 210B STORE D
103 A000 CLEAR
104 F400 OUTPUT
105 B10B ADDI D
106 2014 STORE B
107 7000 HALT
108 0200 A HEX 00FC
109 0014 B DEC 14
10A 0001 C HEX 0108
10B 0000 D HEX 0000
b.
Symbol Location
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
4
COMPUTER ORGANIZATION AND ARCHITECTURE
A 108
B 109
C 10A
D 10B
Start 100
c.
When the program terminates the accumulator would store the value 10A in hex.
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]