Here we learn about 2's Complement and 1's Complement of a number, and also about doing subtractions in computing terms in C/C++. When we do 2's complement, there is a certain pattern in how the bits are modified. The same goes for when we subtract 1 from a number.
These two patterns which we find will be very helpful in creating complex Masks for solving larger complicated problems. We do a visualization of the pattern and find shortcuts to do 2's complement and Subtraction by 1.
See Embedded / Firmware Interview Preparation Series here:
• Bit Manipulation Interview Series
You could follow us on Facebook and Instagram:
Facebook : / firmwarecode
Instagram : / firmwarecode
#BitManipulation