当前位置:网站首页>内存大小端
内存大小端
2022-07-01 08:29:00 【ughome】
long abc = 0x12345678;
abc >>= 8;
printf("%x\n", (unsigned char)abc);
abc >>= 8;
printf("%x\n", (unsigned char)abc);
abc >>= 8;
printf("%x\n", (unsigned char)abc);
0x12345678
在小端机器上的内存分布为78 56 34 12
当右移时在内存窗口表现的是向左移动,比如移动一次变成了 56 34 12 00
这时候整数值位0X00123456
但是当你把他看成char时,他只看第一个字节,也就是0X56了。
边栏推荐
- 機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
- Maneuvering target tracking -- current statistical model (CS model) extended Kalman filter / unscented Kalman filter matlab implementation
- 15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
- 手工挖XSS漏洞
- Luogu p3799 demon dream stick
- Thread safety analysis of [concurrent programming JUC] variables
- NFT监管要点和海外政策
- Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
- Intelligent water conservancy solution
- C basic knowledge review (Part 4 of 4)
猜你喜欢
随机推荐
Principle and application of single chip microcomputer - off chip development
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
Luogu p3799 demon dream stick
基于Gazebo的无人机管道检测
Intelligent water and fertilizer integrated control system
[no title] free test questions for constructor municipal direction general foundation (constructor) and theoretical test for constructor municipal direction general foundation (constructor) in 2022
Audio audiorecord create (I)
SPL-介绍(一)
Vscode customize the color of each area
Provincial election + noi Part III tree problems
Leetcode T40: 组合总和II
C basic knowledge review (Part 4 of 4)
The data analyst will be ruined without project experience. These 8 project resources will not be taken away
Yolov5进阶之七目标追踪最新环境搭建
shardingSphere
機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
Gateway-88
Share 7 books I read in the first half of 2022
网关gateway-88
Leetcode T39: 组合总和



![Thread safety analysis of [concurrent programming JUC] variables](/img/f9/a3604bec6f7e5317dd2c578da73018.jpg)




