octet和byte的差异

在不严谨的前提下,byteoctet都表示为8 bits,但是严格意义上来讲,octet才是严格意义上的8 bits,而历史上的byte其实可以表示为4 bits ~ 10 bits,只不过现在的计算机环境下,已经默认了byte为8 bits。

octet = 8 bits
byte = (4~10 bits)8 bits(通常情况下)
参考出处:https://www.differencebetween.com/difference-between-octet-and-vs-byte/

原文部分内容:
In computing, bit is the basic unit of information. Simply, a bit can be seen as a variable that can take only one of the two possible values. These two possible values are ‘0’ and ‘1’ and interpreted as binary digits. The two possible values could also be interpreted as logical (Boolean) values, which are ‘true’ and ‘false’. Byte is another unit of information used in computing. In the history of computing, the unit byte has stood for representing various storage sizes (typically from 4 to 10 bits), because it is not considered a standardized unit. But, due to heavy use of the term byte to represent eight bits by several major computer architectures and production lines, byte slowly became associated with eight bits. Still, due to the earlier ambiguity, the term Octet was introduced as a standardized unit to represent eight bits. So, as of now, both Byte and Octet are used interchangeably to represent eight bits. Byte is also used as a data type in several programming languages such as C and C++.

你可能感兴趣的:(基础知识)