Binary and Hexadecimal Conversions, Examples, and Tips for Beginners

Posted on May 30, 2025 by Boden Bensema
Digital Logic

Binary numbers are something commonly used in our modern world. In fact, the device you're using right now is using binary to render this article!

In this guide to binary and hexadecimal for beginners, you will how to identify number systems, converting binary and hexadecimal into decimal, and how computers use these systems internally.

Base Two and Base Ten Systems

Our everyday counting system (1, 2, 3, 4, etc.) is what we call base-10. This is because we have ten digits: 0 through 9.

Base two systems are simply systems with only 2 digits. This is what binary is, because it only uses a 1 and a 0.

How Digital Electronics Use Binary

When someone says their device is digital, that means their device runs on Boolean logic.

Boolean logic is like a light switch. It has two states (or digits): on and off. This means your light switch is a base two system, just like binary.

Digital electronics use Boolean logic in the form of binary. Behind the scenes, 1s and 0s are just two different voltages in digital electronics.

To distinguish a 1 from a 0, digital electronics use something called a voltage threshold.

  • A "1" in digital logic would be considered a signal of about 2V2V
  • A "0" would be considered a anything below a 1.9V1.9V would be a 0.

How to Convert Binary to Decimal

To learn how to convert decimal numbers to binary, it would be useful to realize how to convert binary numbers to decimal first. Let's say we are dealing with the binary number 1101. First, we take into account the number of digits in this number, which is 4. Then, from right to left, we add up the values according to their place in the number. The formula is:

B2pB \cdot 2^{p}

Where

  • BB is the bit value (0 or 1)
  • pp is the position of the bit. We start at 0 for the rightmost bit (also called the Least Significant Bit, or LSB) and add one for every bit to the left.

Let's take a look at the binary number 11011101. Starting with the LSB, we find 120=11 \cdot 2^0 = 1.

To find the rest of the number's value, we add all the digits together like this:

120+021+122+123=131 \cdot 2^0 + 0 \cdot 2^1 + 1 \cdot 2^2 + 1 \cdot 2^3 = 13

This works with any binary number. This number has four digits, so it can have 242^4 or 1616 different combinations.

One of those combinations is 0, so a four-digit binary number can be any whole number from 0 to 15. Here's a quick chart to help visualize the binary conversion from decimal

DecimalBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
101010
111011
121100
131101
141110
151111

How to Convert Decimal to Binary

To convert decimal numbers to binary, we will look at the number 53. The method for this is dividing this number by two, and keeping the remainder separate from the result. Then, by looking at the remainders, we get the binary number. This is how it would look to perform this operation on 53:

53/2=26 remainder 153 / 2 = 26 \ remainder \ 1

26/2=13 remainder 026 / 2 = 13 \ remainder \ 0

13/2=6 remainder 113 / 2 = 6 \ remainder \ 1

6/2=3 remainder 06 / 2 = 3 \ remainder \ 0

3/2=1 remainder 13 / 2 = 1 \ remainder \ 1

1/2=0 remainder 11 / 2 = 0 \ remainder \ 1

Then, by looking at the remainders, the first binary digit is the last remainder, which was 1. Then we take the remainders in reverse order to get 110101110101.

We can double-check this work by converting this number back into decimal with the previous equation:

120+021+122+023+124+125=531 \cdot 2^0 + 0 \cdot 2^1 + 1 \cdot 2^2 + 0 \cdot 2^3 + 1 \cdot 2^4 + 1 \cdot 2^5 = 53

As you work more with binary numbers, it gets easier to find patterns in your head, and you can do almost all problems quickly and efficiently.

My Grandma used to work at IBM in the 70's, and she was able to add and subtract binary (in her head) faster than decimal. Practice helps a lot in all areas of life, but especially in math and science.

Hexadecimal Explained Simply

Hexadecimal (also called hex) is a base-16 number system, and it is used for simplifying binary code to a more readable (but still very difficult for large programs) format for humans.

The possible characters are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Because the A-F digits aren't traditionally numbers, understanding hexadecimal as a beginner can be tricky. Here's a conversion table for the hex value and the corresponding decimal value:

DecimalHexadecimal
00
11
22
33
44
55
66
77
88
99
10A
11B
12C
13D
14E
15F

Choosing a base-16 system may seem odd, but think back to how many combinations 242^4 had. It had 16 total different combinations. Hexadecimal also has 16 total combinations.

This makes it very easy to convert a binary number to hexadecimal. If you choose any 1 hexadecimal digit, let's say A, you can convert that directly into a 4-digit binary number.

How to Convert Hexadecimal to Decimal

To start, let's use AAAA. To convert AAAA to decimal:

A160+A161=10+160=170A \cdot 16^0 + A \cdot 16^1 = 10 + 160 = 170

Now try one on your own:

Convert 5FD5FD to binary and decimal.

How to Convert Decimal to Hexadecimal

Converting decimal to hexadecimal is similar to converting decimal to binary. You divide the decimal number by 16 until you get 0.

Try converting 53 to decimal

Conclusion

The binary number system and hexadecimal number system are both important to learn because of their prevalence in digital computations and data. In understanding how computers work, you would get lost without a basic understanding of binary numbers.

Binary represents the fundamental on/off nature of digital electronics, while hexadecimal offers a good way to handle binary values. Mastering conversions between these systems helps in understanding data storage, computer architecture, and programming.

People Also Ask

Where can I apply this knowledge of digital logic?
To learn more about how computers use binary and where you can apply your knowledge, try taking a look at this article on how to design computer architecture.
What are some next steps to dive deeper into binary operations?
If you are looking for more information on binary operations, try reading my article about how to do arithmetic with binary numbers.

About the Author

This article was written by Boden Bensema, an electronics hobbyist focused on teaching beginner-friendly circuit design, breadboarding, and electronics fundamentals.

About page