Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 RAM addresses
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dcvg




PostPosted: Thu Sep 17, 2009 10:48 pm   Post subject: RAM addresses

My understanding is that each address in RAM can store 32 bits but how many addresses are there in RAM?
Sponsor
Sponsor
Sponsor
sponsor
OneOffDriveByPoster




PostPosted: Fri Sep 18, 2009 8:25 am   Post subject: Re: RAM addresses

An address in RAM can store different numbers of bits depending on the architecture of your system. Most systems are byte-addressable and have 8-bit bytes. When you ask about the number of addresses in RAM, you may be asking about: http://en.wikipedia.org/wiki/Virtual_address_space
Tony




PostPosted: Fri Sep 18, 2009 8:31 am   Post subject: RE:RAM addresses

I'm pretty sure that one can address an exact byte of memory ( http://en.wikipedia.org/wiki/Byte_addressing ), although addresses might be incrementing in blocks of 4 (or another amount) for convenience.

The address space will depend on the system. A 32 bit architecture would have 32 bits to describe an address, thus 2**32 = 4 GB.

[edit]but that would be the virtual address space, as OneOffDriveByPoster points out above.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: Fri Sep 18, 2009 10:51 am   Post subject: RE:RAM addresses

What Tony is referring to is called "Unaligned Access" - accesses to memory that are not aligned on the standard 4-byte (32-bit) boundaries (or, on 64-bit machines, 8-byte boundaries). On some architectures these are directly possible; on others, they're emulated by getting the block(s) required and editing them on the CPU with bit-shift and OR operations.

Also worth noting is that large sections of the addressing space are typically reserved for things like hardware-device addressing (mostly graphics cards here) and the OS's own data structures.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: