How does an ip prefix

translate to


in binary


to this:


I'm trying to understand it since a while now but I am unable to derive the logic.

  • $\begingroup$ Anything of the form IP/N will translate to "N-bits*", where "N-bits" are the first N bits of the IP (first = most significant). So, in your specific cases you have to take the first 4 bits out of 90, and the first 2 out of 10 (since 90 and 10 convert to an 8 bit byte, and both 4 and 2 are smaller). $\endgroup$
    – chi
    Commented May 16, 2020 at 8:49

1 Answer 1


For a netmasked IP address xxx.xxx.xxx.xxx/N, convert each xxx octet in the address to binary. The masked address is the leftmost N bits with all other bits replaced with zeroes.

So becomes 00001010 00000000 00000000 00000010 which is then masked to 00000000 00000000 00000000 00000000, because 00 are the leftmost 2 bits. becomes 01011010 00000000 00000000 00000000 which is then masked to 01010000 00000000 00000000 00000000, because 0101 are the leftmost 4 bits.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.