0% found this document useful (0 votes)
26 views7 pages

Computer Organisation and Archicture: Muhammad Ahsan STUDENT # 11637212 Teacher'S Name Rajasekaran

The document discusses computer organization and architecture and contains tasks related to memory addressing, instruction formats, and implementing mathematical expressions on different machine architectures. It includes questions about RAM chips, memory addressing, opcode sizes, and writing code to perform an expression on 2-, 1-, and 0-address machines.

Uploaded by

Hagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views7 pages

Computer Organisation and Archicture: Muhammad Ahsan STUDENT # 11637212 Teacher'S Name Rajasekaran

The document discusses computer organization and architecture and contains tasks related to memory addressing, instruction formats, and implementing mathematical expressions on different machine architectures. It includes questions about RAM chips, memory addressing, opcode sizes, and writing code to perform an expression on 2-, 1-, and 0-address machines.

Uploaded by

Hagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

COMPUTER ORGANISATION

AND ARCHICTURE

ASSESMENT NO 4
MARIE and ISA

MUHAMMAD AHSAN
STUDENT # 11637212
TEACHER’S NAME
RAJASEKARAN
MUHAMMAD AHSAN

Task 1:
Answer:
a. How many RAM Chips are necessary?
Number of Rows = 256 x 1024 x 1024 = 256
1024 x 1024
Number of Columns = 128/32 = 4

b. How many RAM Chips are there per memory


word?
This is equals to no of columns = 4

c. How many address bits are needed for each


RAM Chip?

1024k = 2 10 . 2 10 = 2 20
d. How many banks will this memory have?
This is equals to number of rows = 256

e. How many address bits are needed for all


memory?
256M = 2 8 x 2 20 = 2 28 = 28 bits

pg. 2
MUHAMMAD AHSAN

Task 2:

a. How many bits are needed for the opcode?  


Answer:
we need at least 8 bits to cover 250 (28 =256)

b. How many bits are needed to specify the register?


How many bits are left for the address part of the
instruction?
Answer:

248
48 bits = Opcode + Operand
Operend = 48-8 = 40bits

c. What is the largest unsigned binary number


that can be accommodated in one word of

pg. 3
MUHAMMAD AHSAN

memory?
Answer:
248 - 1

Task 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.) 

Answer:

Immediate = 1000 + 500 = 1500


Direct = 1400 + 500 = 1900

Indirect = 1300 + 500 = 1800


Indexed = 1000 + 500 = 1500

pg. 4
MUHAMMAD AHSAN

Task 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.

Answer:
(i) For 2-1

Load R1,B
Add R1,C
Load R2,D
Sub R2, E
Mult R1,R2
Store R1,A

pg. 5
MUHAMMAD AHSAN

(ii) For 1-

Load B
Add C
Store temp
Load D
Sub E
Mult temp
Store A

(iii) For 0
Push B
Push C
Add
Push D
Push E
Sub
Mult
pg. 6
MUHAMMAD AHSAN

Pop A

pg. 7

You might also like