4,877 views

In a class B subnet, we know the IP address of one host and the mask as given below:

IP address $: 125.134.112.66$

Mask $: 255.255.224.0$

1. $125.134.96.0$
2. $125.134.112.0$
3. $125.134.112.66$
4. $125.134.0.0$

_______________________________________________________

NID               01111101.10000110.01100000.00000000

by

how to convert ip address decimal value to binary easy way
no easy way other than division
ok i got the concept
I found a good way. To find the binary equivalent of decimal value X, start from the binary value of a number we know is a factor of X and append 0 if the number is divisible by 2 and append 1 if its not.

For eg: to find out the binary equivalent of 30, first write the binary equivalent of 15 which is 1111, now append 0 to it and it becomes 30→ 11110. Binary value of 31 would be 11111, appended with a 1 in the end.

We can even start from end, i.e., if we want to find the binary equivalent of 168, we will put 0 in the end and divide 168 by 2, and get 84, 0. 84 is also divisible by 2, so we put one more 0 after it→ 42, 00, next would be 21, 000, now for 21 we put a 1 before the three 0s→ 10, 1000. Now we know the binary value of 10, so substituting, we get, 10101000 as the answer.
Porocedure-1:

Procedure-2:

Mask:255.255.224.0  So third octet having 3 bits netid and 5 bits host id

So block size is(2^5) i.e. 0,32,64,96,128......so on

By looking to the ip addres125.134.112.66, third octet 112 comes under 96 subnet. Hence Ans.
by