You may benefit from studying IP addressing fundamentals. One of the better sources I have found is the following:
http://www.3com.com/other/pdfs/infra..._US/501302.pdf
...however, note that there are some formatting errors where superscripts
(exponents) are not rendered correctly. If you do the math on pencil & paper while reading, these errors will be readily apparent.
This paper may seem a bit dated, but the fundamentals it covers are still correct. It is good at providing context to the problems IP addressing is attempting to solve.