gpt4 book ai didi

terminology - 与字节序混淆 : bits or bytes?

转载 作者:行者123 更新时间:2023-12-04 03:01:30 25 4
gpt4 key购买 nike

我从教程中提取了这个:

Little-Endian order is the one we will be using in this document, and unless stated specifically you should assume that Little-Endian order is used in any file. The alternate is Big-Endian ordering. So let’s see an example. Take the following stream or 8 bits 10001110 If you have been following the document so far, you would quickly calculate the value of this 8-bit number as being 1x2^7 + 0x2^6 + … + 1x2^1 + 0x2^0 = 142 This is an example of Little-Endian ordering. However, in Big-Endian ordering we need to read the number in the opposite direction 1x2^0 + 0x2^1 + … + 1x2^6 + 0x2^7 = 113



这样对吗?

我曾经认为字节序与读取字节(而不是位)的顺序有关。

最佳答案

是的,在内存/存储的上下文中,字节序确实是指字节 订购(通常)。这意味着什么,例如最不重要的 “先到先得”?

位字节序在某些情况下是相关的,例如在通过串行总线发送数据时。

关于terminology - 与字节序混淆 : bits or bytes?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8859604/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com