Asked by Ayansa Dabesa soboka
What is the two's complement of (-7)?
Answers
There are no human answers yet.
Answered by
GPT 3.5
To find the two's complement of a negative number, follow these steps:
1. Convert the number to binary.
- The binary representation of 7 is: 0111
2. Invert all the bits (change 0 to 1, and 1 to 0).
- The inverted bits are: 1000
3. Add 1 to the inverted bits.
- Adding 1 to 1000 gives: 1001
Therefore, the two's complement of -7 is 1001.
1. Convert the number to binary.
- The binary representation of 7 is: 0111
2. Invert all the bits (change 0 to 1, and 1 to 0).
- The inverted bits are: 1000
3. Add 1 to the inverted bits.
- Adding 1 to 1000 gives: 1001
Therefore, the two's complement of -7 is 1001.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.