当前位置:网站首页>内存大小端
内存大小端
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了。
边栏推荐
- Transaction method call @transactional
- Review of week 280 of leetcode
- Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
- Vscode customize the color of each area
- Audio-AudioRecord create(一)
- CPU设计实战-第四章实践任务一简单CPU参考设计调试
- P4 安装bmv2 详细教程
- 分享2022上半年我读过的7本书
- 长安链同步节点配置与启动
- What is 1cr0.5mo (H) material? 1cr0.5mo (H) tensile yield strength
猜你喜欢

一文纵览主流 NFT 市场平台版税、服务费设计
![[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]](/img/0f/972cde8c749e7b53159c9d9975c9f5.png)
[detailed explanation of Huawei machine test] judgment string subsequence [2022 Q1 Q2 | 200 points]

P4 installation bmv2 detailed tutorial

网关gateway-88

SPL Introduction (I)

seaborn clustermap矩阵添加颜色块

Agrometeorological environment monitoring system

《单片机原理与应用》——并行IO口原理

《微机原理》—总线及其形成

MAVROS发送自定义话题消息给PX4
随机推荐
《微机原理》——微处理器内部及外部结构
[redis] it takes you through redis installation and connection at one go
Matlab [function derivation]
CPU设计实战-第四章实践任务一简单CPU参考设计调试
Mavros sends a custom topic message to Px4
[untitled]
Introduction to R language
Intelligent constant pressure irrigation system
Provincial selection + noi Part II string
2022 Chinese cook (technician) simulation test and Chinese cook (technician) practice test video
【C】 Summary of wrong questions in winter vacation
P4 installation bmv2 detailed tutorial
win7 pyinstaller打包exe 后报错 DLL load failed while importing _socket:参数错误
Conception et mise en service du processeur - chapitre 4 tâches pratiques
Agrometeorological environment monitoring system
Utiliser Beef pour détourner le navigateur utilisateur
leetcode T31:下一排列
On several key issues of digital transformation
Leetcode t39: combined sum
MATLAB小技巧(23)矩阵分析--模拟退火