You are on page 1of 3

Assignment # 2

Question: 1

A memory location has a physical address 5BA00h. Compute

a. The offset address if the segment number is 51ACh.


b. The segment number if the offset address is 4D10h.
c. Determine the physical address of a memory location given by
70F6:1BC0h.
a. Solution:-
The General Formula is: Physical address = segment*10 + offset

To find the offset address the formula is: offset = Physical address – segment*10

So,

Offset = 5BA00h – 51ACh*10

Offset = 5BA00h – 51ACh0

Offset = 5BA00h - 51ACh

Offset =56854 Ans.

b. Solution:-
The General Formula is: Physical address = segment*10 + offset

To find the offset address the formula is: segment = (Physical address – offset)/10

So,

Segment = (5BA00h – 4D10h)/10

Segment = 56CF0/10

Segment = 56CF0 Ans.


c. Solution:-
The General Formula is: Physical address = segment*10 + offset

Find Physical address =?

So,

Physical address = 70F6*10 + 1BC0h

Physical address = 70F60 + 1BC0h

Physical address = 72B20h

Question: 2

What is binary representation of D5B7h? Also find the signed and unsigned
decimal interpretation of this number.
The binary representation of D5B7h is (1101 0101 1011 0111)2.

Signed number:-
1101 0101 1011 0111

Take a 1’s Complement: 0010101001001000

Take a 2’s Complement: 0010101001001000+1= 0010101001001001

Unsigned number:-
0010101001001001

=(0*215+0*214+1*213+0*212+1*211+0*210+1*29+0*28+0*27+1*26+0*25+0*24+1*23+0*22+0*21+
1*20)10

= (0 + 0 + 8 192 + 0 + 2 048 + 0 + 512 + 0 + 0 + 64 + 0 + 0 + 8 + 0 + 0 + 1)10


= (8 192 + 2 048 + 512 + 64 + 8 + 1)10
= 10 82510

Question: 4

Perform the following addition or subtraction:

a. FE02h+1E01h
b. 10110100b-10010111b

FE02h+1E01h

Solution:-
FE02

+1E01

------------

11C03

------------

10110100b-10010111b

Solution:-
10110100

-10010111

----------------

00011101

----------------

You might also like