# Homework Help: Hexidecimal to Binary question

Tags:
1. Aug 31, 2015

### Aristotle

1. The problem statement, all variables and given/known data
After being given a decimal base 10 #: 716, I've converted it to hexidecimal and got 2CC. However, if I want to convert 2CC to BINARY, do I find numbers of base 2s that ADD up to 716 ( 1011001110) OR do I find binary values for 2 , C , C separately? (Such as 0010 1100 1100)

2. Relevant equations
Bases of 2 values:

512 256 128 64 32 16 8 4 2 1

2. Aug 31, 2015

### Staff: Mentor

Converting from hex to binary is very simple: just convert each hex digit to its binary equivalent. So 2CC16 is just as you have it, 0010 1100 11002. All the powers of 2 are automatically taken care of.

3. Aug 31, 2015

### Aristotle

Ah okay so in never the case you never want to expand the bases to find what sums to 716...but have to break them apart in 4 bits?

4. Aug 31, 2015

### Staff: Mentor

I'm not sure I understand your question. If you have converted 71610 to hex, you have already done all of the hard work. Going one more step in converting hex to binary is very simple -- just convert each hex digit to its binary equivalent.

5. Aug 31, 2015

### Elroch

Either. But when you realise that, you will see that one of your answers has an error. Find which one, and you should be happy.

6. Aug 31, 2015

### Aristotle

So let's say my Hexidecimal value was actually 2CC.AB851EB.....to Binary it would be 0010 1100 1100. 1010 1011 1000 0101 1110 1011 ?

7. Aug 31, 2015

### Staff: Mentor

Yes. I'm assuming that you have converted each hex digit correctly -- I didn't check.

A simpler example would be 10.2510. In hex, this would be A.4 (10 + 4/16). The direct binary conversion would be 1010.0100 . This is not how numbers with decimal fractions are actually stored, but I don't think that's what you're concerned with.

8. Aug 31, 2015

### Aristotle

Thank you for the help!

9. Aug 31, 2015

### Aristotle

Wait last question...
So if say I had a NUMBER in hexidecimal like
42.2B ....converting that to BINARY...
just like the example you shown...
would you convert 42 to 0100 0010 ?

10. Aug 31, 2015

### Aristotle

0100 = 4
0010 = 2

Just like with 2CC we did binaries separately. or is numbers an exception?

11. Aug 31, 2015

### Staff: Mentor

Yes.

4216 means 4 X 16 + 2 X 1, right?
In the 0100 group, the rightmost 0 bit is the number of 16s. The next digit to the left (0) is the number of 32's. Continuing to the left, the 1 digit is the number of 64's, but 1 times 64 is the same as 4 times 16. So 0100 0010 means 1 X 64 + 2 X 1, which is the same as 4 X 16 + 2 X 1. Instead of dealing with all those powers of 2 (1, 2, 4, 8, etc.), it's easier to deal with powers of 16 (1, 16, 256, 4096, etc.) by clumping each group of four binary digits into one hex digit. As I said, it's very easy going back and forth between hex and binary, but much harder to convert from either of those bases to base 10 or vice versa.