Computer Organization and Architecture Homework

Verified

Added on  2020/03/23

|5
|611
|93
Homework Assignment
AI Summary
This assignment covers various topics in Computer Organization and Architecture, including calculations for RAM chips, opcode requirements, and different addressing modes. It also includes code implementations for specific expressions on different types of machines.
Document Page
Running head: ORGANIZATION AND ARCHITECTURE
Computer Organization and Architecture
[Student Name]
[University Name]
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
ORGANIZATION AND ARCHITECTURE
1. Suppose that a 256M * 128 Memory built using 1024 K *32 RAM Chips
and memory is word addressable. [10 marks]
a. How many RAM Chips are necessary?
256 KB is required which is equals to 256*1024*128 bits
ram chip capacity = (32*1024)
So, the total number of RAM chip needed is (256 * 1024 * 128)/(32 * 1024) = 1024
b. How many RAM Chips are there per memory word?
256 KB is required which is equals to 256*1024*8 bits
ram chip capacity = (32*1024)
So, the total number of RAM chip needed is (256 * 1024 * 8)/(32 * 1024) = 64
c. How many address bits are needed for each RAM Chip?
Required RAM chip = 1024 = 2^30. (Hence address bits needed for each RAM chip
required are 30.)
d. How many banks will this memory have?
Total bank available in memory is 256/32 = 8
e. How many address bits are needed for all memory?
Total number of required Address = 1024/32 = 32
Document Page
2
ORGANIZATION AND ARCHITECTURE
2. A digital computer has a memory unit with 48 bits per word. The
instruction set consists of 240 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. [2+2+2 = 6
marks].
a. How many bits are needed for the opcode?
16 bits.
b. How many bits are needed to specify the register? How many bits are left for the
address part of the instruction?
32 bits and this can be deployed according to the supplies of the users.
c. What is the largest unsigned binary number that can be accommodated in one
word of memory?
2^48 -1.
3. 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.)
Assuming R1 is implied in the indexed addressing mode, determine the actual
value loaded into the accumulator (AC) using the following addressing modes:
Document Page
3
ORGANIZATION AND ARCHITECTURE
i) Immediate
Immediate addressing is 1000 + 500 = 1500 and stored in accumulator.
ii) Direct
Direct addressing mode is 1400 + 500 =1900 and it is stored in accumulator.
iii) Indirect
Hence 1300 + 500 =1800 which is loaded in accumulator
iv) Indexed
1000 + R1 = 1200
The value located in 1200 is 1000. So the value will be 1000+500 = 1500
4. Write code to implement the expression: A= (B + C) * (D - E) on 2-, 1- and
0-address machines. In accordance with programming language practice,
computing the expression should not change the values of its operands.
2 – addressing machine
MOV R1, B
ADD R1, C
MOV R2, D
SUB R2, E
MUL R1, R2
MOV A, R1
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
ORGANIZATION AND ARCHITECTURE
1 – addressing machine
LOAD B
ADD C
STORE T
LOAD D
SUB E
MUL T
STORE A
0 - addressing machine
PUSH B
PUSH C
ADD
PUSH D
PUSH E
SUB
MUL
POP A
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]