Binary to hexadecimal conversion plus various hexadecimal operations

Source: Internet
Author: User
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 to hexadecimal conversion plus various hexadecimal operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.