美文网首页
计算机概论 Intro to Computer Science

计算机概论 Intro to Computer Science

作者: ZhSong | 来源:发表于2020-03-31 17:38 被阅读0次

Number Systems

Converting Base 10 to Base 2 

Converting Base 10 to Base 8 and Base 16

Converting Base 2 to Base 8

Converting Base 8 to Base 2

Converting Base 2 to Base 16

Binary Arithmetic : Addition

Binary Arithmetic : Subtraction

Positive Real Numbers

Physical Storage

Overflow

Negative Number

Fixed Point Representation

1. 进制转换

如果是线上考试可以直接查询网站

权重:base or radix can be any number

1.1 为什么计算机要采用二进制

Base 2 has two digits which can easily be represented on computer by two states ON and OFF

1.2 其他进制转换为10进制(无符号)

方法:将对应位的数字展开然后求和:

\begin{align}\begin{split}&K_nK_{n-1}...K_{2}K_{1}K_{0}K_{-1}K_{-2}...K_{-m}\\=&K_n \times r^n + K_{n-1}\times r^{n-1} + ... + K_{2}\times r^2 + K_{1}\times r^1 + K_{0}\\& \times r^0 + K_{-1}\times r^{-1} + K_{-2}\times r^{-2} + ... + K_{-m}\times r^{-m}\end{split}\end{align}

1.3 十进制转换为其他进制(无符号)

方法:首先将数字分为整数部分和小数部分,

对于整数的部分吧,使用除基取余的方法,对于小数的部分,使用乘积取整法

例如数字:73.6

整数部分除基取余:【图】

小数部分乘积取整:【图】

表示范围:

无符号数表示范围和有符号数表示范围 

1.4 二进制和八进制之间转换

方法:将数字分组,整数部分高位补0,小数部分低位补0

1.5 二进制小数与十进制之间的转换

一. 数据系统

进制转换 r进制:

十进制转换为其他进制的时要注意整数和小数分开计算,

计算的基础依然是公式(1)除基取余倒写和乘基取整正写的方法

二进制与四进制和八进制和十六进制之间的转换:

在高位和低位补零,然后在根据要转换的进制分组

无符号数:

无符号数的表示范围 为 0~​ - 1 例如8位二进制:0000 0000 ~ 1111 1111 = 1 0000 0000 - 1 = ​ - 1 = 255

有符号数

定点小数

有符号的二进制数相加

相关文章

网友评论

      本文标题:计算机概论 Intro to Computer Science

      本文链接:https://www.haomeiwen.com/subject/gzfguhtx.html