在不严谨的前提下,byte和octet都表示为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++.

本文转自:https://blog.csdn.net/x55x5/article/details/82964612

Octet和byte的差异(转)的更多相关文章

  1. 自己动手开发Socks5代理服务器

    一.Socks5协议简介 socks5是基于传输层的协议,客户端和服务器经过两次握手协商之后服务端为客户端建立一条到目标服务器的通道,在传输层转发TCP/UDP流量. 关于socks5协议规范,到处都 ...

  2. weblogic漏洞总结 复现(未完)

    复现方式 Docker复现 WEBlogic爆出了很多漏洞 先了解一下现在主流的版本 Weblogic 10.3.6.0 Weblogic 12.1.3.0 Weblogic 12.2.1.1 Web ...

  3. char与byte差异

    很多人刚开始学习(包含I,我已经学会了一年多java该)肯会char和byte怀疑这两个数据类型,相互混淆.今天,大量的信息专门搜索,至byte和char两个数据类型进行了总结和比较.第一批成果与大家 ...

  4. Java .Net Byte数组存储差异以及解决方法

    最近在Java与.Net服务Bytes数据交互碰到一个问题:.Net IntToBytes结果和Java IntToBytes结果是反序的,查了一下发现:Java stores things inte ...

  5. JAVA与c#中byte取值范围的差异

    C#中分有符号类型的sbyte和无符号类型的byte Console.WriteLine("byte.min:{0},byte.max:{1},{2}byte", byte.Min ...

  6. MySQL char与varchar的差异

    字符与字节的区别 一个字符由于所使用的字符集的不同,会并存储在一个或多个字节中,所以一个字符占用多少个字节取决于所使用的字符集 注意:char与varchar后面接的数据大小为存储的字符数,而不是字节 ...

  7. 透过byte数组简单分析Java序列化、Kryo、ProtoBuf序列化

    序列化在高性能网络编程.分布式系统开发中是举足轻重的之前有用过Java序列化.ProtocolBuffer等,在这篇文章这里中简单分析序列化后的byte数组观察各种序列化的差异与性能,这里主要分析Ja ...

  8. java int转byte和long转byte

    在网络编程中,出于节约带宽或者编码的需要,通常需要以原生方式处理long和int,而不是转换为string. public class ByteOrderUtils { public static b ...

  9. Byte History

    https://en.wikipedia.org/wiki/Byte The term byte was coined by Werner Buchholz in July 1956, during ...

随机推荐

  1. vue响应式原理,去掉优化,只看核心

    Vue响应式原理 作为写业务的码农,几乎不必知道原理.但是当你去找工作的时候,可是需要造原子弹的,什么都得知道一些才行.所以找工作之前可以先复习下,只要是关于vue的,必定会问响应式原理. 核心: / ...

  2. sqlserver一次性修改多条

    修改客户表 编号为 0101007002,0101007003的楼栋号  007-1-102,007-1-201 UPDATE gas_customerSET building= CASEWHEN g ...

  3. .Net core 在类库中获取配置文件Appsettings中的值

    大多数情况,我们开发的程序中都含有很多个类库和文件夹,有时候,我们会遇到程序中的类库需要获取配置文件的信息的情况. 像dapper 中需要使用连接字符串的时候,那么我们一直从主程序中传值这是个不好的方 ...

  4. Docker 0x03:Install Docker

    目录 Install Docker Centos yum 安装 运行docker-daemon并开机自启动 运行hello-world应用docker容器中 Ubn Install Docker do ...

  5. centos下导入mysql数据库

    先进入mysql1.mysql -u root -p2.输入密码3.use 要导入的数据库名(没有就新建一个,使用create database test;命令新建,再use test;,再set n ...

  6. cetos报错“Lack of free swap space” 解决方法

    前提:今天发现某台主机一直报警:swap内存被用光 1.查看了服务器的内存情况[发现在物理内存还剩余的情况下,swap开始被使用,甚至到被用光][root@note1 ~]# free -htotal ...

  7. C++学习(12)—— 运算符重载

    运算符重载概念:对已有的运算符重新进行定义,赋予其另一种功能,以适应不同的数据类型 1.加号运算符重载 作用:实现两个自定义数据类型相加的运算 #include <iostream> #i ...

  8. Java 中函数式编程方法形参为基本类型和引用类型

    简单复习下 基本数据类型值传递 值传递,原变量的值不会被修改 private final Consumer sout = System.out::println; @Before public voi ...

  9. Pycharm中设置默认头注释

    在编写Python项目时,我们可能需要添加一些默认的信息,比如添加文件创建的时间,比如添加文件作者,等等,这些信息可以自己在python脚本中添加,但是也可以在Pycharm中配置模板,每次创建文件的 ...

  10. 用于Python扩展包的非官方Windows二进制文件

    https://www.lfd.uci.edu/~gohlke/pythonlibs/ Index by date: peewee aiohttp indexed_gzip pygit2 pymatg ...