[NTLUG:Discuss] ...a little binary IP help, please...
Fred James
fredjame at concentric.net
Wed Jun 27 10:05:54 CDT 2001
Thanks all.
I followed the (corrected) logic on the next address represented
(213.95.15.200 or 11010101 0101111 00001111 11001000) and saw that it
worked.
I'll take the 168/68/104 as a typo and report it to the publisher.
Thanks again - I like it when things work the way they are suppose to.
Steve Baker wrote:
>
> Fred James wrote:
> >
> > I am trying to understand the binary representation of an IP address,
> > and the process of ANDing with the (sub)netmask.
> > The book states that the decimal address 192.168.0.20 would be 11000000
> > 01101000 00000000 00010100 in binary, and then labels those bytes as
> > 192.68.0.20
> > I thought the place values were: 256 128 64 32 16 8 4 2 1, in which case
> > x.x.0.20 is OK, but the 192.168.x.x, or 192.68.x.x seems wrong.
>
> 11000000 binary is 192 in decimal - so the first byte is OK.
>
> But, yes - that second byte looks wrong:
>
> 01101000 binary is 104 in decimal
> 168 decimal is 10101000 in binary
> 68 decimal is 01000100 in binary
>
> ...presumably a typo in the book. It looks like they meant to use
> 168 but switched the first two digits of the binary number.
>
> There's a *reason* we don't use binary in human interfaces!
>
> ----------------------------- Steve Baker -------------------------------
> HomeMail : <sjbaker1 at airmail.net> WorkMail: <sjbaker at link.com>
> HomePage : http://web2.airmail.net/sjbaker1
> Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
> http://agtoys.sf.net http://prettypoly.sf.net
> http://freeglut.sf.net http://toobular.sf.net
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
--
...small is beautiful...
More information about the Discuss
mailing list