what is memory addressing ?

C

cnoe

well, I'm a bit confusing about memory addressing

lets see if the processor is 32bit

the maximum memory it can handle is 4294967296bits

that's 4GB of memory.

how is this possible ?

can you please explain it, in an easy way ?


Thanks.
 
V

vippstar

well, I'm a bit confusing about memory addressing

lets see if the processor is 32bit

the maximum memory it can handle is 4294967296bits

that's 4GB of memory.

No it's not
how is this possible ?
Miscalculation

can you please explain it, in an easy way ?

Ask about the particular processor you are interested in, at the
appropriate newsgroup for that processor.
 
H

Harold Aptroot

cnoe said:
well, I'm a bit confusing about memory addressing

lets see if the processor is 32bit

the maximum memory it can handle is 4294967296bits

Bytes, not bits
Knowing that may make it easier to understand
that's 4GB of memory.

how is this possible ?

Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.

There are also tricks like PAE, but that's complicated..
can you please explain it, in an easy way ?


Thanks.

Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.
 
C

cnoe

Bytes, not bits
Knowing that may make it easier to understand





Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.

There are also tricks like PAE, but that's complicated..





Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.

yes I got it ? Thanks

let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right

Then 2^4 =16bits


now can any one here explain it, a bit clear.

thanks
 
L

Luuk

cnoe schreef:
Bytes, not bits
Knowing that may make it easier to understand



Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.

There are also tricks like PAE, but that's complicated..



Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.

yes I got it ? Thanks

let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right

Then 2^4 =16bits


now can any one here explain it, a bit clear.

thanks

you should use Google more...

look at:
http://en.wikipedia.org/wiki/Intel_4004

it says:
12-bit addresses

so, you can address 2^12 =
(according to http://www.google.nl/search?hl=nl&q=2+^+12&meta=)
4096
 
C

cnoe

cnoe schreef:


yes I got it ? Thanks
let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right
Then 2^4 =16bits
now can any one here explain it, a bit clear.

you should use Google more...

look at:http://en.wikipedia.org/wiki/Intel_4004

it says:
12-bit addresses

so, you can address 2^12 =
(according tohttp://www.google.nl/search?hl=nl&q=2+%5E+12&meta=)
4096

well, these days kinda I'm hearing 32 bit OS, 64 bit [vista]

so, a 64 bit can handle exabytes of memory, my doubt is

exactly here ?

2^32 =4GB, 2^64 =16EiB


what's all these stuff here ?
 
L

Luuk

cnoe schreef:
cnoe schreef:


well, I'm a bit confusing about memory addressing
lets see if the processor is 32bit
the maximum memory it can handle is 4294967296bits
Bytes, not bits
Knowing that may make it easier to understand
that's 4GB of memory.
how is this possible ?
Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.
There are also tricks like PAE, but that's complicated..
can you please explain it, in an easy way ?
Thanks.
Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.
yes I got it ? Thanks
let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right
Then 2^4 =16bits
now can any one here explain it, a bit clear.
thanks
you should use Google more...

look at:http://en.wikipedia.org/wiki/Intel_4004

it says:
12-bit addresses

so, you can address 2^12 =
(according tohttp://www.google.nl/search?hl=nl&q=2+%5E+12&meta=)
4096

well, these days kinda I'm hearing 32 bit OS, 64 bit [vista]

so, a 64 bit can handle exabytes of memory, my doubt is

exactly here ?

2^32 =4GB, 2^64 =16EiB


what's all these stuff here ?

you should not ask here,
this group is about programming in C,
try comp.sys.intel
 
C

cnoe

cnoe schreef:


cnoe schreef:
well, I'm a bit confusing about memory addressing
lets see if the processor is 32bit
the maximum memory it can handle is   4294967296bits
Bytes, not bits
Knowing that may make it easier to understand
that's 4GB of memory.
how is this possible ?
Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.
There are also tricks like PAE, but that's complicated..
can you please explain it, in an easy way ?
Thanks.
Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.
yes I got it ? Thanks
let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right
Then 2^4 =16bits
now can any one here explain it, a bit clear.
thanks
you should use Google more...
look at:http://en.wikipedia.org/wiki/Intel_4004
it says:
12-bit addresses
so, you can address 2^12 =
(according tohttp://www.google.nl/search?hl=nl&q=2+%5E+12&meta=)
4096
well,  these days kinda I'm hearing 32 bit OS, 64 bit [vista]
so, a 64 bit can handle exabytes of memory, my doubt is
exactly here ?
2^32 =4GB, 2^64 =16EiB
what's all these stuff here ?

you should not ask here,
this group is about programming in C,
try comp.sys.intel

@ Luuk thanks for the link, I'll ask them
 
B

Barry Schwarz

yes I got it ? Thanks

let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right

Then 2^4 =16bits


now can any one here explain it, a bit clear.

You are confusing the size of one unit of memory with the size of the
address bus. On my system, a byte is eight bits but the address bus
is either 24, 31, or 64 bits wide under program control.

Is there a C question somewhere in this discussion.
 
B

Barry Schwarz

cnoe schreef:


cnoe schreef:
well, I'm a bit confusing about memory addressing
lets see if the processor is 32bit
the maximum memory it can handle is   4294967296bits
Bytes, not bits
Knowing that may make it easier to understand
that's 4GB of memory.
how is this possible ?
Well you need to give every byte a different address (how else would you
keep them apart?) so if you have 32 bits for the address you can make 1<<32
different addresses (including zero). Any bytes of memory in excess of that
will not have a unique address, so you can't use them.
There are also tricks like PAE, but that's complicated..
can you please explain it, in an easy way ?
Thanks.
Easy way? Memory is just a big array of chars, so you can't index anything
higher than your highest possible index (as determined by the type of the
index). If you try to go higher, your index overflows back to zero.
yes I got it ? Thanks
let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right
Then 2^4 =16bits
now can any one here explain it, a bit clear.
thanks
you should use Google more...
it says:
12-bit addresses
so, you can address 2^12 =
(according tohttp://www.google.nl/search?hl=nl&q=2+%5E+12&meta=)
4096
well,  these days kinda I'm hearing 32 bit OS, 64 bit [vista]
so, a 64 bit can handle exabytes of memory, my doubt is
exactly here ?
2^32 =4GB, 2^64 =16EiB
what's all these stuff here ?

you should not ask here,
this group is about programming in C,
try comp.sys.intel

@ Luuk thanks for the link, I'll ask them

When you do, you might want to be a little more precise. 2^32 is 4
GiB. What do you mean by "all these stuff"?
 
C

Chad

yes I got it ? Thanks
let's take the first processor from Intel[ I think it's 4 bit, not
sure ], if I'm right
Then 2^4 =16bits
now can any one here explain it, a bit clear.

You are confusing the size of one unit of memory with the size of the
address bus. On my system, a byte is eight bits but the address bus
is either 24, 31, or 64 bits wide under program control.

Is there a C question somewhere in this discussion.

I'm assuming that the size of one unit of memory could be a reference
to the data bus (vs the address bus). Of course I don't really see how
this is relevant to the C programming language. With that, I think I'm
going to just go back to being a silent observer.
 
A

Andrew Smallshaw

Bytes, not bits
Knowing that may make it easier to understand

This isn't a fundamental law of nature. Assuming that addresses
fit into a single word then a 32 bit processor can address 2^32
addresses. On a desktop machine addresses are usually in units of
bytes but this is not universal - DSP chips often use their word
size as the addressable unit, so a 32 bit machine could address 16
GB, although it could only do this 32 bits at a time and additional
logic is needed to isolate individual bytes in the same way that
extra code is needed to get at individual gits within a byte on
more mainstream processors.
 
H

Harold Aptroot

Andrew Smallshaw said:
This isn't a fundamental law of nature. Assuming that addresses
fit into a single word then a 32 bit processor can address 2^32
addresses. On a desktop machine addresses are usually in units of
bytes but this is not universal - DSP chips often use their word
size as the addressable unit, so a 32 bit machine could address 16
GB, although it could only do this 32 bits at a time and additional
logic is needed to isolate individual bytes in the same way that
extra code is needed to get at individual gits within a byte on
more mainstream processors.

Nothing is ever universal.. But would you say it would have helped the OP to
complicate it even further?
 
B

Bartc

cnoe said:
look at:http://en.wikipedia.org/wiki/Intel_4004

it says:
12-bit addresses

so, you can address 2^12 =
(according tohttp://www.google.nl/search?hl=nl&q=2+%5E+12&meta=)
4096

well, these days kinda I'm hearing 32 bit OS, 64 bit [vista]

so, a 64 bit can handle exabytes of memory, my doubt is

exactly here ?

2^32 =4GB, 2^64 =16EiB

It doesn't always follow that if you have an N-bit processor, it can also
address 2^N bytes of memory.

It could be more, or less, for various reasons. And whatever the number of
addressable bytes, there might be less (or sometimes more) available bytes
of memory, for various other reasons.

So, it depends.

Hope that helped...
 
C

cnoe

well,  these days kinda I'm hearing 32 bit OS, 64 bit [vista]
so, a 64 bit can handle exabytes of memory, my doubt is
exactly here ?
2^32 =4GB, 2^64 =16EiB

It doesn't always follow that if you have an N-bit processor, it can also
address 2^N bytes of memory.

It could be more, or less, for various reasons. And whatever the number of
addressable bytes, there might be less (or sometimes more) available bytes
of memory, for various other reasons.

So, it depends.

Hope that helped...

@ Bartc
and
@ all, thanks for the replies.
I got it.
 
S

S M Ryan

cnoe said:
well, I'm a bit confusing about memory addressing

lets see if the processor is 32bit

the maximum memory it can handle is 4294967296bits

Usually the size of an address is the size of an integer, 32 bits in this case.
This means an address can distinguish 2^32 distinct addresses, 2^32 =
4294967296, so there can be this many addressable memory units.

On most processors today, the addressable memory unit is an 8-bit byte.

Sometimes the address is larger than an integer; this upsets programmers.
Sometimes the address is smaller than an integer, such as an old 60 or 64 bit
processors.
Sometimes the addressable unit is bit (Cy205); sometimes it is a word (60 bits
for Cy170 CPU, 12 bits for PDP-8).
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top