Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CS401-Computer Architecture and Assembly Language Total marks = 20

Assignment Solution # 01 Deadline


th
Semester: SPRING 2023 22 of May 2023

Please Carefully Read the Following instructions before attempting the Assignment
Solution

NOTE
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file before submitting copy
paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment/GDB check your assignment requirement file.

For any query, feel free to Contact at Whatsapp:


+923074960034

Provide by M.JUNAID QAZI

Q No1: 15 Marks
Write an assembly language program to store your Roll Number(Number part only) and calculate their
sum. Print a message on the screen that shows that the received number is even or odd.
Answer:

Code:

CONTACT ON WHATSAPP
+923074960034
CONTACT ON WHATSAPP
+923074960034
Output:

CONTACT ON WHATSAPP
+923074960034
Q No 2: 05 Marks
Find the offset address where Physical address is 4A37Bh and the segment address is 40FFh

Answer:

The formula to calculate the offset address is:

Offset Address = (Segment Address × 16) + Physical Address

Let's calculate it:

Segment Address: 40FFh

Physical Address: 4A37Bh

Converting the Segment Address to decimal: 40FFh= 16639

Converting the Physical Address to decimal: 4A37Bh-303995

Now, we can use the formula to find the offset address:

Offset Address = (16639 × 16)+303995

Offset Address = 266224 +303995

Offset Address=570219

Every assignment/GDB is change due to unique Student ID so Don’t Copy


That is truly perfect step by step idea solution get help easily.

M.juniad Qazi
WHATSAPP +923074960034

CONTACT ON WHATSAPP
+923074960034

You might also like