Click to See Complete Forum and Search --> : What defines program a 64-bit?
maprich
April 26th, 2006, 02:10 PM
So the question is what defines a program as 64-bit or 32-bit exactly?
I know that the 64 bit programs can access more than 4GB of RAM but does this mean that the program uses a totally different set of machine code?
And what happens when 32 bit code is executed in 64 bit processor?
nolxev
April 26th, 2006, 03:00 PM
A program today can't use totally new set of machine code, the most important thing (the critic thing) was always the compatibility, otherwise we have to throw away all programs, games and so forth. The old instruction set have to exist always (as I said for compatibility purpose), they can be implemented in circuits or they can be simulated, but they must exist.
The 64 bit code uses different calling conventions, more expansive register set and access more memory than 32 bit one.
32 bit programs will continue to run on a 64 bit machine/OS due to the work of both OS vendor and AMD (for example), Windows 64 is native 64 bit OS, but when you run a 32 bit application the OS will create an emulation layer called WOW64 that create the interface to run that applications.
Brad Jones
May 2nd, 2006, 08:22 AM
A partial answer to add to Xeon's comments:
The 32 and 64 generally refer to the size of the processor that will be executing the program. A 32 bit processor can process 32 bits of data at a time, a 64 bit processor can process 64 bits at a time.
In some programs such as some implementations of C++, the basic data sizes are based on the number of bits a processor can handle. For instance, an integer is often the size of the processor. In a 32bit program, that would be 32 bits or 4 bytes (byte = 8 bits). In a 64 bit program that would be twice that at 64 bits. Because the data type size is bigger, it can hold larger values.
Brad!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.