Maker Pro
Maker Pro

what is difference between memory address and memory location

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
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:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Could that be compared to using RP0 and RP1 to select between memory banks on a uController?

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
4,960
Joined
May 8, 2012
Messages
4,960
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.

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

Chris
 

John Steave

Sep 9, 2013
4
Joined
Sep 9, 2013
Messages
4
"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.
Thanks!!!!!"
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
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.
 
Top