Skip to main content

32 bit, 64 bit, what all this means ?

Often there is lot of confusion about certain software running only on 32 bit, the operating system being 64 bit etc. ?

I think every computer user must know a little bit of theory as to what the difference between the two really is*.

To be precise, 32 bit / 64 bit has to do with amount of memory (RAM) the processor can address.

Yes, the first thing that we realise is 32 bit / 64 bit originally has to do with the processor more than anything else - software, operating system etc.

If you think this is hard to understand recollect the basics of binary number system. How many different numbers can you represent using 1 bit ? Either the bit can be a zero or a one. Thus I can represent two numbers. How many different numbers can be represented using 2 bits ... four. In general using n bits I can represent 2^n different numbers. Now, for a processor each different number corresponds to a different location on your RAM. Thus a processor which has 32 bits at its disposal can address 2^32 memory locations. If the processor attaches an address to each byte, what that means is that the processor can address a memory of size 2^32 bytes which is 4 GB. Hence, for a 32 bit processor 4 GB is upper bound on the maximum RAM you can install. (Again, people have come up with solutions to extend this a little further ... see PAE or Physical Address Extension). Doing a similar calculation we can see that a 64 bit processor can easily address more that a Tera Byte of RAM.

Now that is about what 32 / 64 bit really means. Then what is it about 32 bit / 64 bit Windows, Linux etc.

While the processor may support 64 bit addressing, a programmer (I am talking about somebody who writes assembly level programs) may not use the capability by not using the assembly instructions that leverage the 64 bit addressing. In fact, he might have copied a program written previously for a 32 bit processor. Thinking on similar lines, it is easy to understand why the software also needs to be "64 bit" to take advantage of the hardware. Hence, there are 64 bit operating systems and 64 bit software applications that run on them.

Another confusion that abounds has to do with the terms - i386, i686, x86, x86_64, AMD64 etc. Again, these terms refer to either the name of a processor, processor family, processor architecture or something of that kind. However, those who are fond of using these terms are not the hardware people, but the software fellows who code the operating systems. They use these terms to indicate what kind of processor the particular version of the operating system has been written (or compiled) for.

Say for example[2],  run
> uname -m
on a linux terminal. If we get i686 or i386 what it means is that the operating system is 32 bit, while x86_64 means a 64 bit operating system.

Yes, that is the easiest way to find out if your linux OS is 32 / 64 bit.

However, I must confess that the world of computer processors and processor architecture seems complicated enough that to arrive at one standard and unifying answer to what 32 bit / 64 bit really stands for is rather optimistic. You may like share in my feelings by reading http://en.wikipedia.org/wiki/Word_%28computer_architecture%29

References:
[1] https://help.ubuntu.com/community/32bit_and_64bit
[2] http://www.howtogeek.com/howto/24842/how-do-i-know-if-im-running-32-bit-or-64-bit-linux-answers/

Comments

  1. http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/139589/i386-i686-x86_64-ppc is also a good resource.

    ReplyDelete

Post a Comment

Popular posts from this blog

Competitive Programming

Programming a Sport ? I didn't know that until today !! I was amazed to look around and find that so many initiatives abound on the internet that aim at popularizing programming. I got started at codechef.com , then watched an amazing inspirational video http://www.codechef.com/school The getting started page launched me into a web of great resources - http://www.codechef.com/getting-started Check every link ! I met two great heros of the sport in that great journey - 'tourist' and 'petr' The latter is elder to me while the former is just 19 now. petr works for Google but is still a great force in the sport. The ACM ICPC is like the olympics of programming where teams participate. Codechef's envision's the Indian team winning some day and the Go-for-Gold section is particularly geared towards that. Codechef also has a school section. Mathewkuttan, Maxwell - what do you think ?