# Question about converting hex to decimal, binary to hex, etc

jsond
Posts:

**66**Member ■■□□□□□□□□
in CCNA & CCENT

I have just started my ccna traing and would like to know which conversions are necessary to know for the exam. Obviously binary to decimal and decimal to binary is necessary and I can do that fairly quickly. But out of the following, which (or all) are necessary:

BIN to HEX and HEX to BIN?...There is a helpful post below about this so I would guess yes.

HEX to DEC and DEC to HEX? These I am having problems with. I am continuing to search for more explanatons as the ones I have read so far are confusing. HEX to DEC I can do but the only method that I have found that I understand takes some time...and DEC to HEX I am lost at this point on how to do.

I hope this isn't too broad of a question but any help would be appreciated. My main issues are:

Is it absolutely necessary to be able to convert HEX to DEC and DEC to HEX? All the others I can do and fairly quickly. But before I take too much time trying to learn those 2 I want to make sure its necessary for the exam.

Thanks in advance for any help.

BIN to HEX and HEX to BIN?...There is a helpful post below about this so I would guess yes.

HEX to DEC and DEC to HEX? These I am having problems with. I am continuing to search for more explanatons as the ones I have read so far are confusing. HEX to DEC I can do but the only method that I have found that I understand takes some time...and DEC to HEX I am lost at this point on how to do.

I hope this isn't too broad of a question but any help would be appreciated. My main issues are:

Is it absolutely necessary to be able to convert HEX to DEC and DEC to HEX? All the others I can do and fairly quickly. But before I take too much time trying to learn those 2 I want to make sure its necessary for the exam.

Thanks in advance for any help.

0

## Comments

343Memberhttp://www.techexams.net/forums/viewtopic.php?t=6881

66Member ■■□□□□□□□□thanks porengo! However that thread only mentions about HEX to BIN and BIN to HEX and that was the one I mentioned when I said there was a helpful post below..and it was a big help.

However my main issue is converting DEC to HEX, as im still having problems with it. I can do HEX to DEC but the method I found takes me a while.

So my main question is if you have to know DEC to HEX and HEX to DEC (all other conversions I can do) . I believe you probably need to, I just wanted to know for sure.

9Member ■□□□□□□□□□DEC > HEX

this is easy because you just go to DEC to BIN to HEX e.g

DEC = 66 and we want it in HEX

convert 66 to BIN

01000010

8421 8421

split into two: 0100 0010

we have 4 in the left column and 2 in the right column which equals 42 in HEX

easy?

now HEX to DEC

42 in HEX to DEC

16 1

4 2

| |

| |

| ___ 1 x 2 = 2

|______16 x 4 = 64

add the two together = 66 in DEC

hop eit helps..

66Member ■■□□□□□□□□The funny thing is I was just thinking that if I cannot convert DEC to HEX straight up (since the tut's I found are confusing) then I would do just like you said and convert DEC to BIN 1st and then covert the BIN to HEX. That is what I have been doing I just was hoping for a faster way. But to me that is easy. Maybe not the fastest way but it works for me.

As far as your explanation about HEX to DEC, that is also the way I have been doing it but that was the one I mentioned takes time for me and wasn't sure if there was a faster way. I just worry I will take too much time if the HEX # is something like 2531 becasue then I have to:

1 x 1 = 1

3 x 16 = 48

5 x 256 = 1280

2 x 4096 = 8192

add all the remainders: 1 + 48 + 1280 + 8192 = 9521(DEC)

That is the way I have been doing it but takes me a little bit to figure out 5 x 256 and 2 x 4096, etc. In other words any HEX # that is more than 2 digits might take me some time. But either way what works works, I just don't want to spend too much time calculating since time is precious on this exam from what I have read.

Thanks again!

1Registered Users ■□□□□□□□□□1,340Member12806

12806 / 16 = 800.375; 0.375 x 16 = (6)

800 / 16 = 50; 0.0 x 16 = (0)

50 / 16 = 3.125, 0.125 x 16 = (2)

(3)

0x3206

Divide the decimal number by 16. write down the remainder. Repeat, writing down the remainder each time (from right to left - This is one case for programming where a stack comes in very handy) until the whole number = 0.

BTW, this should work for any base, just substitute the base for 16.

493 / 2 = 246 + (1)

246 / 2 = 123 + (0)

123 / 2 = 61 + (1)

61 / 2 = 30 + (1)

30 / 2 = 15 + (0)

15 / 2 = 7 + (1)

7 / 2 = 3 + (1)

3 / 2 = 1 + (1)

1 / 2 = 0 + (1)

111101101

R&S: CCENT→CCNA→CCNP→ CCIE [ ]Security:CCNA [ ]Virtualization:VCA-DCV [ ]