IP addressing.

32 bits (4 octets) displayed as dotted decimal quad (w.x.y.z each 0-255)
192.168.100.2 is really 11000000 10101000 01100100 00000010 (spaces for illustration purposes)
32 bits gives 232 =4G bit patterns / combinations

Class 1st octet range prefix length net mask leading bits #networks #hosts per network = 232-prefix-2 total #hosts unregistered, private networks (# of them) notes
A 1. - 126. /8 255.0.0.0 0 126 16M 2G 10. (one) huge nets always subnetted
B 128. - 191. /16 255.255.0.0 10 16K 64K 1G 172.16. - 172.31. (16) typically subnetted
C 192. - 223. /24 255.255.255.0 110 2M 254 .5G 192.168.0. - 192.168.255. (256) most common class
D 224. - 239. 1110 0 multicasting only.
E 240. - 255. 1111 reserved for experimental only.
255=11111111

Conceptual view of how the IP address space is partitioned into classes:

IP address: logical/heirarchical/routable (vs. MAC address: physical/flat/nonroutable)
   (cf. your mailing address vs. your SSN)
IP address: 2 parts: network ID and host ID bits. (network bits on the left, host bits on the remaining rightside).
   analogy: network is street, host is house.
   analogy: telephone number = (country code and) area code (and exchange) + subscriber]
The (sub)net (or default) mask, a separate 32-bit value, indicates where the division is:
A 1 bit in mask indicates corresponding bit of IP address is part of network ID, a 0 bit indicates part of host ID.
In classful IP addressing the boundary falls between octets. A 255 in mask indicates all 8 bits of that octet are 1's and so the corresponding octet of the IP address is part of the network ID.

Class A network the 1 left octet is the network part, the 3 right octets the host part.
Class B network the 2 left octets are the network part, the 2 right octets the host part.
Class C network the 3 left octets are the network part, the 1 right octet the host part.
First octet indicates which class and default/subnet mask.

Host part of IP address can not be all 0's (is network address) or all 1's (is broadcast address). These are the first and last, respectively, addresses of the network. This means every network has two addresses that can not be used for/as host IP address.
Each of the network address and the host address are 32 bits. Both of these addresses are within the 32 bits of the IP address.

Example: 192.168.100.105 is a host address in a class C network (we are assuming classful addressing) because first octet 192 is in the range of class C networks.
In class C networks, the first 3 octets (24 bits) are the network ID part, the rightmost octet the host ID part. Because the mask is 255.255.255.0
So the network address is 192.168.100.0 (host bits all 0).
192.168.100.255 (host bits all 1) is the broadcast address of this network.
There are 254 available host addresses, ranging from 192.168.100.1 thru 192.168.100.254

Example: 172.16.3.105 assuming classful addressing is a host in the class B network 172.16.0.0 (network address).
The first 2 octets are the network ID part, the rightmost 2 octets the host ID part. Because the mask is 255.255.0.0
172.16.255.255 is the broadcast address of this network.
There are 65534 (216=64K-2) available host addresses, ranging from 172.16.0.1 thru 172.16.255.254

IP addresses starting with 10., 172.16. thru 172.31., and 192.168., are unregistered addresses for private internal networks not directly accessible from the Internet.
These networks are "hidden" from the Internet by the router/default gateway which does a translation to and from the unregistered address to an Internet-accessible registered IP address (this process is called NAT: network address translation; typically combined with PAT port address translation).
These addresses are considered unroutable in the Internet and would be dropped by any router receiving an IP packet containing such an address in the Source or Destination field.
Without these unregistered addresses (and NAT/PAT) the IP address space would have been exhausted by now because every host would have to have a registered IP address. 2015: IP addresses have all been allocated.
Typically, all the networks of your private internetwork could be unregistered with only the farside of your router that connects to your ISP having a registered address of the ISP's network. Using a Web service like grc.com's Shield's Up will tell you this Internet address, or asking a web search "what is my IP address".

127.* is loopback network. 127.0.0.1 is address of loopback device, whose name is localhost, a synonym for itself.
For testing purposes and to connect to servers running on this computer.
Any thing sent to it does not go to NIC.

169.254.* is link-local address. autoconfiguration/Zeroconf/APIPA
Typically if host isn't statically configured nor using DHCP (or, most likely, DHCP fails), then this is the fallback.

"first" and "last" network in each class are reserved (A: 0 and 127; B: 128.0 and 191.255; C: 192.0.0 and 223.255.255 martian networks).
zero network: 0.0.0.0 means this local network. Its broadcast address is 255.255.255.255

RULEs: an (IP) network should have only IP addresses of that network for the hosts of that network (i.e. no interlopers from other IP networks) AND all IP host addresses of that IP network should be in this network (i.e. no host addresses of this IP network should be in other networks).

Classful addressing is officially obsoleted by classless addressing (CIDR: classless inter-domain routing).
In classless addressing, boundary can be anywhere using a variable-length subnet mask (VLSM), which allows networks to have any power of 2 (-2) hosts i.e. 2, 6, 14, 30, 62, 126, 254, 510, 1022, etc. A network can be subnetted into smaller networks. Also, smaller networks can be aggregated into a larger network with supernetting.
But people and some software still think in terms of classes.

The only possible mask values
.0 00000000
.128 10000000
.192 11000000
.224 11100000
.240 11110000
.248 11111000
.252 11111100
.254 11111110
.255 11111111


FLSM Subnetting a class C network
prefix 4th octet of mask #subnets @each
/25 .128 2 126
/26 .192 4 62
/27 .224 8 30
/28 .240 16 14
/29 .248 32 6
/30 .252 64 2