Connect with us

what is difference between memory address and memory location

Discussion in 'Microcontrollers, Programming and IoT' started by vead, Oct 12, 2013.

Scroll to continue with content
  1. vead


    Nov 27, 2011
    I always confused what is mean of memory address and is mean of memory location
    I want to store four bit of data in to the memory of microcontroller I want to learn basic concept can anyone explain with example
    Last edited: Oct 12, 2013
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    Memory address and memory location are often synonymous.

    If you have virtual memory, paging, or other exotica then there are reasons to (possibly) distinguish between them.

    You might distinguish them by reasoning that the memory address is the way that a particular memory location is identified.

    So an analogy would be a street address vs. a street location.

    A street address might be 33 Main Street. A street location is a particular block, and it might be two blocks down Main Street, then second on the left. This location is identified by an address. Perhaps its address is 33 Main Street.

    So you might say that I will store a number *AT* this memory address, in which case the memory location is found by using that address and the number is then stored *IN* that location.

    Depending on memory addressing, some memory locations can have more than one address, some addresses might not refer to a memory location at all. And some addresses may refer to multiple locations depending on some configuration.

    However, in the simplest case, there is a range of valid memory addresses and these uniquely identify all of your memory locations. In this simple case, the difference in meaning can be largely ignored.
  3. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    Nov 28, 2011
    Very good answer Steve.
  4. foTONICS


    Sep 30, 2011
    Could that be compared to using RP0 and RP1 to select between memory banks on a uController?
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    That is what I had in mind.

    If you look at virtual memory, and the way modern processors can map blocks of physical memory onto virtual addresses you'll see that it can get even more complex.

    CDRIVE Hauling 10' pipe on a Trek Shift3

    May 8, 2012
    Damn! I'm glad I've never dwelled on this. I'm more confused now that you've made me think about it! :p

  7. John Steave

    John Steave

    Sep 9, 2013
    "Memory address is a data concept used at various levels by software and hardware to access the computer's primary storage memory. Memory addresses are fixed-length sequences of digits conventionally displayed and manipulated as unsigned integers. Memory location in a stored-program computer holds a binary number or decimal number of some sort. Its interpretation, as data of some data type or as an instruction, and use are determined by the instructions which retrieve and manipulate it.
  8. gorgon


    Jun 6, 2011
    A memory location is related to the format of the data stored. It can span parts of the data covered by a memory address, to including the data of several addresses.

    It all depends on the architecture of the system in question.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day