The IP address structure contains the network address (common to all hosts and devices located on one network) and the node address (sometimes called host ID), which is a unique assignment for each connection or device on one network. The IP address has no correlation to the MAC address coded into each network adapter at the factory.

IP addresses have been grouped into several classes. Classes A, B and C are the most common. Class D and E are rarely used.


Class A:
  10.0.0.1

    10        0        0        1
 00001010 00000000 00000000 00000001
 |  NW  | |       Node             |

 First bit is always a zero, which leaves seven bits
 for the network (NW) portion of the address. This 
 provides addresses from 1 to 126 for the NW portion
 and 16,777,214 possible host IDs in the Node portion.


Class B:
 128.0.0.1

   128        0        0        1
 10000000 00000000 00000000 00000001
 |       NW      | |     Node      |
 
 The first two bits are always 10 in a class B address.
 This leaves 14 bits for the network portion, from 128
 to 191. The node portion drops to 16 bits, or 65,534
 available host IDs.

Class C:
 192.0.0.1

   192        0        0        1
 11000000 00000000 00000000 00000001
 |           NW           | | Node |

 The first three bits are always 110 in a class C address.
 The network portion moves up to 22 bits, or 2,097,152
 networks, from 192 to 223. The nodes portion drops to 
 254 possible hosts.

Note that the number of the nodes or host IDs is always two less than the full number. For example, looking at the class C address, node portion, it would appear that there are 256 available host IDs. Having all zeros is not allowed for a host ID because it means the local machine. Having all ones for the host ID is reserved for broadcasting, so that is not allowed.
256 - (Not Zeros) - (Not Ones) = 254.