0% found this document useful (0 votes)
157 views

Assembly

The document contains solutions to multiple questions regarding binary, hexadecimal, and memory addressing calculations. Question 1 involves calculating the offset address and segment number given different memory locations and addresses. Question 2 provides the binary, signed decimal, and unsigned decimal values for the number D5B7h. Question 4 asks to perform addition and subtraction in hexadecimal and binary: FE02h + 1E01h = 11C03h, and 10110100b - 10010111b = 00011101b.

Uploaded by

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

Assembly

The document contains solutions to multiple questions regarding binary, hexadecimal, and memory addressing calculations. Question 1 involves calculating the offset address and segment number given different memory locations and addresses. Question 2 provides the binary, signed decimal, and unsigned decimal values for the number D5B7h. Question 4 asks to perform addition and subtraction in hexadecimal and binary: FE02h + 1E01h = 11C03h, and 10110100b - 10010111b = 00011101b.

Uploaded by

Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy