当前位置:网站首页>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
边栏推荐
- [AI vision · quick review of today's sound acoustic papers issue 1] Thu, 14 APR 2022
- Process seven state transition diagram
- STM32 advanced timer com event
- Vscode download and installation + running C language
- As a code farmer, what kind of experience is it that a girlfriend can code better than herself?
- UDP协议与TCP协议
- Abstract classes, interfaces and common keywords
- Cuda11 is installed perfectly in win10 X + pytorch 1.9 (blood flowing into the river) cuda. is_ Available() becomes true!
- Several common methods of multithreading
- 【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
猜你喜欢
Shopping mall for transportation tools based on PHP
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
How Zotero quotes in word jump to references / hyperlink
The art of concurrent programming (3): an in-depth understanding of the principle of synchronized
Identifier, keyword, data type
变量、常量、运算符
对象和类的概念
Network principle | connection management mechanism in TCP / IP important protocol and core mechanism
(valid for personal testing) compilation guide of paddedetection on Jetson
Installation and configuration of clion under win10
随机推荐
常用的辅助类
MySQL zip installation tutorial
【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
Mysql出现2013 Lost connection to MySQL server during query
Wechat applet canvas draws a simple asymptotic color of the dashboard
Notes sur l'apprentissage profond (Ⅱ) - - Principe et mise en oeuvre de la fonction d'activation
Second kill all interval related problems
Design and implementation of redis (5): master-slave replication strategy and optimization
秒杀所有区间相关问题
Wechat applet cloud database value assignment to array error
What if you encounter symbols you don't know in mathematical formulas
Leetcode 617 merge binary tree
Network principle | connection management mechanism in TCP / IP important protocol and core mechanism
Mechanical design knowledge point planning
Let matlab2018b support the mex configuration of vs2019
Paddlepaddle does not support arm64 architecture.
[AI vision · quick review of today's sound acoustic papers issue 1] Thu, 14 APR 2022
Vscode delete uninstall residue
A sword is a sword. There is no difference between a wooden sword and a copper sword
Who will answer the question?