当前位置:网站首页>bits and bytes
bits and bytes
2022-08-07 01:01:00 【Dong Dong Dong Dong Dong】
- 比特
比特,英文bit,简记为b,是计算机存储的最小单位,Computer storage is stored in bits,其中0、1Each bit is a bit.
- 字节
字节,英文Byte,简记为B,It is a unit of data measurement by computer.
- Data type and bytes
#include <stdio.h>
#include <stdlib.h>
int main(){
printf("%d\n", sizeof(char)); //1
printf("%d\n", sizeof(short int)); //2
printf("%d\n", sizeof(int)); //4
printf("%d\n", sizeof(unsigned int)); //4
printf("%d\n", sizeof(float)); //4
printf("%d\n", sizeof(double)); //8
printf("%d\n", sizeof(long)); //4
printf("%d\n", sizeof(long long)); //8
printf("%d\n", sizeof(unsigned long)); //4
printf("%d\n", sizeof(char *)); //8
return 0;
}
How to tell if you are talking about bytes or bits?
- 与数据相关的,Such as storage units and network speed units,不管是 B 还是 b,All represent bytesByte.
如硬盘10M,说的就是10Storage size in megabytes.
As we usually say download speed,That is internet speed,is the number of bytes downloaded per second.For example, the internet speed is5KB,This means that the data received per second is five kilobytes.
- 与硬件相关的,Such as the unit of network bandwidth,不管是B还是b,All represent bitsbit .
如2M宽带,Means average per second is acceptable 2Mb 的数据,That is about two million bits of data.
边栏推荐
猜你喜欢
随机推荐
cartography在机器人上运行建图与定位
内网穿透的方式有哪些——快解析的优势
logcat: Solution for Unexpected EOF!
新库上线 | CnOpenData 新三板公司专利及引用被引用数据
Ftrace function graph简介
超分辨率模型小抄(1)
jvm总结
国内Api行业,可以内卷到什么程度?
存储中的爱情:cookie、本地存储、会话存储
2022年G2电站锅炉司炉题库及在线模拟考试
Introduction to Ftrace function graph
著名的 P=NP 问题到底是什么?
分布式事务理论以及解决方案
NAT穿越技术详细介绍
2022 G2 Power Plant Boiler Stoker Question Bank and Online Mock Exam
How is the Service started?tell you
【8.5】代码源 - 【GCD】【序列中位数】【最大连边数量】
Are automated tests really needed?
常用cmd命令
Open3D ROR filtering









