The simple introduction of C language CPU and register

Source: Internet
Author: User

One, the composition of the CPU

The CPU is divided into 4 major components, namely:

Register Device Controller Arithmetic Device Clock
Some values can be staged to store data (equivalent to memory in the CPU) Control register to read and write and replace operations Auxiliary Unit, is the Coordinator The clock is the CPU that determines the speed of the
In these four components, we programmers will use the most is the register, so the next focus on the register.

Second, register

The CPU registers of a modern computer roughly have the following types, or a table to represent

Accumulator Flag Register Program Counter Base Address Register
The fastest to do the cumulative operation Use 32-bit space to record the various states of the CPU, such as the fourth Zero of the logo bit can be used as a logic of true and false judgments, there are other bits can record overflow or some other state Store the address of the next instruction The starting position of the current data memory
Variable Address registers Universal Registers Instruction Registers Stack Registers
The relative position of the storage memory, that is, the offset from the base address, used with the base address register, base + change = Actual memory address In layman's parlance, what can be done, programmers use the most registers Storage instructions for CPU internal use only, external cannot operate The starting position of the record stack
I don't know much about them, so I just remember them.

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.