64-bit madness

Jskid

Posts: 348   +1
It's been around for a while now and I still don't get it. I tried Waterfox on the premise it was faster than Firefox because it was 64-bit. I didn't notice a difference.

  1. What is a 64-bit CPU
  2. What is a 64-bit operating system
  3. What is a 64-bit program
  4. Do you need all of the above to make a difference? For example would having a 64-bit CPU and 64-bit operating system make 32-bit programs run faster?
 
Do you need all of the above to make a difference?

  1. A 64-bit application requires a 64-bit operating system to run.
  2. A 64-bit operating system requires a 64-bit CPU to run.
  3. A 64-bit operating system will support both 32-bit and 64-bit applications.
  4. A 64-bit CPU will support both 32-bit and 64-bit operating systems.

In order for an application to process 64-bit, the operating system and CPU must first be able to process 64-bit. The easiest way to think of 32-bit vs 64-bit is thinking of them as switches, which in reality they are switches. If an application can process data using 64 switches vs 32 switches, naturally the application would be faster processing 64 switches at a time. Processing one clock cycle of 64 switches, would take two clock cycles to process the same 64 switches 32 switches at a time.
 
I'll also add to Cliffordcooley's excellent explanation that 64bit hardware/software can utilise 32 bit, but not the other way around.

Its slightly offtopic, and contentious at that, but 64-bit OS' can address a greater value of RAM. Most 32-bit OS' are capped to 3.25-4GB of RAM (depending on whether RAM is also being used for the GPU), whereas 64-bit OS' can address as much as 2TB or more, depending on the OS and hardware. I mention this because that has its place in ushering forward adoption of 64-bit hardware and OS'.

For example:
1. Microsoft Windows XP (32-bit) can handle 4GB (64-bit limit is 128GB).
2. Microsoft Windows 7 32-bit is 4GB (Starter is 2GB) and 64-bit 192GB (although Home Prem. limit is 16GB/Home Basic 8GB).
3. Microsoft Server 2008 Datacenter R2 can handle 2TB.
Source.
 
Ok so a 64-bit CPU has a larger address space and can access more RAM. What does the 64-bit (in cpu) refer to? The width of the data bus? Does it mean an instructions set can now have more op-codes? Thanks for the answers, they are really clear.
 
64 bit refers to the instruction blocks ( e.g. registers) that the CPU can process internally- that is, the size of the instruction block (usually referred to as a word) that can be utilized by the CPU internally without being offloaded into memory. A 32 bit CPU would have a much smaller register to work from and thus the degree of computation that can be undertaken is lessened per information block without resorting to external memory- this results in greater latency depending on the structure of the CPU's cache (local memory) structure. All this is greatly dependant upon the software code being utilized.
Virtually any CPU that you can go out and buy is 64-bit capable. I'd suggest you follow the links in the Wikipedia article for a more in depth and complete overview- the subject can get quite esoteric, and explaining one facet necessarily means clarifying a wider base of terms and structure.
 
Is the only time the source code is different is at the assembly level? For example there's no 64bit version of C++. Or would the assembly be the same it would just be able to store larger values (I.e. numbers) in registers? Tangent: only large numbers (including memory locations) would be stored in larger registers, we've already got enough space to store all printable characters in 32bit registers, what else could the space by use for?
 
Applications are either written for 32-bit (as is the case with most), or specifically written for 64-bit (aka 64-bit Photoshop and 64-bit IE, for example).

As far as I understand it, 32-bit applications can't just run as 64-bit themselves, but they can function in a 64-bit environment as long as the OS has both 32-bit and 64-bit binaries installed. That's my limited understanding anyway.
 
Back