Options

# math

Member Posts: 1,096
so its getting to be about time for me to learn how to subnet... better... so i want to start out and actually learn how to convert from bin to dec, dec to bin, and throw hex in there somewhere. i'd sayh i have the basics down but is there any site that offers questions on the subject, maybe simular to subnettingquestions.com

any ideas?

thanks
Fantastic. The project manager is inspired.

In Progress: 70-640, 70-685

• Options
Member Posts: 1,693 ■■■□□□□□□□
http://www.learntosubnet.com/

IF you can convert from decimal to binary, then HEX is a cinch.

All you have to do is group the nibbles together and then convert the nibbles into a Hex value.
Nibbles are groupings of 4 bits.

make it look like 0011 0101, then HEX value would be 0x35

hex starts with 0 and then goes to 9, then 10 is A, 11 is B ,12 is C, 13 is D, 14 is E, 15 is F
If you notice HEX has a base of 16 (0-15) Binary has a base of 2, decimal has a base of 10

So if you had 11110110 the nibbles are 1111 0110
that is 15 and 5 so the hEX value would be 0xF5
There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
• Options
Also check out the Subnetting section in our CCNA FAQ for more links and tips concerning subnetting:
www.techexams.net/forums/viewtopic.php?t=7268
• Options
Member Posts: 21 ■□□□□□□□□□
Netstudent wrote:
http://www.learntosubnet.com/

IF you can convert from decimal to binary, then HEX is a cinch.

All you have to do is group the nibbles together and then convert the nibbles into a Hex value.
Nibbles are groupings of 4 bits.

make it look like 0011 0101, then HEX value would be 0x35

hex starts with 0 and then goes to 9, then 10 is A, 11 is B ,12 is C, 13 is D, 14 is E, 15 is F
If you notice HEX has a base of 16 (0-15) Binary has a base of 2, decimal has a base of 10

So if you had 11110110 the nibbles are 1111 0110
that is 15 and 5 so the hEX value would be 0xF5

I think you mean 15 and 6 then 0xF6
• Options
Member Posts: 1,693 ■■■□□□□□□□
i think I was stuck on the first example.
There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
• Options
Member Posts: 265
Darthn3ss wrote:
so its getting to be about time for me to learn how to subnet... better... so i want to start out and actually learn how to convert from bin to dec, dec to bin, and throw hex in there somewhere. i'd sayh i have the basics down but is there any site that offers questions on the subject, maybe simular to subnettingquestions.com

any ideas?

thanks

Binary to decimal and decimal to binary - is pretty easy when you get the basics down. Let me show a little trick that I use, which might help you out.

1.0 Binary-to-decimal conversion

10011010
Remember the order: 128, 64, 32, 16, 8, 4, 2, 1
128 + 16 + 8 + 2 = 154

2.0 Decimal-to-Binary conversion

185
I always start with the left most value in the binary string, which just so happens to be the largest value. Start at the left, and work your way right, subtracting the value from you’re the number you want to convert. Example:

Step 1: 185 – 128 = 57 -->10000000
Note: you can not subtract 64 from 57, so the next most number is 32
Step 2: 57-32 = 25 -->> 10100000
Step 3: 25 – 16 = 9 -->> 10110000
Step 4: 9 – 8 = 1 -->> 10111000
Step 5: 1 -1 = 0 - -> 10111001

3.0 Hex

9
10=A, 11=B, 12=C, 13=D, 14=D, 15=F

10001000 break it down into 1000|1000 = 88 because the values are 8,4,2,1 and 8,4,2,1. Not sure how to really explain this in detail, maybe someone can help me, but let us try another example.

11001111 = (1100|1111) = CF or 207

hope this helps a little... good luck
Arrakis
• Options
Member Posts: 92 ■■□□□□□□□□
datchcha wrote:
3.0 Hex

9
10=A, 11=B, 12=C, 13=D, 14=D, 15=F

10001000 break it down into 1000|1000 = 88 because the values are 8,4,2,1 and 8,4,2,1. Not sure how to really explain this in detail, maybe someone can help me, but let us try another example.

11001111 = (1100|1111) = CF or 207

hope this helps a little... good luck

This may be a bit too detailed, but this shows why we can just split the octet in half when converting from binary to hex:

Consider a number N between 0 and 255 written in binary

N = b7*2^7 + b6*2^6 + b5*2^5 + b4*2^4 + b3*2^3 + b2*2^2 + b1*2^1 + b0*2^0, where the bi = 0, 1

Now factor 2^4 out to get

N = 2^4*(b7*2^3 + b6*2^2 + b5*2^1 + b4*2^0) + b3*2^3 + b2*2^2 + b1*2^1 + b0*2^0
It is this step here where the octet is split in half

Because 2^4 = 16^1 and 16^0=1, we can rewrite to get

N = 16^1*(b7*2^3 + b6*2^2 + b5*2^1 + b4*2^0) + 16^0*(b3*2^3 + b2*2^2 + b1*2^1 + b0*2^0)

Because both b7*2^3 + b6*2^2 + b5*2^1 + b4*2^0 and b3*2^3 + b2*2^2 + b1*2^1 + b0*2^0 are between 0 and 15, let the first be equal to h1 and the second be equal to h0 where 0<=hj<=F.
It is here where we convert each group of four bits to hex.

Then we have N = 16^1*h1 + 16^0*h0 which is the same number written in hexadecimal.
I recognize the lion by his paw.
--Jacob Bernoulli
• Options
Member Posts: 1,096
yeah i get the basics i just need to start doing practice problems to get me up to speed i guess.
Fantastic. The project manager is inspired.

In Progress: 70-640, 70-685
• Options
Member Posts: 92 ■■□□□□□□□□
Darthn3ss wrote:
yeah i get the basics i just need to start doing practice problems to get me up to speed i guess.

I have a worksheet of conversions from binary, decimal and hex into the others. It only involves numbers between 0 and 255 and it's in .txt format, but it's useful. Let me know if you're interested.
I recognize the lion by his paw.
--Jacob Bernoulli
• Options
Member Posts: 1,096
NeonNoodle wrote:
Darthn3ss wrote:
yeah i get the basics i just need to start doing practice problems to get me up to speed i guess.

I have a worksheet of conversions from binary, decimal and hex into the others. It only involves numbers between 0 and 255 and it's in .txt format, but it's useful. Let me know if you're interested.
very interested if you could do that.
Fantastic. The project manager is inspired.

In Progress: 70-640, 70-685