Convert Hexadecimal to Binary Bits

  • Context: High School 
  • Thread starter Thread starter Rubik
  • Start date Start date
  • Tags Tags
    hexadecimal Numbers
Click For Summary

Discussion Overview

The discussion revolves around the conversion of hexadecimal numbers to binary bits, exploring various methods and approaches for this conversion. Participants also touch upon related concepts, such as converting binary numbers to polynomial form.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • One participant notes that each hex digit corresponds to four bits, explaining that this is due to the ability of one hex digit to represent sixteen different numbers.
  • Another participant describes a method for converting decimal numbers to binary, detailing a recursive approach based on dividing by 2 and tracking remainders.
  • A different participant emphasizes that once the binary equivalents of hex digits are memorized, the conversion process becomes simpler, providing a specific example of converting a hex number to binary.
  • One participant suggests using a lookup table for converting hex characters to their binary equivalents, listing the binary representations for each hex digit.
  • A participant expresses confidence in converting hexadecimal to binary but then inquires about converting binary to polynomial form, prompting further clarification on the meaning of this conversion.
  • Another participant challenges the idea of converting numbers to polynomials, asking for clarification on the intended meaning.
  • A later reply attempts to clarify the conversion of binary numbers to a sum of powers of 2, drawing parallels to decimal representations.

Areas of Agreement / Disagreement

Participants generally agree on the methods for converting hexadecimal to binary, with multiple approaches discussed. However, the inquiry about converting binary to polynomial form introduces some uncertainty, as not all participants agree on the terminology or the process involved.

Contextual Notes

Some methods discussed rely on memorization of binary equivalents for hex digits, while others involve more complex mathematical reasoning. The discussion on converting binary to polynomial form remains somewhat unresolved, as participants seek clarification on definitions and processes.

Who May Find This Useful

This discussion may be useful for individuals interested in number systems, particularly those learning about conversions between hexadecimal and binary formats, as well as those exploring the relationship between binary numbers and polynomial expressions.

Rubik
Messages
95
Reaction score
0
How do you convert hexadecimal numbers into bianry bits?
 
Mathematics news on Phys.org
First of all, it's handy to know that each hex digit is four bits. The reason for this is that with one hex digit one can represent sixteen different numbers, whereas it takes four bits to do so.

So, take the hexadecimal number, and just convert each hex digit in it into a four-bit binary number. The result will be the correct binary number.
 
I was thinking about it some more, and I think that a really neat way to compute the binary form of each hex digit is as follows:

e.g. 13 (decimal) = d (hex)

A binary number is just a sum of powers of 2. You divide the number by 2. If the remainder is 1, you know that there is a 1 in the 20 place (the "ones" or "units" place). If the remainder is 0 (i.e. the number is even) there cannot be anything in the 20 place.

13/2 = 6 r 1

Binary result so far: _ _ _ 1

Now you apply this procedure (subtract 1 if odd and then divide by 2) recursively to the result. In binary, dividing by 2 is like getting rid of the least significant bit, and shifting all the other bits to the right by one place. So, when considering whether 6 is even or odd, now you're considering whether the bit in the 21 place is 1 or 0:

6/2 = 3 r 0

Binary result so far: _ _ 0 1

3/2 = 1 r 1

Binary result so far: _ 1 0 1

1/2 = 0 r 1

Binary result: 1 1 0 1

Check:

1101 = 23 + 22 + 20 = 8 + 4 + 1 = 13 (decimal), which is correct.

Thoughts?
 
That's a standard method of converting decimal numbers to binary, and could be used to convert individual hex "digits" to binary.

But once you have learned that
[itex]1_{16}= 1_2[/itex], [itex]2_{16}= 10_2[/tex], [itex]3_{16}= 11_2[/itex], [itex]4_{16}= 100_2[/itex], [itex]5_{16}= 101_2[/itex], [itex]6_{16}= 110_2[/itex], [itex]7_{16}= 111_2[/itex], [itex]8_{16}= 1000_2[/itex], [itex]9_{16}= 1001_2[/itex], [itex]A_{16}= 1010_2[/itex], [itex]B_{16}= 1011_2[itex], [itex]C_{16}= 1100_2[/itex], [itex]D_{16}= 1101_2[/itex], [itex]E_{16}= 1110_2[/itex], [itex]F_{16}= 1111_2[/itex]<br /> <br /> converting hexadecimal to binary is much simpler because [itex]16= 2^4[/itex].<br /> <br /> For example, to change [itex]34A31FB_{16}[/itex] to binary, write each digit in binary and combine them: [itex](0011)(0100)(1010)(0011)(0001)(1111)(1011)_2[/itex][itex]= 11010010100011000111111011_2[/itex].[/itex][/itex][/itex]
 
Last edited by a moderator:
Rubik said:
How do you convert hexadecimal numbers into bianry bits?

You can use a simple lookup table to convert a hex character to its binary equivalent:

0:0000 1:0001 2:0010 3:0011
4:0100 5:0101 6:0110 7:0111
8:1000 9:1001 A:1010 B:1011
C:1100 D:1101 E:1110 F:1111
 
Thank you! Now I am pretty confident with converting hexadecimal to binary and was wondering how do you now convert binary to polynomial form?
 
Numbers are not polynomials. You will have to explain what you mean by converting a number to a polynomial.
 
Rubik said:
Thank you! Now I am pretty confident with converting hexadecimal to binary and was wondering how do you now convert binary to polynomial form?
Do you mean convert a binary number to a sum of powers of 2?

If that's what you mean, binary numbers work the same way as decimal numbers, where each binary or decimal place represents some power of 2 or 10.

For example, 41310 = 4 x 102 + 1 x 101 + 3 x 100.

1011102 = 1 x 25 + 0 x 24 +1 x 23 + 1 x 22 + 1 x 21 + 0 x 20.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
11K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K