5

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

 2 years ago
source link: https://feiju12138.github.io/2022/05/15/%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%95%B0%E8%BD%AC%E6%8D%A2%E4%B8%BA%E5%85%AB%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

1

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

二进制数转换为八进制数

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

110010

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

110010=>62

  1. 再将小数从十分位开始,3个位为1组分开(位数不够向后补0),将分开后的每组二进制数单独转换为十进制数

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

1101=>64

  1. 将得到的数拼接成一个数,作为八进制数

110010.1101=>62.64

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

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK