How To Convert Memory Locations To Bytes

Sep 16, 2004 1 Replies

If your computer has byte-addressable memory locations available for user programs at 10000H to 9FFFFH (with the first location being



10000H and the last one 9FFFFH) how do you determine the total number of bytes available?


If you subtract 10000H from 9FFFFH and convert that to Decimal, would that give you the number of bytes?


Thanks



No, you would be short by one. And you don't have to convert to decimal unless that is how you need the answer. The number of bytes in the address range of 10000H and 9FFFFH is:

(9FFFF - 10000) + 1 = 90000 (hexadecimal) = 589824 (decimal) = 2200000 (octal) = 10010000000000000000 (binary)

Sure.

======================================================================== Michael Kesti | "And like, one and one don't make | two, one and one make one." mkesti@gv.net | - The Who, Bargain

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required