How to Convert Binary to Hexadecimal in Less Than 5 Minutes

by charvi_m in Circuits > Software

1429 Views, 14 Favorites, 0 Comments

How to Convert Binary to Hexadecimal in Less Than 5 Minutes

maxresdefault.jpg

Please find the file attached below which walks you through the simple steps to make the conversion.

Introduction

The following is a guide for coders to make quick conversions from binary to hexadecimal. (Base 2 and base 16) This can be used to fulfill coding requirements, for a math/ computer science class, or to learn about lower-level systems that you may want to build on top of. All you will require is some place for you to work out the solutions and basic counting skills

Disclaimer

It is good for readers to know basic decimal to binary conversions, but it is not a requirement. The easy steps below can make the conversions easy without prior knowledge.

Necessary Material

> Paper pen

> Calculator (as per preference)

Introductory Note

> · Binary is a number system in base 2 – each digit can only store 2 values (1 or 0) in computer science they are usually grouped in groups of 8 called (also called a byte)

> Hex is a number system in base 16 – after the number 10, hex uses alphabets till F (number 15)

Table 1- Additional Info and Powers of 2

Picture1.png

We need to know the power of 2’s to carry out the following conversions.

Screen Shot 2021-02-10 at 10.57.11 AM.png

1. Using the workspace, manually separate the binary digits into groups of 4 (also called a nibble) with the powers of 2 written below

Picture1.png

2. If the leftmost nibble group does not have enough binary digits simply add 0’s to make the group of 4.

Screen Shot 2021-02-10 at 11.00.56 AM.png

3. Go in the direction from right to left. (the opposite direction)

Picture1.png

4. Use the first 4 powers of 2 (8421) write them below each nibble. Convert the binary number to decimal using power of 2’s. These are the place holders in number 2^3, 2^2, 2^1, 2^0

Picture1.png

5. Multiply the 8,4,2,1’s with the binary digits (in simple words only multiply 1 binary digit to the following 8,4,2,1.

Picture1.png

6. Add the products within each set of four.

Picture1.png

7. Use letters after values above 9 so 10= A, 11=B, 12=C, 13=D, 14=E, 15=F

Screen Shot 2021-02-10 at 11.03.37 AM.png

8. Find the equivalent hexadecimal number for each group using Powers of 2- (Refer to table 2)

Screen Shot 2021-02-10 at 11.04.06 AM.png

9. Write the converted hexadecimals from right to left (the standard order)

Congractulations!

Pat yourselves. You can now easily convert binary digits to hexadecimals in less than 5 minutes.

If you were confused in writing them from right to left, I suggest try the conventional way of going from left to right, it depends on what you prefer. However, in computer science it Is adviced to go in the opposite direction and then writing it conventionally. Make sure to double check the calculations! Check out wikiHow if you have further interests in learning other conversions. Thank you and enjoy your future computer science endeavors!