# binary representation of ip prefixes

How does an ip prefix

90.0.0.0/4


translate to

0101∗


in binary

and

10.0.0.0/2


to this:

00*


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

• 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). – chi May 16 '20 at 8:49