News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

A Quick Lesson on Memory

Farted by screwdriver_clock, August 20, 2010, 05:06:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

screwdriver_clock

WARNING, THE FOLLOWING POST CONTAINS LOTS OF NERD

Computers run using binary. Binary is a system of two digits, 1 and 0, signifying on and off. In short, everything you do on a computer is just flipping switches. Binary is Assembly Language, which is compiled these days by various programming languages.

However, that is not the lesson for today. Data is stored in Binary in bits. There are 8 bits in a byte.


To figure out how much memory an OS can access, there is a simple formula that involves using 2 to the power of the address bus. So hypothetically, lets choose 16bit (Windows 1-2). A 16bit OS could access 2^16 bits of memory (8kb). By time Windows 3.0 came out, they moved to a 32bit architecture, which many people still use today.

A 32bit OS can access 4,294,967,296 bits, or 4194304KB of memory. That is equivalent to about 3.99GB of memory that is accessible to the OS. This is combined memory, which is why putting 4gb of RAM and a 1GB Graphics Card is pointless, since it can't access all of that memory (if you put a 1GB graphics card in, just put 2GB in).

These days, most people are buying 64bit OS's. The memory cap is technically impossible to reach, especially so for consumers. Why? Lets do the math.

64bit Address Bus: 2^64= 1.844674407e^19 bytes.
                          Answer/1024= 1.801439...e^16 kilobytes.
                          *continuous downconverting by 1024*
                          16EB

A 64 bit operating system can technically address 16 exabytes of memory. Which in short, is equal to approximately 16 billion gigabytes.

There is currently development going on in Microsoft on building a 128bit system.

3.403×10^20 EB. 340300000000000000000 EB.


Hope this puts into perspective how awesome technology is.

Loki Clock

If you don't mind, I'd like to add something to this.

Fundamentally, the size (e.g. 32 bits) of a system's address bus is also the basic unit of memory it operates with. This is known as its word size, and a system with a 32-bit unit of memory operates on 32-bit words.

This often cascades into the domain of the programmer. The more low-level you and your language go, and the more you care about memory usage, the more conscious your programming style is required to be of these artifacts and other specifics of machine architecture.

For one example, when trying to flip a single switch among many, one does not actually manipulate bits of these units of memory (change bit #200 from 1 to 0), but rather filters bits of the whole words (change word #200 from 0010->0000) to obtain an analogous result.