4

【笔记】八进制数转换为二进制数

 2 years ago
source link: https://feiju12138.github.io/2022/05/15/%E5%85%AB%E8%BF%9B%E5%88%B6%E6%95%B0%E8%BD%AC%E6%8D%A2%E4%B8%BA%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%95%B0/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【笔记】八进制数转换为二进制数

2022-05-15

八进制数(O)转换为二进制数(B)

八进制数转换为二进制数

  • 示例:将八进制数 62.64 转换为二进制数
  1. 首先将整数和小数分开
  2. 先将整数从个位开始,1个位为1组分开,将分开后的每组十进制数单独转换为二进制数(转换后的二进制数如果不够3位,需要在当前组的前面补0)

6=>(6)D=(110)B
2=>(2)D=(010)B

62=>110010

  1. 再将小数从十分位开始,1个位为1组分开,将分开后的每组十进制数单独转换为二进制数(转换后的二进制数如果不够3位,需要在当前组的前面补0)

6=>(6)D=(110)B
4=>(4)D=(100)B

64=>110100

  1. 将得到的数拼接成一个数,去除结果开头和结尾的0,作为二进制数

62.64=>110010.1101

  1. ∴ (62.64)O=(110010.1101)B

哔哩哔哩——猴博士爱讲课


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK