当前位置:网站首页>内存大小端
内存大小端
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了。
边栏推荐
- 《MATLAB 神经网络43个案例分析》:第30章 基于随机森林思想的组合分类器设计——乳腺癌诊断
- 《单片机原理与应用》——并行IO口原理
- [JS reverse] MD5 encryption parameter cracking
- Field agricultural irrigation system
- Stack implementation calculator
- SPL installation and basic use (II)
- Leetcode T40: 组合总和II
- 初学者如何正确理解google官方建议架构原则(疑问?)
- Luogu p1088 [noip2004 popularization group] Martians
- 量化交易之读书篇 - 《征服市场的人》读书笔记
猜你喜欢
What is 1cr0.5mo (H) material? 1cr0.5mo (H) tensile yield strength
OJ input and output exercise
Intelligent constant pressure irrigation system
The use of word in graduation thesis
Using settoolkit to forge sites to steal user information
【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
Utiliser Beef pour détourner le navigateur utilisateur
[dynamic planning] p1020 missile interception (variant of the longest increasing subsequence)
Koltin35, headline Android interview algorithm
MATLAB【函数求导】
随机推荐
Yolov5进阶之六目标追踪环境搭建
Li Kou 1358 -- number of substrings containing all three characters (double pointer)
【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
Leetcode t31: next spread
01 NumPy介绍
[JS reverse] MD5 encryption parameter cracking
Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
How to prevent the other party from saying that he has no money after winning the lawsuit?
XX attack - reflective XSS attack hijacking user browser
Pipeline detection of UAV Based on gazebo
win7 pyinstaller打包exe 后报错 DLL load failed while importing _socket:参数错误
Leetcode t34: find the first and last positions of elements in a sorted array
Introduction to R language
Luogu p1088 [noip2004 popularization group] Martians
Tita OKR: a dashboard to master the big picture
Redis publish subscription
shardingSphere
Intelligent water supply system solution
String coordinates of number to excel
Agrometeorological environment monitoring system