当前位置:网站首页>Size end byte order
Size end byte order
2022-06-27 12:43:00 【xiongsiyu979】
One 、 What is size side byte order
data-high : for example 16 Hexadecimal number 0x123456789,0x12 That is, the high-order data , relative ,0x89 Is the low order of data
High address space : For example, the following address 0x00000002 Is the upper address space , relative , Address 0x00000001 Is the lower address space

Small endian byte order (LSB): Store the high bits of data in the high address space
Big endian byte order (HSB): Store the high bits of data in the low address space
summary : Small end sequence , Large end reverse order
- The order It refers to the high-low bit order of data and the high-low order of address In the same direction
- The reverse It refers to the high-low bit order of data and the high-low order of address In the opposite direction


Two 、 Code testing
- Different cpu( The big and small end is made up of cpu Decisive ) There are different strategies for storing data :
- Use the following code to determine what byte order the computer uses
#include <stdio.h>
int main()
{
int a = 0x12345678;
char *b = (char *)&a;// Use char The type pointer is a value that you want to take only 1Byte
if(*b == 0x12)
printf(" Big end \n");
else if(*b == 0x78)
printf(" The small end \n");
return 0;
}

- Usually computers use small endian byte order to store data , The data transmission in the network adopts large end byte order
边栏推荐
- application.properties 的配置信息
- PyCharm汉化
- Script defer async mode
- 二叉树的三种遍历方式
- Time management understood after being urged to work at home
- C语言 函数指针与回调函数
- 秒云荣获《2022爱分析 · IT运维厂商全景报告》智能运维AIOps市场代表厂商
- 【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(三)
- nmcli team bridge 基本配置
- Uni app sends request instructions using the escook / request miniprogram plug-in
猜你喜欢

esp32s3 IPERF例程测试 esp32s3吞吐量测试

What's the matter with Amazon's evaluation dropping and failing to stay? How to deal with it?
![[on Nacos] get started quickly](/img/cc/af4ab640952b880595a89f66688ff5.jpg)
[on Nacos] get started quickly

大小端字节序

printf不定长参数原理

SSH workflow and principle

Word text box page feed

JMeter connection DM8

How to participate in openharmony code contribution

浅谈软件研发的复杂性与效能提升之道
随机推荐
浅谈珂朵莉树
Topic38——56. Consolidation interval
大小端字节序
ACL 2022 | 中科院提出TAMT:TAMT:通过下游任务无关掩码训练搜索可迁移的BERT子网络
浏览器cookie转selenium cookie登录
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (II)
Thymeleaf的相关知识
nifi从入门到实战(保姆级教程)——身份认证
Mathematical knowledge -- ideas and examples of game theory (bash game, Nim game, wizov game)
【粉丝福利】今天给大家介绍一个白捡钱的方法-可转债,本人亲自验证,每年每人能获利1500元
uniapp下拉弹层选择框效果demo(整理)
【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(三)
消息队列的使用
Thymeleaf的配置
A brief talk on cordola tree
What is the next step in the recommendation system? Alispacetime aggregates GNN, and the effect is to sling lightgcn!
Configuration of thymeleaf
消息隊列的使用
The world's fastest download tool XDM
二叉树的三种遍历方式