Home > Archive > CCNA > December 2000 > Converting IP address to Hex





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Converting IP address to Hex

2000-12-01, 3:19 pm

I'm a newbie on the board, so take it easy on me......
Is it necessary to know how to convert an
IP address to hex?

2000-12-01, 3:29 pm

Nah, I doubt it and if they did that would be one I would get wrong too!

Yankee

2000-12-01, 4:41 pm

In the NetAcad course, we had a question on converting IP addresses to Hex in an exam. I haven't heard of anyone saying that they had it on the actual cert test.

JerryL

2000-12-01, 6:32 pm

You may not need to know it for the exam, but that doesn't mean you don't need to know it at all. =)

Converting IP to hex is cake. As you know decimal uses 0-9 and hex uses 0-9 & A-F to convert a decimal into hex do this:

Let's say we have 8-bit decimal number 199, in binary decimal this would be:

11000111

To convert this keep in mind that hex uses only 4 bits. So to make the above binary format usable for hex you need to divide it into two parts:

1100 0111

Now instead of one byte with values from left to right goes from 128-1, you have two 4 bit bytes with values that goes from 8-1. Hex values are 0-9 and 10=A, 11=b, 12=c, and so on.

So the above hex value would be: C7



------------------
-
B.S. in Telecommunications Management, Network+, CCNA - Still can't type, still no job!

2000-12-01, 6:40 pm

Hi,
A few months back someone posted a really fast method of converting from Dec to Hex. Using the example of 199 from above all you have to do is divide the decimal value by 16. This is 12 in the case of 199, which converts to "C" in hex, the remainder is 7 so 199 dec is C7 hex. I wish I could remember who posted this technique so I could give them credit, anyway hope it helps.

Slacker71

2000-12-01, 7:52 pm

Dividing by 16 for the conversion from decimal to hex is the correct method, and Cisco uses that in their instruction. There are quite a few sites that show how to do it. I've included one below:
http://www.uni-hohenheim.de/institu...csc102/ch3.html


JerryL

2000-12-01, 10:27 pm

quote:
Originally posted by JerryL:
Dividing by 16 for the conversion from decimal to hex is the correct method, and Cisco uses that in their instruction. There are quite a few sites that show how to do it. I've included one below:
http://www.uni-hohenheim.de/institu...csc102/ch3.html


JerryL



Hrmm I never knew the divide by 16 method, that's nifty. Though according to your source that only works for dec to hex conversion and not the other way around. If for whatever reason you wanted to also convert hex back into IP you would need to split the bytes as demonstrated. =)



------------------
-
B.S. in Telecommunications Management, Network+, CCNA - Still can't type, still no job!
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net