Solution: Taking One's and Two's Complements
Review the solution to the challenge.
We'll cover the following...
Requirements
Given a decimal value, for example, –10, perform one’s complement and two’s complement on it without using a computer or calculator.
Solution
Here’s a step-by-step explanation of the solution:
- Convert the decimal value to binary