A logical AND is one of three Boolean operations used in Boolean or digital logic. The other two are OR and NOT. The AND operation is used in determining the network address.
Logical AND is the comparison of two bits that produce the results shown below. Note how only a 1 AND 1 produces a 1. Any other combination results in a 0.
- 1 AND 1 = 1
- 0 AND 1 = 0
- 1 AND 0 = 0
- 0 AND 0 = 0
Note: In digital logic, 1 represents True and 0 represents False. When using an AND operation, both input values must be True (1) for the result to be True (1).
To identify the network address of an IPv4 host, the IPv4 address is logically ANDed, bit by bit, with the subnet mask. ANDing between the address and the subnet mask yields the network address.
To illustrate how AND is used to discover a network address, consider a host with IPv4 address 192.168.10.10 and subnet mask of 255.255.255.0, as shown in the figure:
- IPv4 host address (192.168.10.10) – The IPv4 address of the host in dotted decimal and binary formats.
- Subnet mask (255.255.255.0) – The subnet mask of the host in dotted decimal and binary formats.
- Network address (192.168.10.0) – The logical AND operation between the IPv4 address and subnet mask results in an IPv4 network address shown in dotted decimal and binary formats.

Using the first sequence of bits as an example, notice the AND operation is performed on the 1-bit of the host address with the 1-bit of the subnet mask. This results in a 1 bit for the network address. 1 AND 1 = 1.
The AND operation between an IPv4 host address and subnet mask results in the IPv4 network address for this host. In this example, the AND operation between the host address of 192.168.10.10 and the subnet mask 255.255.255.0 (/24), results in the IPv4 network address of 192.168.10.0/24. This is an important IPv4 operation, as it tells the host what network it belongs to.
Network, Host, and Broadcast Addresses
Within each network are three types of IP addresses:
- Network address
- Host addresses
- Broadcast address
Using the topology in the figure, these three types of addresses will be examined.

Network address
A network address is an address that represents a specific network. A device belongs to this network if it meets three criteria:
- It has the same subnet mask as the network address.
- It has the same network bits as the network address, as indicated by the subnet mask.
- It is located on the same broadcast domain as other hosts with the same network address.
A host determines its network address by performing an AND operation between its IPv4 address and its subnet mask.
As shown in the table, the network address has all 0 bits in the host portion, as determined by the subnet mask. In this example, the network address is 192.168.10.0/24. A network address cannot be assigned to a device.
Network, Host, and Broadcast Addresses
Table caption
|
Network Portion |
Host Portion |
Host Bits |
Subnet mask 255.255.255.0 or /24 |
255 255 255
11111111 11111111 11111111
|
0
00000000
|
|
Network address 192.168.10.0 or /24 |
192 168 10
11000000 10100000 00001010
|
0
00000000
|
All 0s |
First address 192.168.10.1 or /24 |
192 168 10
11000000 10100000 00001010
|
1
00000001
|
All 0s and a 1 |
Last address 192.168.10.254 or /24 |
192 168 10
11000000 10100000 00001010
|
254
11111110
|
All 1s and a 0 |
Broadcast address 192.168.10.255 or /24 |
192 168 10
11000000 10100000 00001010
|
255
11111111
|
All 1s |
Host addresses
Host addresses are addresses that can be assigned to a device such as a host computer, laptop, smart phone, web camera, printer, router, etc. The host portion of the address is the bits indicated by 0 bits in the subnet mask. Host addresses can have any combination of bits in the host portion except for all 0 bits (this would be a network address) or all 1 bits (this would be a broadcast address).
All devices within the same network, must have the same subnet mask and the same network bits. Only the host bits will differ and must be unique.
Notice that in the table, there is a first and last host address:
- First host address – This first host within a network has all 0 bits with the last (right-most) bit as a 1 bit. In this example it is 192.168.10.1/24.
- Last host address – This last host within a network has all 1 bits with the last (right-most) bit as a 0 bit. In this example it is 192.168.10.254/24.
Any addresses between and including, 192.168.10.1/24 through 192.168.10.254/24 can be assigned to a device on the network.
Broadcast address
A broadcast address is an address that is used when it is required to reach all devices on the IPv4 network. As shown in the table, the network broadcast address has all 1 bits in the host portion, as determined by the subnet mask. In this example, the network address is 192.168.10.255/24. A broadcast address cannot be assigned to a device.