# SOLVED CS401 Assignment 1 Solution and Discussion Spring 2020

• Computer Architecture and Assembly Language Programming (CS401)
Assignment # 01
Total marks = 20

June 1, 2020

RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
• The assignment is submitted after the due date.
• The submitted assignment does not open or file is corrupt.
• Strict action will be taken if submitted solution is copied from any other student or from the internet.
You should concern the recommended books to clarify your concepts as handouts are not sufficient.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc. will not be accepted.
Topic Covered:
• Segmented Memory Model
NOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]

Q 1. Calculate the effective address for the following set of values. (5)
Code Segment = 6032h
BX = 3060h
DI = 4001h
Offset = 0470h

Q 2. Find the physical Address, if segment address is FF01H and offset is FF02H.(7)

Q 3. Calculate the offset when the physical address is 003Ch and the contents of segment register are 003Ah. (8)

“The End”

• Q 3. Calculate the offset when the physical address is 003Ch and the contents of segment register are 003Ah. (8)

Solution:
0x10).
= 0003Ch – (003Ah*0x10)
= 0003Ch - 003A0h
= FC9Ch

• Q 2. Find the physical Address, if segment address is FF01H and offset is FF02H.(7)

Solution:
= (FF01h * 0x10) + FF02h
= FF010h + 0FF02h
= 0EF12h

• Q 1. Calculate the effective address for the following set of values. (5)
Code Segment = 6032h
BX = 3060h
DI = 4001h
Offset = 0470h

Solution:
Effective address = Base + Index + Offset
= 3060h + 4001h + 0470 h
= 74D1h

2

11

2

1

3

74

65

2
| |