Dotted decimal

From LQWiki
Jump to navigation Jump to search

Dotted decimal is a representation of a binary number, most commonly used for IPv4 IP addresses.

An IP address is a 32 bit number such as:

11010001100110001010001100010000

To represent this is dotted decimal, we group the number into blocks of 8 bits:

11010001 10011000 10100011 00010000

then convert each block into the decimal representation of an 8 bit number:

11010001 10011000 10100011 00010000
  209       152      163      16

Finally, these numbers are written down with a decimal point or period as a separator:

209.152.163.16