Prerequisite: Number systems

先决条件: 数字系统

(1) Conversion of Hexadecimal Number System to Binary Number System)

To convert hexadecimal numbers into binary numbers, we can use the relationship between hexadecimal and binary numbers.

要将十六进制数转换为二进制数,我们可以使用十六进制和二进制数之间的关系。



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



Example 1: Convert (7A.2C)16 into ( ? )2

示例1:将(7A.2C) 16转换为(?) 2

Solution:

解:

Using the table provided above, we can replace hexadecimal numbers with their equivalent binary digits.

使用上面提供的表,我们可以将十六进制数字替换为它们的等效二进制数字。

Therefore, (7A.2C)16 = (0111 1010.0010 1100)2

(7A.2C) 16 =(0111 1010.0010 1100) 2

Example 2: Convert (D2A.2B7)16 into ( ? )2

示例2:将(D2A.2B7) 16转换为(?) 2

Solution:

解:

Using the table provided above, we can replace hexadecimal numbers with their equivalent binary digits.

使用上面提供的表,我们可以将十六进制数字替换为它们的等效二进制数字。

Therefore, (D2A.2B7)16 = (1101 0010 1010.0010 1011 0111)2

(D2A.2B7) 16 =(1101 0010 1010.0010 1011 0111) 2

Example 3: Convert (FF18.5E5)16 into ( ? )2

示例3:将(FF18.5E5) 16转换为(?) 2

Solution:

解:

Using the table provided above, we can replace hexadecimal numbers with their equivalent binary digits.

使用上面提供的表,我们可以将十六进制数字替换为它们的等效二进制数字。

Therefore, (FF18.5E5)16 = (1111 1111 0001 1000. 0101 1110 0101)2

(FF18.5E5) 16 =(1111 1111 0001 1000. 0101 1110 0101) 2

(2) Conversion of Hexadecimal Number System into Octal Number System)

Conversion of the hexadecimal number to octal number can be done using a certain definite path. We first have to convert hexadecimal numbers to a binary number and then convert a binary number into octal number i.e., Hexadecimal Number → Binary Number → Octal Number

十六进制数→二进制数→八进制数

Example 1: Convert (1D.E)16 into ( ? )8

示例1:将(1D.E) 16转换为(?) 8

Solution:

解:

Step 1: Converting the first hexadecimal number into a binary number. Thus, (1D.E)16 = (0001 1101.1110)2

步骤1:将第一个十六进制数转换为二进制数。 因此, (1D.E) 16 =(0001 1101.1110) 2

Step 2: Now, converting the binary number into an octal number which gives (00011101.1110)2 = (35.7)8

步骤2:现在,将二进制数转换为八进制数,得出(00011101.1110) 2 =(35.7) 8

Therefore, (1D. E)16 = (35.7)8

(1D.E) 16 =(35.7) 8

Note: To know how to convert binary number into octal number? Read: conversion of Binary number system to octal number system.

注意:要知道如何将二进制数转换为八进制数? 阅读: 将二进制数制转换为八进制数制

Example 2: Convert (3B.4)16 into ( ? )8

示例2:将(3B.4) 16转换为(?) 8

Solution:

解:

Step 1: Converting the first hexadecimal number into a binary number. Thus, (3B.4)16 = (0011 1011.0100)2

步骤1:将第一个十六进制数转换为二进制数。 因此, (3B.4) 16 =(0011 1011.0100) 2

Step 2: Now, converting the binary number into an octal number which gives (0011 1011.0100)2 = (73.20)8

步骤2:现在,将二进制数转换为八进制数,得出(0011 1011.0100) 2 =(73.20) 8

Therefore, (3B.4)16 = (73.20)8

(3B.4) 16 =(73.20) 8

(3) Conversion of Hexadecimal Number System to Decimal Number System)

Conversion of hexadecimal number into a decimal number can be done using the positional weights by multiplying the positional weights with the corresponding bit and add them all together to obtain the decimal number.

可以使用位置权重将十六进制数转换为十进制数,方法是将位置权重乘以相应的位,然后将它们全部加在一起以获得十进制数。

  • In an integral part of the hexadecimal number, the weights follow the pattern as 160, 161, 162, 163, 164, 165
    16 0,16 1,16 2,16 3,16 4,16 5等从右到左。
    In the fractional part of the hexadecimal number, the weights follow the pattern as 16-1, 16-2, 16-3, 16-4, 16-5
    16 -1,16 -2,16 -3,16 -4,16 -5等从左到右。
    Only thing to be kept in mind is A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
    A = 10B = 11C = 12D = 13E = 14F = 15

Example 1: Convert (75.3)16 into ( ? )10

示例1:将(75.3) 16转换为(?) 10

Solution:

解:

(75.3)16    = 7 * 161 + 5 * 160 + 3 * 16-1
                = 112 + 5 + 0.1875 = (117.1875)10

We multiply each bit with the corresponding positional weight and then add them together to get the result.

我们将每个位乘以相应的位置权重,然后将它们加在一起以获得结果。

Therefore, (75.3)16 = (117.1875)10

(75.3) 16 =(117.1875) 10

Example 2: Convert (CD3.B70A)16 into ( ? )10

示例2:将(CD3.B70A) 16转换为(?) 10

Solution:

解:

(CD3.B70A)16    = C*162 + D*161 + 3*160 + B*16-1 + 7*16-2 + 0*16-3 + A*16-4
                    = 12*256 + 13*16 + 3*1 + 11/16 + 7/256 + 0 + 10/65536
                    = 3072+ 208 + 3 + 0.6875 + 0.0273 + 0.0001
                    = (3283.7149)10

We multiply each bit with the corresponding positional weight and then add them together to get the result.

我们将每个位乘以相应的位置权重,然后将它们加在一起以获得结果。

Therefore, (CD3.B70A)16 = (3283.7149)10

(CD3.B70A) 16 =(3283.7149) 10

翻译自: https://www.includehelp.com/basics/conversion-of-hexadecimal-number-system-to-binary-octal-and-decimal-number-systems.aspx