In the beginning, the United States government and its contractors assigned IP number blocks by class, as follows:
This method had inefficiencies that exhausted the availability of IPv4 numbers faster than necessary. For example, when a small organization required addresses for 255 devices, a class C number block would not be sufficient so they would obtain a class B block and not use over 65,000 of the available IP numbers in the block. With only a finite total of IPv4 numbers available (2 or about 4.29 billion), in the late 1980s and early 1990s when personal computing exploded in popularity and the World Wide Web (WWW) was invented, it quickly became apparent that this inefficient method of assigning blocks would exhaust the number of available blocks quickly. To address this, Classless Inter-Domain Routing (CIDR) was introduced in 1993.
CIDR is an efficient IP addressing scheme that reduces the size of routing tables and makes more IP numbers within the designated number block available for use as an IP address. CIDR notation specifies the starting number and size of a block and is expressed as an IP number block followed by a slash, followed by the decimal number of the leading bits of the routing prefix; for example: 192.168.0.0/16. The number to the right of the slash, in this case a 16, is the CIDR notation number block size. To count the quantity of contiguous numbers in the block, subtract the CIDR notation number block size from 32 and then raise 2 to that power – in other words, 2(32-CIDR) or in the case of our example, 216 = 65,536 or the size of an original Class B block.