Binary to hexadecimal conversion plus a variety of hexadecimal operations, binary hexadecimal

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Hexadecimal 0 1 2 3 4 5 6 7 8 9 a B c d e f

Binary 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111

So how to convert 5D to binary?

The table above shows that 5 corresponds to 101, and d corresponds to 1101, then 5d is 01011101.

How can we convert 101101011010101 to hexadecimal format?

Separate the preceding four numbers. 0101 corresponds to 5, 1010 corresponds to d, 101 corresponds to a, corresponds to 5

Then the hexadecimal value of 101101011010101 is 5ad5.

The addition and subtraction of various hexadecimal numbers is too easy. Let's talk about how to perform multiplication between hexadecimal numbers.

First, construct a hexadecimal FF multiplication table.

1*1 = 1

1*2 = 2 2*2 = 4

1*3 = 3 2*3 = 6 3*3 = 9

1*4 = 4 2*4 = 8 3*4 = C 4*4 = 10

1*5 = 5 2*5 = A 3*5 = F 4*5 = 14 5*5 = 19

1*6 = 6 2*6 = C 3*6 = 12 4*6 = 18 5*6 = 1E 6*6 = 24

1*7 = 7 2*7 = E 3*7 = 15 4*7 = 1C 5*7 = 23 6*7 = 2A 7*7 = 31

1*8 = 8 2*8 = 10 3*8 = 18 4*8 = 20 5*8 = 28 6*8 = 30 7*8 = 38 8*8 = 40

......

......

So how do I calculate 1E * 5D?

1E

* 5D

---------

186

+ 96

---------

AE6

Obtain the value of E * D according to the FF multiplication table. How can we calculate E * D? Calculate E * D and convert it to 14*13 = 182 in decimal format.

182 is converted to hexadecimal, 182 divided by 16 equals to more than 11 6, so the hexadecimal 182 is B6, 1 * D = D, so 1E * D is D * 10 (Shifts one digit left) + B6 = 186

Similarly, 1E * 5 equals 96.

So 1E * 5D equals 186 + 96*10 = AE6

All the preceding numbers are in hexadecimal format.

So what is 6F/3A equal?

1

| -------

3A | 6F

3A

---------

35

6F/3A = 1 + 35

Binary Conversion to hexadecimal Calculation Method

Relationship between binary and hexadecimal

Binary 0000 0001 0010 0011 0100 0101 0110 0111

Hexadecimal 0 1 2 3 4 5 6 7

Binary 1000 1001 1010 1011 1100 1101 1110 1111

Hexadecimal 8 9 a (10) B (11) c (12) d (13) e (14) f (15)

The binary number of four digits can be used to represent a hexadecimal system. For example, 3A16 is converted to binary:

3 is 0011, A is 1010, and merged to 00111010. You can remove the leftmost 0 to 1110102.

To convert the binary to hexadecimal, you only need to separate the digits of the binary from the right to the left, and compare the units with the hexadecimal values.

Reference: zhidao.baidu.com/question/69771190.html

Binary and hexadecimal operations and decimal conversion

In decimal format, a few digits are taken into one place, for example, in decimal format. When the number is 10, a few digits are taken one by one. Similarly, binary and hexadecimal are also true.

In hexadecimal notation, given that Arabic numerals are only 0-9, the first six letters (A-E) must be capitalized, where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. To convert decimal to hexadecimal, we need to use the remainder method except K (base number), that is, the method used upstairs. The same is true for decimal binary. Example:

1. Decimal 168 to binary:

168/2 = 84 ...... 0

84/2 = 42 ...... 0

42/2 = 21 ...... 0

21/2 = 10 ...... 1

10/2 = 5 ...... 0

5/2 = 2 ...... 1

2/2 = 1 ...... 0

1/2 = 0 ...... 1 (Note: The first time must be zero)

So 168 = 10101000 (2) (Note: Write the remainder backwards)

2. Convert decimal 168 to hexadecimal:

168/16 = 10 ...... 8

10/16 = 0 ...... 10 (10 =)

Therefore, 168 = A8 (16) (same as above)

What if I want to convert it back?

The method has been specified on the upstairs. If you do not understand it, I will explain it again:

For example, convert 1.16 hexadecimal B3 to decimal:

Because B = 11

So B3 (16) = 11*16 ^ 1 + 3*16 ^ 0 = 179

2. Convert binary 10010 to decimal:

10010 (2) = 1*2 ^ 4 + 0*2 ^ 3 + 0*2 ^ 2 + 1*2 ^ 1 + 0*2 ^ 0 = 18

Do you understand?

To put it bluntly, it is in the nth bit (set to the nth bit) on the use of this number on the base number (set to K) (N-1) to the power.

I haven't learned how to convert binary and hexadecimal systems. Frankly speaking, I won't ~~ The general method is converted to decimal before conversion.

As for the decimal point, I understand this. addition, subtraction, multiplication, division, and four mixed operations are applicable in any system. (You can verify by yourself. I will not describe them too much. Method: Use the number in this system to perform four mixed operations, and follow the carry principle to get a result and convert them {operation items} into Decimal for computation. If the result is converted to the original hexadecimal system, you will find that the result is the same ), therefore (for example ):

Example: 1. Binary 11/10 = 1.1 (2)

11 (2) = 3

10 (2) = 2 {Needless to say}

3/2 = 1.5

So 1.1 (2) = 1.5

2. Binary 1/100 = 0.01 (2)

100 (2) = 4

1 (2) = 1

1/4 = 0.25

So 0.01 (2) = 0.25

That is to say, 0.1 in binary represents 0.5 in decimal, and 0.01 in binary represents 0.25 in decimal. Why?

Further analysis:

0.1 is a tenth in decimal format, 0.01 is 1% (a tenth of the square), and 0.001 is 1‰ (a tenth of the cube )...... From this we can infer that in binary: 0.1 is 1/2 (binary is one of 10 (2) points), and 0.01 is 1/4 (1/2 square, the binary is the square of one of 10 (2) points. 0.001 is 1/8 (1/2 of the cube, and the binary is the cube of one of 10 (2) points )...... Similarly, I don't need to say more about hexadecimal decimal places?

I hope this will help you. (The fractional part is my personal understanding. If not, please forgive me .)

Reference: to add the following, the numbers in the lower half angle brackets are carry base numbers. Not marked in decimal format .... Remaining full text>