David’s Cisco Networking Blog

Aug 21 2008   8:29PM GMT

Determining the Network ID using the Logical AND Operation

David Davis David Davis Profile: David Davis

Studying for your CCNA? Having trouble with IP Subnetting?

It’s all about the 1’s and 0’s. We just need to convert our IP address and Subnet mask into binary and then subtract the ones from the zeros. 1+1 = 1, 1+0 = 0, 0+1 = 0. It really is that easy.

Let’s find out what the network ID is for this example.
IP address:          140.12.26.128
IP subnet mask: 255.255.240.0

The binary equivalent for IP address 140.12.26.128:
140 decimal is 10001100
12 decimal is    00001100
26 decimal is    00011010
128 decimal is 10000000
The binary for this IP address is:  10001100.00001100.00011010.10000000

Now let’s look at the binary equivalent for the IP subnet mask 255.255.240.0:
255 decimal is 11111111
255 decimal is 11111111
240 decimal is 11110000
0 decimal is      00000000
The binary for the subnet mask is:  11111111. 11111111. 11110000. 00000000
You have two steps left to complete. Subtract the binary IP address from the binary subnet mask
And then convert it to decimal.

Binary IP Address:         10001100.00001100.00011010.10000000
Binary subnet mask:     11111111. 11111111. 11110000.00000000
====================================
Binary Result                  10001100.00001100.00010000.00000000
Decimal result:                    140.             12.            16.              0

Your Network ID for this IP/subnet is 140.12.16.0. For more information on TCP/IP Subnetting,
visit Appendix A: Subnetting an IP Address Space.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: