c++ 十六进制转二进制数
I recently introduced the Decimal Number System, the one we are used as humans.
我最近介绍了小数系统 ,即我们用作人类的系统。
As I said in that post, as humans we commonly have 10 fingers and we can count up to 10, hence the popularity of that system in our history.
就像我在那篇文章中所说的那样,作为人类,我们通常有10个手指,我们最多可以数10个手指,因此该系统在我们的历史中非常流行。
The Binary Number System is the second most important system for our species, as it led the electronics and computer revolution.
二进制数系统是对我们物种而言第二重要的系统,因为它引领了电子和计算机革命。
In electronics, we have 2 states: 0 or 1. There’s 0 volts, or there’s 5 (or 9, 12, whatever). A gate is open, or it’s closed.
在电子领域,我们有2种状态:0或1。有0伏,或者有5伏(或9、12,无论如何)。 门是打开的还是关闭的。
It’s either one or the another.
这是一个或另一个。
The digit in the binary number system is called bit.
二进制数字系统中的数字称为bit 。
As the decimal number system, also the binary number system is positional.
作为十进制数字系统,二进制数字系统也是positional 。
We sum each digit in the binary number system mutiplied by the power of 2 depending on their position, starting at position 0 from the right.
我们将二进制数字系统中的每个数字相加,并乘以2的幂,具体取决于它们的位置,从右边的位置0开始。
Given that:
鉴于:
\[2