# What is an IP address?

IP stands for Internet Protocol.  An IP address is a numeric value assigned to a computer or networking device so that it can communicate with other computers or devices in the network.

There are 2 types of IP address currently in use today. They are:

1. IPv4 (Internet Protocol version 4)
2. IPv6 (Internet Protocol version 6)

IPv4:

IPv4 address consists of 32 bits and is represented by dotted decimal format. These 32 bits are divided into 4 parts separated by dots (.) and each part consists of 8 bits. In binary number system, a bit can be either 0 or 1.

Example of an IPv4 address (in Binary format): 11000000.10101000.00000000.00000001

We can represent the above address in decimal format as below. Here, we have converted each group of 8 bits in decimal format. A group of 8 bits is also called one byte or one octate.  In decimal number system, the numbers can be anything starting from 0 to 9.

11000000 is converted to decimal as 192, 10101000 is converted to 168 and so on. The same IP address is represented in dotted decimal format as 192.168.0.1

So one octate can start from 00000000(decimal= 0) up to 11111111(decimal=255).

How many IPv4 addresses can we have out of 32 bits?

Let’s say we have only one bit, then we can represent this by either 0 or 1. So, totally 2 numbers can be formed from one bit.

Now, let’s consider we have 2 bits, then we can represent this by 00, 01, 11, 10. So, totally 4 numbers can be formed from 2 bit.

So, if we have x number of bits, then we can represent or create 2x unique numbers. So, if we take all the 32 bits, then 232 = 4294967296 (nearly 4.3 billion of IP addresses).

These 4.3 billion of IP addresses are divided into 5 classes based on the value in the first octate of IP address. They are:

Class A range: 1.0.0.0- 126.255.255.255

Class B range: 128.0.0.0- 191.255.255.255

Class C range: 192.0.0.0- 223.255.255.255

Class D range: 224.0.0.0- 239.255.255.255

Class E range: 240.0.0.0- 255.255.255.254

Note: The range (0.0.0.0 – 0.255.255.255) is reserved.  The range (127.0.0.0- 127.255.255.255) is used for loopback and diagnostic functions.

Class A, B and C address are unicast IP addresses and can be assigned to a computer or a device.

Class D is used for multicasting.  These IPs can’t be assigned to a device.

Class E is reserved for experimental and research purpose.