Bit Shift & Bitwise

Bit Shift and Bitwise are operators that make binary calculations perfectly straightforward. Some years ago, I had to refactor some logic using bit shift operations. That made me think that most developers had never seen or even understand what are bit shift and bitwise operations. These operators provide a great must-know solution for specific problems, like network calculations (IP & netmask); privileges processing based in bit fields; communication involving checksums, parity, flow …

Read More

Two's Complement

Have you ever thought about how numbers are represented in your computer? We all know that computers “talk” in binary, but how exactly does it work? In this post, I will briefly introduce Two’s Complement, which is the way signed integer numbers are represented. Signed data type are data types that support representation of negative and positive values.

Read More