Get the App
SLTechnology News&Howtos  ›  Development  › 

How to understand the size-side mode of CPU

Shulou Source: shulou.com Published: 2022-06-02 11:03:34 10月04日 Update

This article is about how to understand the large and small end model of CPU. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.

The definition of the large and small end mode is clearly stated in the Baidu encyclopedia, which means that the high order of the data is stored in the address is the low end mode, and the high order of the data is stored in the low order of the address is the small end mode. I don't know when I say it. What we are talking about here is the size mode of CPU rather than the size of the communication protocol. It is important to keep in mind that the mainstream CPU is small-end mode such as arm, and the representative of large-end mode is c51 series. Another thing to know is how to measure what the current platform is. Generally speaking, there are two popular methods: one is to use union, but this method is also based on pointers. In fact, if you can understand the methods of pointer measurement, you can write a common body. The method of measurement is as follows

Int axi1

Char b

B = (char) (& a)

If the value of b is also 1, it is proved to be the small-end mode, and if the value of b is 0, then it is the big-end mode. Because in big-end mode, the 1 is stored in the fourth byte, and we read the first byte.

The above is how to understand the large and small end mode of CPU. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Mode size that is method big end storage measurement low order address byte pointer data more knowledge article high order practical clear generally speaking mainstream Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Docker vpn Redmi Microsoft