How To Convert Memory Locations To Bytes

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

Reply to
Steve
Loading thread data ...

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
 Click to see the full signature
Reply to
Michael R. Kesti

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.