thedark Second Lieutenant
Joined: 30 Jul 2005
Posts: 1074
|
Posted: Sun Jul 31, 2005 8:13 am Post subject: IP addresses as 32-bit binary numbers |
|
|
An IP address is represented by a 32 bit binary number. As a quick review, remember that each binary digit (bit) can be only 0 or 1. In a binary number, the value of the right-most bit (also called the least significant bit) is either 0 or 1. The corresponding decimal value of each bit doubles as you move to the left in the binary number. So the decimal value of the 2nd bit from the right is either 0 or 2. The third bit is either 0 or 4, the fourth bit 0 or 8, and so on.
IP addresses are expressed as dotted-decimal numbers. The 32 bits of the address are broken into four octets (an octet is a group of 8 bits). The maximum decimal value of each octet is 255. The largest 8 bit binary number is 11111111. Those bits, from left to right, have decimal values of 128, 64, 32, 16, 8, 4, 2, and 1. Added together, they total 255. |
|