User:Phil McGee/sandbox

ANDing (Subnet Addressing)
A binary AND process in the term for subnet addressing with CIDR notoation can help determine whether someone's IP address is on the same local network as another user. The binary AND process takes into account whether bits in the IP address are either on or off. If a bit is activated, it is indicated with a 1. If a bit is not activated, it is indicated with a 0. When using IPv4, an IP address is separated into four blocks and a subnet mask indicated with a slash (/) (Ex: 10.0.0.0/24). Each block corresponds with a range of 2^7 - 2^0 bits. When reading an IP address in terms of bits (1's and 0's), from right to left, each bit decreases by a power of 2. (Ex: 10000000 = 2^7 = 128 and 10010110 = 2^7 + 2^4 + 2^2 + 2^1 = 150)

When determining if a computer's IP address is within a network's IP range, ANDing the computer's IP address and subnet mask, then compare it with the destination's ADNing of its IP address and subnet mask.

Example
Bob has an IP and mask of 10.0.0.12/24 and wants to communicate with Charlie who has an IP and mask of 10.0.1.2/24. Determine if they are on the same local network using ANDing.

Bob By ANDing Bob's IP and mask, we can determine that Bob resides on the 10.0.0.0/24 network.

Charlie By ANDing Charlie's IP and mask, we can determine that Charlie resides on the 10.0.1.0/24 network.

Since the ANDed IP and mask of Bob and Charlie didn't match, then they do not reside on the same network.