当前位置:网站首页>LabVIEW 小端序和大端序区别
LabVIEW 小端序和大端序区别
2022-04-23 03:53:00 【bjcyck】
LabVIEW 小端序和大端序区别
看到在一些范例程序中出现了小端序和大端序,这里的的字节序表示什么意思?
解答: endian表示的是多字节二进制数是怎么存储的。
例如说,双字节可以存储为大端序格式(MSB LSB) 或者小端序格式(LSB MSB),MSB存储的是最高有效字节而LSB存储的是最低有效字节。例如说想使用双字节来存储数字1,那么可以将最高有效字节放在前面 (00000000 00000001),此时最左边的比特表示的是2^15;或者可以将最低有效位字节放在前面,此时最左边的比特表示的是2^7。根据使用的应用对二进制数的理解,可以将00000001 00000000读为1,或者可以将其读为256,下面是这两种存储的例子。
需要注意的是无论是整形,双精度或者是数组,字节序都用相同的规则组织数据,都是分为大端序或者小端序。所以,当读取小端序数据类型同时需要将其转换为大端序,反之亦然。可以使用labview中的Swap Bytes VI。
使用Labview中的Flatten to String, Unflatten FromSting, Write to Binary File, and Read Binary File VIs的byteorder输入端允许去选择字节序.
Labview使用大端序格式去处理和存储多字节数据,即便是在Windows(x86)平台上。小端序是基于因特尔x86处理器的选择,摩托罗拉处理器(包括Macintosh电脑,Labview一开始是为之开发的) 使用的是大端序。需要注意的是C和其他的Windows应用都是期待数据使用小端序来表示的。请参考附件的例程。
更详细的内容,参加如下附件的介绍。
LabVIEW、LabVIEW开发、LabVIEW编程、LabVIEW程序
上文中提到的例子和资料,均在word中的附件里,可点击下载。进一步了解,可联系们。
LabVIEW 小端序和大端序区别 - 北京瀚文网星科技有限公司 (bjcyck.com)
版权声明
本文为[bjcyck]所创,转载请带上原文链接,感谢
https://blog.csdn.net/bjcyck/article/details/124353720
边栏推荐
- What is software acceptance testing? What are the benefits of acceptance testing conducted by third-party software testing institutions?
- Wechat applet cloud database value assignment to array error
- 列表、元组、字典和集合的区别
- 標識符、關鍵字、數據類型
- Wechat applet canvas draws a simple asymptotic color of the dashboard
- Laboratory safety examination
- Wechat payment iframe sub page has no response
- Using VBA interval to extract one column from another in Excel
- RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
- 中国移动日赚2.85亿很高?其实是5G难带来更多利润,那么钱去哪里了?
猜你喜欢
Wechat applet cloud database value assignment to array error
MySQL is completely uninstalled and MySQL service is cleaned up
Machine translation baseline
Seekbar custom style details
What if you encounter symbols you don't know in mathematical formulas
On the principle of concurrent programming and the art of notify / Park
变量、常量、运算符
ROS series (4): ROS communication mechanism series (4): topic communication practice
Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
将编译安装的mysql加入PATH环境变量
随机推荐
【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
How Zotero quotes in word jump to references / hyperlink
CRF based medical entity recognition baseline
Oracle JDK vs OpenJDK
VS Studio 修改C语言scanf等报错
Identificateur, mot - clé, type de données
MySQL is completely uninstalled and MySQL service is cleaned up
Use of rotary selector wheelpicker
Solve the technical problems in seq2seq + attention machine translation
Jupiter notebook modify configuration file setting startup directory is invalid
ROS series (V): common commands in ROS
Basic introduction to spot gold
秒杀所有区间相关问题
Openvino only supports Intel CPUs of generation 6 and above
Vscode delete uninstall residue
Cuda11 is installed perfectly in win10 X + pytorch 1.9 (blood flowing into the river) cuda. is_ Available() becomes true!
Basic knowledge of convolutional neural network
Digital image processing third edition Gonzalez notes Chapter 2
变量、常量、运算符
創下國產手機在海外市場銷量最高紀錄的小米,重新關注國內市場