How To Convert Memory Locations To Bytes

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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


Re: How To Convert Memory Locations To Bytes

Quoted text here. Click to load it

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)

Quoted text here. Click to load it

Sure.

--
========================================================================
          Michael Kesti            |  "And like, one and one don't make
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline