#今天初识了运算符,但是还是很难理解,我发现我的难点可能是对二进制的认知不太全面,遂在b站上学习了二进制相关的内容。#(我觉得计算机导论那本书可能也有讲这个东西下次看了再回来更新)
1.比特与字节,bit&byte
比特是计算机中最小的储存单位(我猜的hhh!)。一个比特只能存放一个0/1。8个比特组成了一个字节。在ASCII编码中一个英语字母占一个字节。在UTF-8编码中一个中文占3个字节。
2.比特与计算机底层原理的关系。
在计算机中晶体管只有两个信号,通电和不通电。人们分别用1和0来代表这两种状态。
3.二进制在计算机中的简单例子
RGB每个原色的范围是0-255,这是因为一个字节能表示的最大的整数为255(2^7+2^6+2^.....+2^0);
Today I Learned About Operators, But It’s Still Hard to Understand
I realized that my difficulty might stem from a lack of comprehensive understanding of binary numbers, so I studied related content on Bilibili. (I think the book “Introduction to Computer Science” might also cover this topic, I’ll update after reading it next time.)
-
Bits and Bytes A bit is the smallest unit of storage in a computer. A bit can only store a 0 or a 1. Eight bits make up a byte. In ASCII encoding, one English letter occupies one byte. In UTF-8 encoding, one Chinese character usually occupies 3 bytes, but it can also be 2 to 4 bytes.
-
The Relationship Between Bits and Computer Fundamentals In computers, transistors have only two signals: on and off. These states are represented by 1 and 0, respectively.
-
A Simple Example of Binary in Computers The range of each primary color in RGB is 0-255 because the largest integer that can be represented by one byte is 255 (2^8 - 1).