How to find the memory from address range? Really simple. Urgent.

Discussion in 'Homework Help' started by Dorumon, Apr 23, 2010.

  1. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    Like I have H'000000 to H'07FFFF

    So whats the memory size in kb?

    How do u get it?
     
  2. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    What is "07FFFF" hex to decimal?
     
  3. mrmount

    Active Member

    Dec 5, 2007
    59
    7
    Find 07FFF in decimal and you have that many memory addresses. Convert it into kilobytes.
     
  4. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    Erm... 07FFFF = 524287

    So I have 524287 memory address

    So each address has 3 bytes because 1 byte = 8 bits.

    So I have 524287 x 3 = 1572861 bytes

    1572861/1024 = 1535?

    Hey tats wrong.
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The number of addresses and the bits in the memory at each address are not related.
     
  6. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    Erm why? I though we are suppose to find the memory size?

    Okie fine, I know how to find it take the decimal and / 1023, I just don't understand why.
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Google is your friend, try a search like kilo byte. I am sure Wiki has something about it.
     
  8. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    ERM... all I can find is 1 kb = 1024b... how does that has to do with anything?
     
  9. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Ok so you have x number of memory bytes, to find KB you
    x / 1024
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    The number of things in a range can be found from the following relationship
    Code ( (Unknown Language)):
    1.  
    2. (Upper_Limit - Lower_Limit) + 1
    3.  
    Example 1 - How many integers are in the range 3 to 18?
    Answer (18 - 3) + 1 = 16

    Example 2 - How many addresses in the range 0x00000 to 0x7FFFF?
    Answer (0x7FFFF - 0x00000) + 1 = 0x80000
    Convert Hex to Decimal to find
    0x80000(Hex) = 524,288 Bytes

    Example 3 - How many kibibytes are there in 524,288?
    http://en.wikipedia.org/wiki/Kibibyte

    Answer 524,288 / 1024 = 512 Kibibytes

    Example 4 - How many kilobytes are there in 524,288 where "kilo-" has its standard SI meaning
    Answer 524,288 / 1000 = 524.288 kilobytes

    Lastly if you want to multiply by the number of bits in a data word and express the resulting size in bits you can of course do that.

    Clear enough or did I just muddy the waters?
     
  11. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    Ah I see. I understand now.

    Just one thing.

    Isn't each memory address like 3 bytes. Because H'000000

    So how is it we can find the memory just by finding the number of memory address/1024? without multiplying by 3 first?
     
  12. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    I think you may be confusing the number of bytes in the address with the number of bytes at each address. In a byte addressable memory each address corresponds to exactly one byte. Words are located at even addresses and can be either big-endian or little-endian. Similarly long words are at addresses that are a multiple of four and again can be big or little endian
     
  13. Dorumon

    Thread Starter New Member

    Oct 8, 2009
    24
    0
    Thanks thanks, I understand now!
     
Loading...