C/C++ Function to Compute the Next Highest Power of 2 for a 32-bit Integer July 29, 2021 algorithms, bit hacks, c / c++, math No Comments Given a 32-bit integer, we want to find out the next highest power of 2. For example, the next power of two for 127 is 128. We can use … [Continue Reading...]
C Macro/Function to Convert a IP Address into a 32-bit Integer July 27, 2021 c / c++, IP Address No Comments We know the IPv4 Address is 32-bit which consists of four integers from 0 to 255 inclusive. We can use a 32-bit integer to represent a valid IP address. … [Continue Reading...]