32 位和 64 位处理器有什么区别? [英] What is the difference between a 32-bit and 64-bit processor?

查看:39
本文介绍了32 位和 64 位处理器有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试阅读 32 位和 64 位处理器(http://en.wikipedia.org/wiki/32-bit_processing).我的理解是 32 位处理器(如 x86)具有 32 位宽的寄存器.我不确定这意味着什么.所以它有特殊的内存空间"可以存储高达 2^32 的整数值?

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?

我不想听起来很愚蠢,但我对处理器一无所知.我假设 64 位通常比 32 位好.虽然我现在的电脑(一年了,Win 7,Intel Atom)有一个 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.

推荐答案

所有计算都在寄存器中进行.当您在代码中添加(或减去,或其他)变量时,它们会从内存加载到寄存器中(如果它们尚未存在,但是虽然您可以声明无限数量的变量,但寄存器的数量是有限的).因此,拥有更大的寄存器可以让您同时执行更大"的计算.对于常规程序,这种大小差异在实践中并不重要(因为至少我很少操纵大于 2^32 的值),但这就是它的工作原理.

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.

此外,某些寄存器用作指向您的内存空间的指针,因此限制了您可以引用的最大内存量.32 位处理器只能引用 2^32 字节(大约 4 GB 的数据).64 位处理器可以更明显地管理很多.

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.

这篇关于32 位和 64 位处理器有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆