You are on page 1of 2

00011001 00100010 00001100 00111000

Q1. In a block of address, we know the IP address of one host is 25.34.12.56/16. What
are the first address (network address) and the last address (limited broadcast
address) in this block?

Answer
Solution
The binary representation of the given address (25.34.12.56/16) is
00011001 00100010 00001100 00111000.

232-n, n=16 (n is the mask of the addresses)


32-16
= 16

232-n = 216.

1st Method

First Address – found by setting the rightmost 32-n bits to 0s

Binary dotted 00011001 00100010 00000000 00000000


Decimal dotted 25 34 0 0

First address - 25 . 34 . 0 . 0

Last Address – found by setting the rightmost 32-n bits to 1s.

Binary dotted 00011001 00100010 11111111 11111111


Decimal dotted 25 34 255 255

Last address - 25 . 34 . 255 . 255

2nd Method

First Address – found by ANDing the given addresses with the mask. The result is 1 if both
bits are 1s and otherwise the result is 0. Refer Table 2.1

Bit 1 Bit 2 Results


0 0 0
0 1 0
1 0 0
1 1 1
Table 2.1
Address : 00011001 00100010 00001100 00111000

Mask : 11111111 11111111 00000000 00000000

First Address : 00011001 00100010 00001100 00000000

Convert to decimal notation is 25 . 34 . 0 . 0

First address - 25 . 34 . 0 . 0

Last Address – found by ORing the given addresses with the complement of the mask. The
result is 0 if both bits are 0s and otherwise the result is 1. Refer Table 2.2

Bit 1 Bit 2 Results


0 0 0
0 1 1
1 0 1
1 1 1
Table 2.2

Address : 00011001 00100010 00001100 00111000

Mask Complement : 00000000 00000000 11111111 11111111

First Address : 00011001 00100010 11111111 11111111

Convert to decimal notation is 25 . 34 . 255 . 255

Last address - 25 . 34 . 255 . 255

You might also like