5

【笔记】十六进制数转换为二进制数

 2 years ago
source link: https://feiju12138.github.io/2022/05/15/%E5%8D%81%E5%85%AD%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

1

十六进制数(H)转换为二进制数(B)

十六进制数转换为二进制数

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

6=>(6)H=(0110)B
1=>(1)H=(0001)B

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

(D)H=(13)H

D=>(13)H=(1101)B

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

61.D=>1100001.1101

  1. ∴ (61.D)H=(1100001.1101)B

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK