开发者

32 vs 64 bit...or, what exactly does 'processing information' mean

开发者 https://www.devze.com 2022-12-24 17:19 出处:网络
I am having trouble understanding the difference between a 32 bit processor and 6开发者_运维技巧4 bit processor. I know that a 32 bit processor can access 32 bits at a time while a 64 bit processor ca

I am having trouble understanding the difference between a 32 bit processor and 6开发者_运维技巧4 bit processor. I know that a 32 bit processor can access 32 bits at a time while a 64 bit processor can access 64 bits at a time. But what exactly does it mean to access a certain number of bits at one time?


I guess the real answer is it's complicated. Metaphor is the only thing besides dedicated study that'll give you a basic idea. Wallyk is on the right track.

A few things drive a processor. One is how many operations it can do per second (measured in Hertz). While architecture prevents a simple answer, a 1Ghz single-core processor performs 1,000,000,000 operations per second. Roughly. While it's possible to get a more concrete answer, it wouldn't clarify this case.

A processor is also other stuff, like a memory controller (in i7), ALU and FPU, and other specialized circuitry, which is what makes even that a hard question to answer.

For your intents and purposes though, every processor has registers. Registers are like scratch space (faster than memory) for a processor to store small amounts of data while it works on it. These are backed up by L1 and L2 (sometimes L3) caches, that are also ridiculously fast. Basically, 64-bit refers to the size of the scratch space (and by proxy, the pipe that connects the register to the cache, as data is loaded in and out all at once).

Bigger scratch space means more can be done without reading in new information from cache or memory. However, just because it can be done doesn't mean it always will. A program generally has to be compiled with 64-bit support to take advantage of the speed-up, and even then you usually won't see a difference unless you're manipulating data larger than 32 bits can store. That's more a question for a systems programmer though.

A processor also needs to keep tabs on what's in memory (as in, what's in use and what's not.) It does this using a special register. The reason why a 32-bit processor can't normally address more than 4GB of RAM has to do with the size of this register. While processor extensions such as PAE allow 32-bit operating systems on 32-bit processors to address as much as 64 Gigabytes of RAM, most OS's don't generally support it.

TL;DR, 64-bit processors give the possibility with correct programming to perform operations on larger chunks of data at once, and address more memory. Other then that, there's not a huge difference.

EDIT: Lest people get the wrong idea, by "operations" I'm not specifically referring to THE operations (addition, multiplication, etc.). My bad, I was focusing on answering the question rather than giving a full introduction to microprocessor architecture.


Basically it means being able to do operations on numbers of such size (adding them for example). Though there is more differences between 32bit and 64bit architectures than this.


I notice you tagged memory, so I'm going with that answer:

In a 32bit processor, the processor can only use 32 bits to address memory. This means there is 2^32 unique combinations, therefore, the processor can only address 2^32 bytes. (4Gb)

In a 64bit processor, the processor can (in theory) use 64 bits to address memory, or 2^64 bytes of addressable memory. I believe that amounts to 16 Exo Bytes, which is a huge amount that is almost to the point of counting the amount of molecules in your machine. In practice though, most CPUs on the line today only let you address 42 bits of physical memory and 48 bits of virtual memory due to current day hardware constraints.


It's not a very precise expression, but I take it to mean the length of memory addresses. For example, 32 bit means 4 GiB (232 bytes) is available to programs.

(For a lark, check out the IBM s390 architecture which is 31 bit.)

Also, it's not always the maximum amount of data that the CPU can read or operate on at a time. For example, the 64-bit AMD/Intel processors have a series of on-chip caches that can pull data from main memory in large chunks. They also have 128-bit SSE registers.


The Wikipedia entry for 64-bit shines some nice light on the topic


It's a measure of processing power. Rather like a vehicle which can carry 4 passengers, or 12, for approximately the same amount of energy.

For example, 32 bits holds 4 bytes, or 4 ordinary characters, and 64 bits is 8 bytes and—for romance languages—eight characters. Those can be manipulated at once for many kinds of operations for the corresponding architectural data width.

Yet another way of looking at it is how big an integer can an architecture directly work with. For each of these widths, the corresponding range is

8 bits: 0 to 255 / -128 to 127
16 bits: 0 to 65,535 / -32768 to 32767
32 bits: 0 to 4,294,967,295 / -2,147,483,648 to 2,147,483,647
64 bits: 0 to 18,446,744,073,709,551,615 / -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

0

精彩评论

暂无评论...
验证码 换一张
取 消