分类:进制系统

来自Big Physics
(重定向自分类:十进制


定义和含义

进制系统,是数学中数的表示系统。所有写下来的数,都需要遵照某一个进制系统的数的表示规则。对于任意进制的进制系统而言,例如"[math]\displaystyle{ L }[/math]进制系统",就是它总共只有"[math]\displaystyle{ L }[/math]"个数字来进行表示。例如十进制系统,就是"[math]\displaystyle{ 0到9 }[/math]"这十个数字来表示。

进制系统决定了数的表示规则,我们以十进制的进制系统规则为例,具体如下:

  • 每往后数一个数,含义是所代表的数增加1。例如2是1增加1的意思,9是8增加1的意思[1]
  • 记号上,当某一个数位上的数超过 [math]\displaystyle{ 9 }[/math] 的时候,需要在更高的数位上增加一个数字,然后在个位上重新回到 [math]\displaystyle{ 0 }[/math] 开始新的一轮数数循环。例如从 [math]\displaystyle{ 9 }[/math] 再往下数一个就遇到了个位数已经是 [math]\displaystyle{ 9 }[/math] 的条件下还需要增加 [math]\displaystyle{ 1 }[/math] 的情况。这个时候, 按照这个规则, 我们需要在十位数上增加 [math]\displaystyle{ 1 }[/math] 。在这之前十位数上没有数字也就是 [math]\displaystyle{ 0 }[/math] , 因此增加 [math]\displaystyle{ 1 }[/math] 以后就是 [math]\displaystyle{ 0+1=1 }[/math] , 然后个位数重新回到 [math]\displaystyle{ 0 }[/math] , 因此 [math]\displaystyle{ 9 }[/math] 的下一个数是 [math]\displaystyle{ 10 }[/math] [1]
  • 在这里,被用作一个占位符[2],表示这里有一个数位。

层次标注

在这里,它属于第二层知识,即学科概念。

辅助理解的解释

最常见的十进制系统

有了数位的知识,我们可以先从最常见的十进制来了解进制系统,进而你很自然就可以了解其他进制系统例如二进制、八进制等等。

数字0到9

(图片来源于《小学数学这样学》[1])

两位数10

一般来说,我们日常生活中用的是十进制系统(可能是因为我们有十根手指而来的[2][1]),源自于印度-阿拉伯,于是十进制的十个数字,又被称为阿拉伯数字[2]

我们很容易知道,每往后数一个数,含义是这个数会增加[math]\displaystyle{ 1 }[/math] 。例如[math]\displaystyle{ 2 }[/math][math]\displaystyle{ 1 }[/math]增加[math]\displaystyle{ 1 }[/math]的意思,[math]\displaystyle{ 9 }[/math][math]\displaystyle{ 8 }[/math]增加[math]\displaystyle{ 1 }[/math]的意思[1]

在十进制中,每次遇到个位数是[math]\displaystyle{ 9 }[/math]的时候还要再增加[math]\displaystyle{ 1 }[/math]的时候往这个数的左边也就是十位上增加一位,然后在原来写9的那一位上改写成[math]\displaystyle{ 0 }[/math]。例如,[math]\displaystyle{ 9 }[/math]增加[math]\displaystyle{ 1 }[/math]得到[math]\displaystyle{ 10 }[/math]。接着如果还需要再增加[math]\displaystyle{ 1 }[/math]的话,就重复之前的个位上的从[math]\displaystyle{ 0 }[/math]增加到[math]\displaystyle{ 9 }[/math]的过程。这样我们就又可以从[math]\displaystyle{ 10 }[/math]数到了[math]\displaystyle{ 19 }[/math]

到了[math]\displaystyle{ 19 }[/math]还要增加[math]\displaystyle{ 1 }[/math],怎么办?用什么记号?重复之前的过程,也就是我们需要往[math]\displaystyle{ 19 }[/math]里面的那个左边的数[math]\displaystyle{ 1 }[/math]上增加[math]\displaystyle{ 1 }[/math],然后把[math]\displaystyle{ 9 }[/math]改成[math]\displaystyle{ 0 }[/math],于是我们得到[math]\displaystyle{ (1+1=2)0 }[/math],也就是[math]\displaystyle{ 20 }[/math]。类似地29之后再增加1就成了[math]\displaystyle{ (2+1=3)0 }[/math],也就是[math]\displaystyle{ 30 }[/math]。这样我们就有了从[math]\displaystyle{ 0 }[/math][math]\displaystyle{ 99 }[/math]的所有的数的含义和记号了。要是[math]\displaystyle{ 99 }[/math]的基础上还要继续增加[math]\displaystyle{ 1 }[/math]怎么办?继续重复上面的过程,记作[math]\displaystyle{ 100 }[/math][1]

如果你还有了乘法加法的知识,那么请看下面的例子,如果你能想明白,你就理解了进制系统。

在十进制系统中,数字4321就是:

[math]\displaystyle{ 4321 = 4 \times 10^{3}+3 \times 10^{2}+2 \times 10^{1}+1 \times 10^{0} = 4 \times 1000 + 3 \times 100+2 \times 10+1 \times 1 }[/math]

如果在八进制系统中,数字4321就是:

[math]\displaystyle{ 4321 = 4 \times 8^{3}+3 \times 8^{2}+2 \times 8^{1}+1 \times 8^{0} = 4 \times (8 \times 8 \times 8) + 3 \times (8 \times 8)+2 \times (8)+1 \times 1 }[/math]

进制系统是我们了解大数的通道,一旦知道了进制系统,你就能表示所有的大数了,进而可以表示所有的自然数了。

代数基础下的进制系统

在你学习了用字母和符号表示数后,并且体会到了代数的思想以后,我们就可以在进制系统中更进一步,这里以十进制系统为例:

一个四位数abcd可以被表示为:

[math]\displaystyle{ abcd = a \times 10^{3} +b \times 10^{2} + c \times 10^{1} + d \times 10^{0} }[/math]

这里,使用的 [math]\displaystyle{ 10^n }[/math] 称为幂,也叫作10的n次方,是乘法的特例。

在八进制系统中:

[math]\displaystyle{ abcd = a \times 8^{3} +b \times 8^{2} + c \times 8^{1} + d \times 8^{0} }[/math]

现在,你知道了一般进制系统下的字母表示,应该能够了解任何进制系统的数的表示规则了,而且也能够完成不同进制系统下数的换算了。体会一下,借助代数的思想,数学的研究更往前推进了一大步。

这时候,你可以尝试着来完成在代数表达式下的不同进制系统的数之间的换算,一旦你能够随心所欲的写下各种进制系统的表达,那么你对于进制系统的理解就进入到一个更高的层次了。下面来试试写下一个一般进制系统的表达:

对于一般的L进制,其对应着十进制下的数[1]

[math]\displaystyle{ (\underbrace{a_{n} a_{n-1} \cdots a_{0}}_{n+1})_{L}=a_{n} \times L^{n}+a_{n-1} \times L^{n-1}+\cdots+a_{0} \times L^{0} }[/math]

为什么在一般的进制表达式中,要写成十进制的数呢?这是一个好问题。其实我们最常用的就是十进制,如果我们要完成不同进制之间的转换,总是找我们最熟悉的进制系统当作一个过渡的跳板,相当于一个编码解码的过程,而一旦完成了整个编码解码的过程,中间你编成什么码就无关紧要了。

顺便,其实对于计算机来说,二进制是它最熟悉的进制系统,对于我们生活在21世纪的人类来说,十进制是我们最熟悉的进制系统。(如果你是一个古巴比伦人,那么你最熟悉的是六十进制,我们的1小时等于60分钟,1分钟等于60秒,都是源自于古巴比伦[3])

进制系统用于帮助数的研究

正是由于一切的数都是基于进制系统的表示,所以从进制的角度来研究数,就可以看到最一般的规律,揭开数的密码[4]

我们以一个例子来看看进制系统是如何帮助我们揭开数的规律的秘密的:能被3整除的数有没有什么规律。

对于一个任意位数的数,例如[math]\displaystyle{ a_{n}a_{n-1}...a_0 }[/math],这里表示的是,任意一个有[math]\displaystyle{ n+1 }[/math]位的数。

我们可以通过进制系统对这个数进行拆解,于是有:

[math]\displaystyle{ \underbrace{a_{n} a_{n-1} \cdots a_{0}}_{n+1}=a_{n} \times 10^{n}+a_{n-1} \times 10^{n-1}+\cdots+a_{0} \times 10^{0} }[/math]

有了这个关于数的表示的最基本的表达后,我们就可以来看我们要讨论的问题了:能被3整除的数有没有什么规律。于是我们就用这个展开的数去除以3,只要余数为零,此时的情况就是这个数能被3整除,于是有[1]

[math]\displaystyle{ \begin{array}{r} \left(a_{n} \times 10^{n}+a_{n-1} \times 10^{n-1}+\cdots+a_{0} \times 10^{0}\right) \div 3 \\ =a_{n} \times 10^{n} \div 3+a_{n-1} \times 10^{n-1} \div 3+\cdots+a_{0} \times 10^{0} \div 3 \end{array} }[/math]

我们知道,当10的次方大于等于1后,再乘上一个不为零的数,余数都是1 。

为了在方程中表述求余数这个含义,我们引入一个标准的词汇"[math]\displaystyle{ mod }[/math]"来表示整数[math]\displaystyle{ a }[/math]除以整数[math]\displaystyle{ b }[/math]后剩下的余数,记作"[math]\displaystyle{ a \ mod \ b }[/math]"。[1]于是有:

[math]\displaystyle{ \begin{array}{r} &\left(a_{n} \times 10^{n}+a_{n-1} \times 10^{n-1}+\cdots+a_{0} \times 10^{0}\right) \div 3 \\ &=a_{n} \times 10^{n} \div 3+a_{n-1} \times 10^{n-1} \div 3+\cdots+a_{0} \times 10^{0} \div 3 \\ &=\left[a_{n} \times 1+a_{n-1} \times 1+\cdots+a_{0} \times 1\right] \bmod 3 \\ &=\left(a_{n}+a_{n-1}+\cdots+a_{0}\right) \bmod 3 \end{array} }[/math]

此时,我们根据最后计算的结果,发现一个数如果每一位数位上的数字加起来可以被3整除,那么这个数就可以被3整除,无论它有多少位。

例如,数[math]\displaystyle{ n= 145373270099876790 }[/math]的各位数字之和是[math]\displaystyle{ 87 }[/math],而[math]\displaystyle{ 87 \div 3 = 29 }[/math],因此[math]\displaystyle{ n }[/math]可被[math]\displaystyle{ 3 }[/math]整除[2]

你可以梳理一下上面的过程,想明白以后,去试试能被5整除的数。

于是乎,我们借用这个例子,顺便告诉你为什么我们学习知识,看待问题,都需要追寻对象本身背后的本质,因为这能让我们揭开这些事物背后运行的规律[5]。同时,这就是从本质上来研究规律的威力,同时这也是代数的思想的威力,抽象的威力。

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 吴金闪,《小数数学这样学》,浙江人民出版社,2023, http://www.systemsci.org/jinshanw/books
  2. 2.0 2.1 2.2 2.3 彼得·希金斯,《牛津通识课:数字》,东方出版中心,2021
  3. 蔡天新,《数学简史》,中信出版集团,2017
  4. 陶哲轩,《陶哲轩教你学数学》,人民邮电出版社,2017
  5. 弗朗西斯·苏,《数学的力量》,中信出版集团,2022

子分类

本分类有以下4个子分类,共有4个子分类。