# 二进制那点事儿之换算十进制的理解

* 抖音：<https://v.douyin.com/iUBMXBWX/>
* B站：<https://www.bilibili.com/video/BV1MzykYpER5/>

这个是

相当于3个

同理呢这个就是9个

这就是10个

也就是10的平方

那这个呢

就是4个10的平方

那么它呢

就是5个10的立方

所以啊

我们看它也就变成了5个10的立方

4个10的平方

三个10的一次方和两个10的零次方

如果我们换成八进制呢

我们都知道八进制从8开始进位

所以呢这个代表一个

这个代表两个

那这个呢

就是三个

大家有没有发现

这次我们说的几个

其实就是把一个八进制的数字

换成了十进制的说法

也就说八进制的30=10进制的

那这样的话呢

100就相当于8个

也就是8的平方

同理呢 400就是4个8的平方

5,000就是5个8的立方

所以八进制的5432换成十进制就是这样

那我们再继续

这个就是一个

100呢

就是两个

也就是2的平方

那我们一直数到1000呢

就是2*2*

也就是2的立方

所以这4个一

就相当于一个2的立方

加上一个2的平方

加上一个2的一次方加上一个2的0次方

那如果1101呢

我们就把这里换成0就可以了

变成这样

二进制转十进制的过程是可以这样的

我们从最右边开始

一位一位的取值计算

指数从0开始

每次加一

前面的乘数就是二进制的每一位数

这时候有同学可能会问啊

这个结论有什么用

后面我们再分享一个二进制的特点

到时候我们结合起来就有意思了


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sunzsh.gitbook.io/xiaoshan.bug/er-jin-zhi-na-dian-shi-er-zhi-huan-suan-shi-jin-zhi-de-li-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
