Question

I know that 32bit has 32 bit registers and 64bit has 64bit registers but the thing, that I want to know is what are x86 and x86-64 architectures, and are they more advanced as compared to 32bit and 64bit??

Was it helpful?

Solution

32 b versus 64 b

When speaking about 32b versus 64b architecture, you are talking about its register size. It is the size of an address, of a pointer.

The main problem is that 32 b can have only 2^32 ~ 4 × 10^9 different values. Bytes are addressed, so we have 4 GB of addressable memory. Something is reserved for kernel, an ordinary program cannot use it all, not even in theory.

Having larger addresses makes address space size a non-issue. 64b pointers are large enough to handle any memory available even in the future. IIRC 2^64 is more than the estimated number of protons in the universe. I meant Eddington number and it is much larger. But still, 2^64 is really large.

But there is another, practical problem. The addresses are now twice as big, consume twice as much memory. When having lots of them, this is no good. But it is not a show-stopper, just a downside to keep in mind.

x86 and x86_64

First I must make clear that those two architectures have many names. x86 = x86_32 = i686 = IA32 = Intel32 is a 32 b architecture coming from Intel, which was the most popular architecture for desktop systems until not a long ago. By extension x86 means the whole family of backward-compatible architectures, including x86_64. But x86_64 is not from Intel, it is from AMD. You could also see it labeled as amd64 or x64, but do not mistake it for IA64, which is from Intel and was a failure.

With x86_64 not only register size was doubled (it is 64b), but also number of registers available to the program was hugely increased. The new ABI makes full use of the space in registers. Many things that used to be passed on stack between function calls now reside in registers, which reduces number of load/store operations and thus speeds up the computation.

Getting to the point

32 b and 64 b is a characteristic of an architecture. x86 and x86_64 are specific architectures’ names. x86 is generally meant as 32b, x86_64 is 64b.

Is x86_64 more advanced than x68_32? Yes, definitely. As it is backwards-compatible, it can handle everything x86_32 can, but also much more. However the parts or CPU architecture visible to the programmer are not the only ones that matter. Even two x86_64 CPUs can have bug differences in performance.

But this would get too long, better ask a more specific question or look it up somewhere. I’ll just add that most of the dark magic is safely locked away from the programmer, who has the comfort of von Neumann architecture. Under the hood, crazy optimization takes place. The reality is not sequential at all. Compilers and assembler programmers must know what’s going on and cleverly make use of the hidden internal structure of CPU.

OTHER TIPS

x86 is 32-bit and x86-64 is 64-bit.

This really depends. The most advantage of 64-bit machine is it can hold more data with larger address space, support larger memory. The address here is virtual address or physical address range.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top