Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
You have to do an AND operation between the IP address and a mask and then shifts operations
Example:
If you need the first 4 bits you have to do (IP address) & (0x0000000F) without a shift
If you need the second group of 4 bits you have to do [ (IP address) & (0x000000F0)] >> 4
and so on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.