Every device connected to the Internet needs to have an identifier.
Internet Protocol (IP) addresses are the numerical addresses used to
identify a particular piece of hardware connected to the Internet.
The two most common versions of IP in use today are Internet Protocol
version 4 (IPv4) and Internet Protocol version 6 (IPv6). Both IPv4 and
IPv6 addresses come from finite pools of numbers.
For IPv4, this pool is 32-bits (232) in size and contains 4,294,967,296 IPv4 addresses. The IPv6 address space is 128-bits (2128) in size, containing 340,282,366,920,938,463,463,374,607,431,768,211,456 IPv6 addresses.
A bit is a digit in the binary numeral system, the basic unit for storing information.
Not every IP address in the IPv4 or IPv6 pool can be assigned to the
machines and devices used to access the Internet. Some IP addresses have
been reserved for other uses, such as for use in private networks. This
means that the total number of IP addresses available for allocation is
less than the total number in the pool.
Network prefixes
IP addresses can be taken from the IPv4 or the IPv6 pool and are
divided into two parts, a network section and a host section. The
network section identifies the particular network and the host section
identifies the particular node (for example, a certain computer) on the
Local Area Network (LAN).
Allocation
IP addresses are assigned to networks in different sized ‘blocks’.
The size of the ‘block’ assigned is written after an oblique (/), which
shows the number of IP addresses contained in that block. For example,
if an Internet Service Provider (ISP) is assigned a “/16”, they receive
around 64,000 IPv4 addresses. A “/26” network provides 64 IPv4
addresses. The lower the number after the oblique, the more addresses
contained in that “block”.
IPv4
The size of the prefix, in bits, is written after the oblique. This
is called “slash notation”. There is a total of 32 bits in IPv4 address
space. For example, if a network has the address “192.0.2.0/24”, the
number “24” refers to how many bits are contained in the network. From
this, the number of bits left for address space can be calculated. As
all IPv4 networks have 32 bits, and each “section” of the address
denoted by the decimal points contains eight bits, “192.0.2.0/24” leaves
eight bits to contain host addresses. This is enough space for 256 host
addresses. These host addresses are the IP addresses that are necessary
to connect your machine to the Internet.
A network numbered “10.0.0.0/8” (which is one of those reserved for
private use) is a network with eight bits of network prefix, denoted by
“/8” after the oblique. The “8” denotes that there are 24 bits left over
in the network to contain IPv4 host addresses:16,777,216 addresses to
be exact.
Classless Inter-Domain Routing (CIDR) Chart
The Classless Inter-Domain Routing (CIDR) is commonly known as the
CIDR chart and is used by those running networks and managing IP
addresses. It enables them to see the number of IP addresses contained
within each “slash notation” and the size of each “slash notation” in
bits.

IPv6
IPv6 is similar to IPv4, but it is structured so that all LANs have
64 bits of network prefix as opposed to the variable length of network
prefix that IPv4 networks have. All IPv6 networks have space for 18,446,744,073,709,551,616 IPv6 addresses.

Currently, most ISPs assign /48 network prefixes to subscribers’
sites (the End Users’ networks). Because all IPv6 networks have /64
prefixes, a /48 network prefix allows 65,536 LANs in an End User’s site.
The current minimum IPv6 allocation made by the RIPE NCC is a /32
network prefix. If the LIR only made /48 assignments from this /32
network prefix, they would be able to make 65,536 /48 assignments. If
they decided to only assign /56 network prefixes they would have 24 bits
available to them, and so could make 16,777,216 /56 assignments.
For example, if a /24 IPv6 allocation is made to an LIR, it would be
able to make 16,777,216 /48 assignments or 4,294,967,296 /56
assignments.
To give some perspective, it is worth noting that there are
4,294,967,296 IPv4 addresses in total, significantly less than the
number of IPv6 addresses.