How do I find the 2's complement of a binary number?
Finding the 2's complement is a two-step mathematical process used to represent negative numbers in computers:
Find the 1's Complement: Invert every bit in the binary number (change 1s to 0s, and 0s to 1s).
Add 1: Add 1 to the Least Significant Bit (LSB - the rightmost bit) of the 1's complement.
What if there is a carry during addition?
When adding 1 to the rightmost bit, remember your binary addition rules: 1 + 1 = 10 (which is 0, carry 1). You must carry the 1 to the next column to the left until you resolve all additions.