What is the difference between a 32-bit and 64-bit processor?

69,506

Solution 1

All calculations take place in the registers. When you're adding (or subtracting, or whatever) variables together in your code, they get loaded from memory into the registers (if they're not already there, but while you can declare an infinite number of variables, the number of registers is limited). So, having larger registers allows you to perform "larger" calculations in the same time. Not that this size-difference matters so much in practice when it comes to regular programs (since at least I rarely manipulate values larger than 2^32), but that is how it works.

Also, certain registers are used as pointers into your memory space and hence limits the maximum amount of memory that you can reference. A 32-bit processor can only reference 2^32 bytes (which is about 4 GB of data). A 64-bit processor can manage a whole lot more obviously.

There are other consequences as well, but these are the two that comes to mind.

Solution 2

First 32-bit and 64-bit are called architectures.

These architectures means that how much data a microprocessor will process within one instruction cycle i.e. fetch-decode-execute

In one second there might be thousands to billions of instruction cycles depending upon a processor design.

32-bit means that a microprocessor can execute 4 bytes of data in one instruction cycle while 64-bit means that a microprocessor can execute 8 bytes of data in one instruction cycle.

Since microprocessor needs to talk to other parts of computer to get and send data i.e. memory, data bus and video controller etc. so they must also support 64-bit data transfer theoretically. However, for practical reasons such as compatibility and cost, the other parts might still talk to microprocessor in 32 bits. This happened in original IBM PC where its microprocessor 8088 was capable of 16-bit execution while it talked to other parts of computer in 8 bits for the reason of cost and compatibility with existing parts.

Imagine that on a 32 bit computer you need to write 'a' as 'A' i.e. in CAPSLOCK, so the operation only requires 2 bytes while computer will read 4 bytes of data resulting in overhead. This overhead increases in 64 bit computer to 6 bytes. So, 64 bit computers not necessarily be fast all the times.

Remember 64 bit windows could be run on a microprocessor only if it supports 64-bit execution.

Solution 3

Processor calls data from Memory i.e. RAM by giving its address to MAR (Memory Address Register). Selector electronics then finds that address in the memory bank and retrieves the data and puts it in MDR (Memory Data Register) This data is recorded in one of the Registers in the Processor for further processing. Thats why size of Data Bus determines the size of Registers in Processor. Now, if my processor has 32 bit register, it can call data of 4 bytes size only, at a time. And if the data size exceeds 32 bits, then it would required two cycles of fetching to have the data in it. This slows down the speed of 32 bit Machine compared to 64 bit, which would complete the operation in ONE fetch cycle only. So, obviosly for the smaller data, it makes no difference if my processors are clocked at the same speed. Again, with 64 bit processor and 64 bit OS, my instructions will be of 64 bit size always... which unnecessarily uses up more memory space.

Solution 4

This answer is probably 9 years too late, but I feel that the above answers don't adequately answer the question.

The definition of 32-bit and 64-bit are not well defined or regulated by any standards body. They are merely intuitive concepts. The 32-bit or 64-bit CPU generally refers to the native word size of the CPU's instruction set architecture (ISA). So what is an ISA and what is a word size?

ISA and word size

ISA is the machine instructions / assembly mnemonics used by the CPU. They are the lowest level of a software which directly tell what the hardware to do. Example:

ADD r2,r1,r3   # add instruction in ARM architecture to do r2 = r1 + r3
               # r1, r2, r3 refer to values stored in register r1, r2, r3
               # using ARM since Intel isn't the best when learning about ISA

The old definition of word size would be the number of bits the CPU can compute in one instruction cycle. In modern context the word size is the default size of the registers or size of the registers the basic instruction acts upon (I know I kept a lot of ambiguity in this definition, but it's an intuitive concept across multiple architectures which don't completely match with each other). Example:

ADD16 r2,r1,r3 # perform addition half-word wise (assuming 32 bit word size)
ADD r2,r1,r3   # default add instruction works in terms of the word size

Example bit-ness of a Pentium Pro CPU with PAE

First, various word sizes in general purpose instrucion:

  • Arithmetic, logical instructions: 32 bit (Note that this violates old concept of word size since multiply and divide takes more than one cycle)
  • Branch, jump instructions: 32 bit for indirect addressing, 16-bit for immediate (Again Intel isn't a great example because of CISC ISA and there is enough complexity here)
  • Move, load, store: 32 bit for indirect, 16 bit for immediate (These instructions may take several cycles, so old definition of word size does not hold)

Second, bus and memory access sizes in hardware architecture:

  • Logical address size before virtual address translation: 32 bit
  • Virtual address size: 64-bit
  • Physical address size post translation: 36 bit (system bus address bus)
  • System bus data bus size: 256 bit

So from all the above sizes, most people intuitively called this a 32-bit CPU (despite no clear consensus on ALU word size and address bit size).

Interesting point to note here is that in olden days (70s and 80s) there were CPU architectures whose ALU word size was very different from it's memory access size. Also note that we haven't even dealt with the quirks in non-general purpose instructions.

Note on Intel x86_64

Contrary to popular belief, x86_64 is not a 64-bit architecture in the truest sense of the word. It is a 32 bit architecture which supports extension instructions which can do 64 bit operations. It also supports a 64-bit logical address size. Intel themselves call this ISA IA32e (IA32 extended, with IA32 being their 32-bit ISA).

References

ARM instruction examples

Intel addressing modes

Solution 5

32bit processors can address a memory bank with 32 bit address with. So you can have 2^32 memory cells and therefore a limited amount of addressable memory (~ 4GB). Even when you add another memory bank to your machine it can not be addressed. 64bit machines therefore can address up to 2^64 memory cells.

Share:
69,506
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    I have been trying to read up on 32-bit and 64-bit processors (http://en.wikipedia.org/wiki/32-bit_processing). My understanding is that a 32-bit processor (like x86) has registers 32-bits wide. I'm not sure what that means. So it has special "memory spaces" that can store integer values up to 2^32?

    I don't want to sound stupid, but I have no idea about processors. I'm assuming 64-bits is, in general, better than 32-bits. Although my computer now (one year old, Win 7, Intel Atom) has a 32-bit processor.

  • cdhowie
    cdhowie over 13 years
    That's one difference, but it's hardly the only difference.
  • Simon
    Simon over 13 years
    you are free to provide a more detailed answer.
  • Dan Byström
    Dan Byström over 13 years
    No, you are confusing the address bus with the data bus. Take for example those good old 8-bit computers like the CBM64. It only had 8 bit registers but were still able to address a 16 bit memory space.
  • Simon
    Simon over 13 years
    of course it is possible to have a machine with smaller registers than address bus with. I was only explaining the dependence between address bus with and the amount of addressable memory.
  • Admin
    Admin over 13 years
    Thanks for the answer. I bought a 32-bit INtel Atom. Why are Intel still making 32-bits when they have 64-bits? Is 32-bits for the lowend?(admittedly my PC is lowend of the market).
  • Evan R.
    Evan R. over 11 years
    This is not always true. The number of bits is the size of each instruction not directly related to the speed
  • Peter Cordes
    Peter Cordes almost 5 years
    64-bit CPUs can do 32-bit loads/stores, and byte load/store. Also, the instruction width is separate from the data width. x86-64 instructions are each 1 to 15 bytes long, same as in 32-bit mode. AArch64 instructions are fixed width 4 bytes, same as 32-bit ARM mode or other RISC CPUs. A modern x86-64 like Skylake can fetch/decode up to 16 bytes per clock cycle. Or if running from the uop cache or loop buffer in a small loop, potentially execute uops from up to 4 * 15 = 60 bytes of x86-64 machine code per cycle, in a hand-crafted case with extra-long single-uop instructions.
  • lousycoder
    lousycoder about 3 years
    If a processor is 64 bit, does that mean the registers are 64 bit wide? Will the same be true about 128 bit processors?
  • tinkerbeast
    tinkerbeast about 3 years
    Assuming the instruction-set has a one to one correspondence with the register size (true for most modern processors) then as per the word size definition, the registers should be at least 64 bit wide for a 64 bit processor. Note that there is no strict definition as mentioned in my post above. The definition is vague and riddled with caveats.
  • lousycoder
    lousycoder about 3 years
    Definitions become vague as technology leapfrogs. All I wanted to know if what I thought makes sense or not and I got the answer. Thank You!
  • Lewis Kelsey
    Lewis Kelsey about 3 years
    @lousycoder the ST (x87) registers are 80 bits wide and the SSE registers are 128 bit and AVX-512 is now 512 bit, and these are instruction set extensions on a 64 bit CPU, so no
  • lousycoder
    lousycoder about 3 years
    I guess I don't know enough!
  • Hargunbeer Singh
    Hargunbeer Singh over 2 years
    @user485498 does no longer manufacture 32-bit processors in 2022 but it surely developed 32-bit processors in 2010 even though 64-bit processors existed to support the other 32-bit processor compatible hardware and software.