How to Convert Binary, Decimal, and Hex Numbers?

Numbers are very important. We use them every day for different tasks. Even computers use numbers at the backend to work. Number systems are of different types. Binary, Decimal, and Hex are common number systems. 

These number systems are taught to students from the lower grades. We have seen many students fail to understand them and convert between systems. 

This article will make it easy for them to convert binary, decimal, and hex number into corresponding systems. 

Three Popular Number Systems

Before getting into the conversion process, you need to understand what number systems are and how they work.  Below, we will walk you through three common number systems. 

1. Decimal Number System

Decimal is the normal number system people use every day. It uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. This system is also called the base-10 system.

Examples of decimal numbers:

  • 15
  • 27
  • 100
  • 456

2. Binary Number System

Binary numbers use only two digits: 0 and 1. This system is called the base-2 system. Computers use binary numbers because computers understand only ON and OFF signals.

Examples of binary numbers:

  • 1010
  • 1111
  • 1001

3. Hexadecimal Number System

Hexadecimal number system uses 16 symbols and is also called base-16. This number system uses: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F

The letters mean:

  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Examples of hexadecimal numbers:

  • 1A
  • 2F
  • FF

Why Is It Necessary to Learn Number System Conversions?

Nowadays, websites like URL-Decode offer free number system conversion tools. Many people ask, then why should they learn those conversions, as technology can help? 

Well, students should learn number system conversions because computers use special numbers to work. People use numbers like 1, 2, 3, and 4 every day. But computers use only 0 and 1.

When students learn number conversions, they can understand how computers think and work. It also helps them get better at math and problem-solving.

How to Convert Binary, Decimal, and Hex Numbers?

Today, websites like URL-Decode.com offer free tools for binary, decimal, and hexadecimal conversions. Still, for students, it is necessary to learn manual calculation. They can use these tools to check their work after solving the problem by hand. And here is the way to perform these conversions manually. 

1. Binary to Hex Conversion

In this method, we change a binary number into a hexadecimal number. The good thing is that every 4 binary digits make 1 hex digit. That makes the work easy.

Here are the steps to convert binary into hex. 

  • Step 1: Make groups of 4. Start from the right side.
  • Step 2: Match each group using the binary to hex table.
  • Step 3: Write the Hex digits and then join all of them together.

Let us simplify this with an example. 

Suppose you want to convert the binary number 10101111 into hex. 

First, make groups of four. Do not group from the left side. Start from the right side like:

  • 1010 1111

Use the table:

  • 1010 = A
  • 1111 = F

Final answer: AF

Cross-check this answer using an online binary to hex converter.

Source: https://url-decode.com/binary-to-hex

2. Hex to Binary Conversion

In this method, we change a hexadecimal number into binary. Every hex digit becomes 4 binary digits.

This conversion involves the following steps:

  1. Take one hex digit
  2. Change it into 4 binary digits
  3. Join all groups

For example, if the hex number is 3F, which you want to convert into binary. First, open a hex to binary table. Using  the table, segregate the hex into groups like:

  • 3 = 0011
  • F = 1111

Now, join them like Join them: 00111111.

Cross-check using hex to binary converter. 

Source: https://url-decode.com/hex-to-binary

This is the final answer.

3. Binary to Decimal Conversion

In this method, we change a binary number into a decimal number using powers of 2.

  • Step 1: Write place values. By this, we meant to write powers of 2 under the binary number.
  • Step 2: Multiply each binary digit by its place value.
  • Step 3: Add all answers together.

Suppose you want to convert the binary number 1011 into decimal. 

Begin by writing values like:

Binary1011
Value8421

Now multiply:

  • 1 × 8 = 8
  • 0 × 4 = 0
  • 1 × 2 = 2
  • 1 × 1 = 1

Now add:

8 + 0 + 2 + 1 = 11

Final answer: 11

Cross-checking using a binary to decimal converter.

Source: https://url-decode.com/binary-to-decimal

Simple, right? 

4. Decimal to Binary Conversion

To convert a decimal into a binary number, you have to divide it by the value of 2 again and again until you reach 0 (zero). Note down the remainder values. They will combine to make the binary number. 

For example, if you want to convert the decimal number 13 into binary, start dividing it by 2 until you reach zero. 

DivisionRemainder
13 ÷ 2 = 61
6 ÷ 2 = 30
3 ÷ 2 = 11
1 ÷ 2 = 01

Now read from bottom to top: 1101. This is your binary number for decimal 13. Verify using a decimal to binary converter. 

Source: https://url-decode.com/decimal-to-binary

Keep in mind that you have to read remainders from bottom to top. Do not read from top to bottom. 

5. Hex to Decimal Conversion

To convert a Hex number to decimal, first consult a hex value chart and then convert letters to numbers. Then multiply numbers by 16. Note down the answers, you will get the decimal number. 

For example, to convert the hex number 2A into decimal, you have to do the following:

  • 2 × 16 = 32
  • A means 10
  • 10 × 1 = 10

Now add: 32 + 10 = 42

Verify by running the hex number 2A through an online hex to decimal converter. 

Source: https://url-decode.com/hex-to-decimal

Got 45? So, your calculation is correct. 

6. Decimal to Hex Conversion

To change decimal numbers into hex, you have to divide the decimal number by 16 until you reach zero. During this, you have to keep on noting down the remainder values. 

For example, to convert the decimal number 254 into hex, you have to do the following:

DivisionRemainder
254 ÷ 16 = 1514
15 ÷ 16 = 015

Now convert remainders:

  • 15 = F
  • 14 = E

Now read from bottom to top: FE

Cross-check the final answer using the decimal to hex utility. 

Source: https://url-decode.com/decimal-to-hex

So, FE is the final answer. 

Conclusion

Binary, decimal, and hexadecimal numbers are very useful in computers. At first, these conversions may look difficult. But they become easy with practice. Always solve step by step. Start with small numbers first. After that, you can try bigger numbers.