PDF download Download Article PDF download Download Article

This article will explain how to convert binary (base 2) to hexadecimal (base 16). Whether it is for coding, for math class, or for The Martian, hexadecimal is a useful and powerful shortcut when writing long binary strings. Since both bases are powers of 2, this procedure is much simpler than general conversions such as converting decimal to binary. All you need are basic adding and counting skills to make turn a binary number into hexadecimal.

Method 1
Method 1 of 2:

Making Basic Conversions

PDF download Download Article
  1. Binary numbers can only be 1 and 0. Hexadecimal numbers can be 0-9, or A-F, since hexadecimal is base-16. You can convert any binary string to hexadecimal (1, 01, 101101, etc.), but you need four numbers to make the conversion (0101→5; 1100→C, etc.).[1] For this lesson, start with the example 1010.
    • 1010
    • If you don't have 4 digits, add zeros to the front to make it four digits. So, 01 would become 0001.[2]
  2. Each of the four numbers signifies a type of number decimal system number. The last digit is the one's place. You will make sense of the rest of the digits in the next step. For now, write a small one above the last digit.[3]
    • 1010
    • Note that you are not raising anything to any power -- this is just a way to see what digit means what.
    Advertisement
  3. These are the rest of your place holders. If you're curious, this is because each digit represents a different power of 2. The first is , the second , etc.
    • 1010
    • . If the length is less than 4, then you need to add zeros on the left and make a number four digits long.[4]
  4. Luckily, this conversion is easy once you have four numbers and know what they all mean. If you have a one in the first number, you have one eight. If you have a zero in the second column, you have no fours. The third column tells you how many twos, and the second how many ones. So, for our example:[5]
    • 1010
    • 8 0 2 0
  5. Once you have your new hexadecimal numbers, simply add them up.[6]
    • 1010
    • 8 0 2 0
    • Final answer: The binary number 1010 converts to A in the hexadecimal system.
  6. This is so you don't get confused when reading hexadecimal ("is that a 1 and a 5, or a 15?"). Luckily, the system is super easy, since you can't have a hexadecimal number bigger than 15. Simply start the alphabet with 10, so that:[7]
  7. The following examples have answers in white beneath them. To see the work and the answers, highlight the area under the question by clicking and dragging your mouse over it.
    • Convert 1 to hexadecimal.
      • Add zeros to get four digits: 0001
      • Find your place holders:
      • Add up the digits:
      • Final answer: 1
    • Convert 0101 to hexadecimal.
      • Add zeros to get four digits: 0101
      • Find your place holders:
      • Add up the digits:
      • Final answer: 5
    • Convert 1110 to hexadecimal.
      • Add zeros to get four digits: 1110
      • Find your place holders:
      • Add up the digits:
      • Final answer: E
    • Convert 1011 to hexadecimal.
      • Add zeros to get four digits: 1011
      • Find your place holders:
      • Add up the digits:
      • Final Answer: B
  8. Advertisement
Method 2
Method 2 of 2:

Converting Long Binary Strings

PDF download Download Article
  1. Hexadecimal converts 4 binary digits into one hexadecimal unit. So, in order to convert the number, you first need to break it up into groups of four, starting on the right. For example:
    • Convert into a hexadecimal number.
  2. The zeros will not affect the conversion, but they will make it easier to visualize. Remember, you want all groups of 4-digit binary numbers.[8]
    • Convert into a hexadecimal number.
  3. You'll need to convert each binary set by itself, so separate them on your paper to make them easier to work with. Work on converting each individual string of four into its hexadecimal counterpart. For our example:[9]
  4. Once you've converted all the 4-digit parts, simply ram them together to get your final answer. So, for the example above:[10]
    • 3 B 2 9
  5. There are only 16 possible 4-digit combinations of binary numbers. So, if you don't want to figure out each string individually, you can use this conversion table.[11]
    Binary Hexadecimal
    0 0
    1 1
    10 2
    11 3
    100 4
    101 5
    110 6
    111 7
    1000 8
    1001 9
    1010 A
    1011 B
    1100 C
    1101 D
    1110 E
    1111 F
  6. Advertisement

Community Q&A

Search
Add New Question
  • Question
    How do I convert 100101 binary to hexadecimal?
    Community Answer
    Community Answer
    First add two leading zeros so that you have enough digits to split into equal 4 bit sections: (00)100101. Now split into two equal 4 bit sections (0010)(0101). Convert each four bit section into their respective hex values: 0010 = 2; 0101 = 5; (0010)(0101) = (2)(5) = 25(hex). This should not be confused with the decimal (base 10) value 25.
  • Question
    Why are four binary digits necessary to convert binary to hexadecimal?
    Community Answer
    Community Answer
    Hexadecimal is base-16 whereas binary is only in the form base-2. To account for this, you need four binary digits to allow for the 16 possible characters of hexadecimal. (Think 2^4=16 like how you would calculate the number of alternatives in physics.)
  • Question
    How can I change the hexadecimal binary?
    Community Answer
    Community Answer
    To convert Binary to hexadecimal you need to know that the four numbers each have values. 8 4 2 1 0 1 0 1 These numbers only equal the values if there is a 1 under them for example this number would be 5 because there is only a 1 under 4 and 1. You would then change your answer in this example 5 into hexadecimal which is 5. For 8 number binary like 00101011 you want to split them up into 2 different parts. 0010 and 1011. To do this you do the exact same as you did for the previous one but you put the 2 answer together for example 2 and 13 would be 2D.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

  • To change binary into octal system,you need to group it in set of threes unlike hexadecimal.
  • Binary is base two (there are only two numbers, 1 and 0). Hexadecimal is a base sixteen system. Can you figure out why you need four binary numbers to convert to hexadecimal? It is because you need four separate two's, since .
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

Warnings

  • If you are finding a hex equivalent to a binary-encoded address and if you do this wrong, the results in hex-encoded address inputs will be messed up.
Advertisement

You Might Also Like

Convert Centimeters to InchesConvert Centimeters to Inches
Convert Fractions to Decimals Turn a Fraction into a Decimal
Convert Kilometers to MilesConvert Kilometers to Miles
Change a Common Fraction Into a DecimalChange a Common Fraction Into a Decimal
Convert Hexadecimal to Binary or DecimalConvert Hexadecimal to Binary or Decimal
Convert Binary to Octal NumberConvert Binary to Octal Number
Convert Celsius (°C) to Fahrenheit (°F)°C to °F Conversion: A Complete Guide
Convert from Decimal to BinaryConvert from Decimal to Binary
Convert from Binary to DecimalConverting Binary to Decimal: Positional Notation & Doubling
Calculate Volume in LitresCalculate Volume in Litres
Convert a Number from Decimal to IEEE 754 Floating Point RepresentationConvert a Number from Decimal to IEEE 754 Floating Point Representation
Convert Milliliters (mL) to Grams (g)Convert Milliliters (mL) to Grams (g)
Convert Minutes to HoursConverting Minutes to Hours in Decimal or Hour & Minute Format
Convert from Decimal to HexadecimalConvert from Decimal to Hexadecimal: A Quick Guide + Examples
Advertisement

About This Article

Luigi Oppido
Reviewed by:
Computer & Tech Specialist
This article was reviewed by Luigi Oppido. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 1,199,362 times.
141 votes - 71%
Co-authors: 63
Updated: October 22, 2024
Views: 1,199,362
Categories: Conversion Aids
Article SummaryX

To convert binary to hexadecimal, start by finding a line of 4 binary numbers that you want to convert. Then, write a 1 above the last digit, a 2 above the third digit, a 4 above the second digit, and an 8 above the first digit. Next, use the binary digits to determine how many of each number above them there are. For example, if the first digit in the line of binary is 0, then you would have no eights, since 8 is written above the first digit. Once you know how many of each number you have, add all 4 numbers together to get the hexadecimal conversion. If you want to learn how to memorize when to change numbers into letters for a hexadecimal conversion, keep reading!

Did this summary help you?

Thanks to all authors for creating a page that has been read 1,199,362 times.

Reader Success Stories

  • Community Review

    Community Review

    Aug 19, 2016

    "The 8421 notation and the long string of binary paired off in 4 was good. The best explanation I've seen. I..." more
Share your story

Did this article help you?

Advertisement