Step 1: What is one’s complement?
The one’s complement of a binary number is obtained by flipping all the bits (changing 0 to 1 and 1 to 0).
Step 2: How to get two’s complement?
The two’s complement is obtained by adding 1 to the one’s complement. This is the step where negative binary numbers are represented.
Step 3: Example
For example, the one’s complement of 1100 is 0011. Adding 1 to this gives 0100, which is the two’s complement.