Java FAQ _01 Basic Concepts (016) What is the difference between _32 and 64-bit computers

Source: Internet
Author: User

Click to enter _ more _java thousand ask

What is the difference between 1, 32-bit, and 64-bit computers

The 32-bit, 64-bit computer that we typically refer to is the number of CPU bits of the computer. Of course, there are 8-bit, 16-bit CPUs earlier, with the Intel 80x86 series, 8-bit 8080, 16-bit 8086, 8088, 80186, 80286, and 32-bit CPUs starting at 80386, 64 people are familiar with EM64T technology and AMD's x86-64. There are, of course, a lot of differences between the different vendors, but the core is the same: CPU processing power is 64 bits.

This digit refers to the general register of the CPU (Gprs,general-purpose registers, the register can be simply understood as a can be staged instruction, data and address space, CPU operation results will be temporarily placed here) instruction set, addressing capacity.

In general, the most noticeable change in 64-bit CPUs compared to 32-bit CPUs is that the register and instruction pointers are upgraded to 64-bit, memory-addressable to 64-bit, and other changes such as the addition of 8 64-bit general-purpose registers. A higher number of CPUs can be used for a wider range of integer operations while supporting larger memory. Specific as follows:

    • From an operation, a 32-bit processor can handle only 32 bits at a time, which is 4 bytes of data, while a 64-bit processor can handle 64-bit, or 8-byte data at a time.

    • From memory, the traditional 32-bit processor has a maximum addressing space of less than 4G (theoretically 2^32 Physical address), creating a bottleneck for operational efficiency. The 64-bit processor can theoretically reach nearly 17 million terabytes (2^64, to a staggering size).

2. What is the effect of CPU bit size?

A simple example can illustrate the effect of the number of CPU bits, and for a 16-bit CPU, the instruction set can only manipulate 16bit data and 16bit addresses. Different CPU registers, the instruction set is different, must treat differently, here with 8086来 explanation.

Put 16bit data in registers

For example:

MOV AX,1234H         ;向寄存器 AX 传入数据 1234HMOV AH,56H             ;向寄存器 AX 的高 8 位寄存器 AH 中传入数据 56HMOV AL,78H???  ;向寄存器 AX 的低 8 位寄存器 AL 中传入数据 78H

Here to illustrate, the first sentence we store in the AX Register (accumulator register) a 16bit number of 1234H, but the actual ax is composed of Ah, Al two registers, so you can directly manipulate Ah, AL these two 8-bit registers.
If we want to deposit a number more than 16bit in a register, it is not possible under a 16-bit CPU. If you want to handle 16bit of the number, you can only use other registers, segmented processing.

Get data from a 16bit memory address

For example:

MOV  BX,1000HMOV DS, BX????;向DS段寄存器传入1000H,由于8086不支持直接将数据传入段寄存器,所以只能借助其他寄存器传值。MOV AX,[1234H]?    ;将内存地址1000H:1234H中的值读到AX寄存器中

To illustrate here, 8086 of the physical address support each 20-bit address, but because the 16-bit CPU instruction set can only support 16bit, the maximum address space theoretical value is 2^16 (64K), in order to support 2^20 addresses (1M), so it needs to be divided into segment address and offset address, Forms of expression such as 1000h:1234h.

Understanding CPU Physical Address formation look here: [How the CPU physical memory address forms][2]

Java FAQ _01 Basic Concepts (016) What is the difference between _32 and 64-bit computers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.