8

计算机中的单位转化及二进制的计算方法

 2 years ago
source link: https://blog.51cto.com/u_15740457/5558289
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

计算机中的单位转化及二进制的计算方法

原创

hanwangyyds 2022-08-09 11:26:14 博主文章分类:笔记 ©著作权

文章标签 二进制转换 单位转换 文章分类 C/C++ 编程语言 yyds干货盘点 阅读数184

计算机中的单位转化及二进制的计算方法_二进制转换

计算机中的单位转化及二进制的计算方法_单位转换_02
计算机中的单位转化及二进制的计算方法_单位转换_03

以上是多少字节(计算机单位)

bit-比特位         一个比特位是存放一个二进制位

byte-字节

1byte=8bit(特殊),其余都是1024进行换算。

例子:short是2个字节,也就是2*8=16个比特位,转化为二进制位。所以一共有2^16种状态,范围是0~2^16-1(区分!!!)

00000000000000=0(十进制)

00000000000001=1

...............

1111111111111111=2^16

Tip:110=1*2^2+1*2^1+0*2^0=7

综上为个人整理笔记,若有纰漏,敬请指导!

  • 1
  • 收藏
  • 评论
  • 分享
  • 举报

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK