I'm posting this document in the hopes that it might assist those who are trying to understand subnetting in IPv4 a bit more. This document was created by a former student of mine, who grasped IP addressing and subnetting concepts very quickly. He created this document with an example in the way that he calculates the Network ID, First Host, Last Host, and Broadcast addresses based off an IP address with a CIDR notation.
If you have any questions please let me know.