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

Prerequisite: Number systems

先决条件: 数字系统

Converting binary numbers into hexadecimal numbers is similar to the conversion of binary into octal, it just requires some modifications. The relationship between binary numbers and hexadecimal numbers is given as:

将二进制数转换为十六进制数类似于将二进制数 转换为八进制数 ,只需要进行一些修改即可。 二进制数和十六进制数之间的关系给出为:

Decimal Hexadecimal Binary
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
小数 十六进制 二元
0 0 0000
1个 1个 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 一个 1010
11 1011
12 C 1100
13 d 1101
14 Ë 1110
15 F 1111

In hexadecimal number system, we have sixteen digits ranging from 0 to 15 which can be represented using four-bit binary numbers in 24 = 16 ways, so starting from the least significant bit of the binary number, we group four successive bits of the binary number to get its equivalent hexadecimal number as seen from the table above.

在十六进制系统中,我们有十六个数字,范围从0到15 ,可以使用4位二进制数2 4 = 16的方式表示,因此从二进制数的最低有效位开始,我们将二进制数的四个连续位分组从上表中可以看到二进制数以获取其等效的十六进制数。

In an integral part, the grouping of four bits is done from the right side to the left side whereas in the fractional part the grouping of four bits is done from left to right and then convert it to its equivalent hexadecimal symbol.

在整数部分中,四个位的分组是从右侧到左侧完成的,而在分数部分中,四个位的分组是从左到右进行的,然后将其转换为等效的十六进制符号。

In the process of grouping four bits, one/two/three bits can be added to the left of the MSB in an integral part and/or to the right of the LSB bit of the fractional part of the binary number.

在对四位进行分组的过程中,可以在二进制数的小数部分的整数部分的MSB左侧和/或LSB的右边添加一/二/三位。

Note: Whenever we need any additional bits, we only add '0' as the additional bit.

注:每当我们需要任何其他位时,我们仅将“ 0”添加为其他位。

Example 1: Convert (01111111.1010)2 to ( ? )16

示例1:将(01111111.1010) 2转换为(?) 16

Solution:

解:

We will make a grouping of 4 bits from right to left direction in an integral part and from left to right direction in the fractional part and then replace it with the corresponding symbol with the help of the table provided above.

我们将在一个整数部分中从右到左方向以及在分数部分中从左到右方向将4位分组,然后在上面提供的表格的帮助下将其替换为相应的符号。

Therefore, (01111111.1010)2 = (7F. A)16

因此, (01111111.1010) 2 =(7F.A) 16

Example 2: Convert (1110011100.110001)2 to ( ? )16

示例2:将(1110011100.110001) 2转换为(?) 16

Solution:

解:

The given binary number consists of only 10 bits in an integral part and only 6 bits in the fractional part. So, making a group of 4 bits is not possible. In this case, we have to add bits from our side so that we can make a grouping of 4 bits. Thus, we add two zero bits at the LHS of the MSB in the integral part which will make 12 bits in an integral part, without disturbing its original value. Similarly, two zero bits are added to the RHS of the LSB in the fractional part, which will result in 8 bits in the fractional part and can be grouped in a group of 4 bits.

给定的二进制数在整数部分仅包含10位,在小数部分仅包含6位。 因此,不可能将4位组成一组。 在这种情况下,我们必须从自己的角度添加位,以便我们可以将4位分组。 因此,我们在整数部分的MSB的LHS处添加两个零位,这将在整数部分中形成12位,而不会干扰其原始值。 类似地,两个零位在小数部分被添加到LSB的RHS中,这将导致小数部分为8位,并且可以分为4位。

Thus, above given binary number can now be written as: (001110011100.11000100)2

因此,上述给定的二进制数现在可以写为: (001110011100.11000100) 2

Therefore, (001110011100.11000100)2 = (39C.C4)16

因此, (001110011100.11000100) 2 =(39C.C4) 16

Example 3: Convert (100101011110.0110111)2 to ( ? )16

示例3:将(100101011110.0110111) 2转换为(?) 16

Solution:

解:

Given binary number has 12 bits in an integral part, so it can be easily grouped in a group of 4 bits but there are only 7 bits in the fractional part so we need to add one more additional zero bit to the RHS of LSB in the fractional part. Thus, the above binary number can now be written as: (100101011110.01101110)2

给定的二进制数在整数部分中具有12位,因此可以轻松地将其分为4位,但是小数部分中只有7位,因此我们需要在LSB的RHS的RHS中再增加一个零位。小数部分。 因此,上述二进制数现在可以写为: (100101011110.01101110) 2

Therefore, (100101011110.01101110)2 = (95E.6E)16

因此, (100101011110.01101110) 2 =(95E.6E) 16

翻译自: https://www.includehelp.com/basics/conversion-of-binary-number-system-into-hexadecimal-number-system.aspx

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

二进制转换为十六进制数是_将二进制数制转换为十六进制数制相关推荐

  1. python中二进制转化为十进制_将二进制、八进制、十六进制转换为十进制

    学习视频 9节课征服「字符编码」-1-字符.字符集.字符编号与字符编码(基础课)-周华健的在线视频教程​edu.csdn.net 二进制.八进制和十六进制向十进制转换都非常容易,就是"按权相 ...

  2. 如何转换为系统应用_如何将AVI转换为GIF

    AVI是一种多媒体容器格式,可以存储视频和音频内容.AVI文件很大,很难通过网络发送或上传以进行传送或其他目的.因此,要将AVI视频用于动画和信息,将AVI转换为GIF是最好的解决方案.如主题的以下部 ...

  3. python html转换为普通文本_将HTML表转换为可读的纯文本的Python解决方案

    用这个怎么样: 但是,使用collections.OrderedDict()而不是简单字典来保持顺序.有了字典之后,很容易从中获取和格式化文本: 使用@Colt 45溶液:import xml.etr ...

  4. 将八进制数制转换为二进制,十进制和十六进制数制

    1)将八进制数制转换为二进制数制 (1) Conversion of Octal Number System to Binary Number System) To convert octal num ...

  5. 计算两个数之间所有整数的和_汇编语言:输入2个0–99之间的整数,对其做乘法运算,在屏幕上显示出该乘积对应的二进制和十六进制数...

    实验要求: (1)在屏幕提示:"please input the first number(0–99): "后,输入一个0–99之间的整数. 若所输入的数不在此范围内,或输入其它字 ...

  6. 十进制数转换为十六进制数_十进制数制到十六进制数制的转换

    十进制数转换为十六进制数 Conversion of decimal number system into hexadecimal number system can be done by succe ...

  7. 十进制进制法_关于二进制、十进制、八进制、十六进制数据转换计算方法详细总结...

    下面在安静的音乐中,让我们开始学习吧 公式库网 03:40来自生活用电 在我们接触编程知识时,总会接触有关进制转换的知识,最常见的就是10进制与二进制或十六进制之间的转换,很多时候我们总会遗忘,虽然现 ...

  8. 二进制转换八进制图解_一文帮你详细图解二进制、八进制、十进制、十六进制之间的转换...

    1.背景(Contexts)之前使用SQL把十进制的整数转换为三十六进制,SQL代码请参考:SQL Server 进制转换函数,其实它是基于二.八.十.十六进制转换的计算公式的,进制之间的转换是很基础 ...

  9. python中二进制和文本不同_关于Python字符编码与二进制不得不说的一些事

    二进制 核心思想: 冯诺依曼 + 图灵机 电如何表示状态,才能稳定? 计算机开始设计的时候并不是考虑简单,而是考虑能自动完成任务与结果的可靠性, 简单始终是建立再稳定.可靠基础上 经过尝试10进制,但 ...

  10. 三进制计算机_漫话二进制

    时间兜兜转转,终于又来到了乐博小课堂的时间,在讲今天要讲的内容之前,乐博客先给大家讲一个笑话: "世界上只有10种人,一种懂二进制,另一种不懂二进制." 这个笑话展示的就是我们这次 ...

最新文章

  1. 加拿大阿尔伯塔大学韩杰教授招收电子与计算机专业博士/博后
  2. linux mysql 实例详解_MySQL 多实例详解
  3. arthas 查看哪个方法调用最耗时_Arthas实战
  4. IAR FOR ARM 各版本,需要的大家可以收藏了
  5. 关于DNS区域查询,DNS字典爆破,以及查询文件问题
  6. 冰雪奇缘,白色世界:四个IT人的四姑娘山双桥沟游记
  7. python并发编程3-进程
  8. Git1天打卡 day13-查看仓库文件改动状态
  9. python 打印皮卡丘_来简单聊聊python的装饰器呀~
  10. sublime text3的一些小技巧记录(配gif图)
  11. java script和java有什么区别_Java中final finally finalize的区别(其实没什么联系 不过面试官喜欢这么问)
  12. STC单片机程序下载实战
  13. Premiere Pro Guru: Speed Changes Premiere Pro 大师教程之改变速度 Lynda课程中文字幕
  14. python在线评测系统_怎样做一个 Online Judge(在线评测系统)?
  15. 参考文献编号[9]之后出现空格解决方法
  16. 为防泄密 新加坡政府将断掉公务员的网络连接
  17. HDU 2042 不容易系列之二
  18. python怎么变成白色_在python中将一系列颜色更改为白色
  19. Eclipse搭建第一个Spring boot项目
  20. Git入门【学费git一篇还不够?】

热门文章

  1. erdas几何校正_erdas图像几何校正操作步骤指南.doc
  2. 机器学习的13种算法和4种学习方法,推荐给大家
  3. 全国大学生节能减排社会实践与科技竞赛最新作品模板资料国家三等奖分享
  4. VS2015调试程序
  5. EXP-00091 Exporting questionable statistics问题解决
  6. ABAP RFC函数导入参数 EXPORTING 传入内表形式参数
  7. 为什么要学习Linux内核,如何学习?
  8. IP地址定位之IP画像——如何形成IP用户画像?
  9. C语言二维数组及指针引用
  10. mysql ipv4转ipv6_从IPv4到IPv6过渡