Photo AI
Question 1
Convert the number -120 into 8 bit two's complement.
Step 1
Answer
To convert the positive number 120 into binary, we can divide the number by 2 and record the remainders:
120 ÷ 2 = 60, remainder 0
60 ÷ 2 = 30, remainder 0
30 ÷ 2 = 15, remainder 0
15 ÷ 2 = 7, remainder 1
7 ÷ 2 = 3, remainder 1
3 ÷ 2 = 1, remainder 1
1 ÷ 2 = 0, remainder 1
Reading the remainders from bottom to top, we get:
120 = 01111000 (in binary)
Step 2
Answer
To find the two's complement of a binary number, we follow these steps:
Start with the binary representation of 120:
01111000
Inverting the bits gives:
10000111
Now, add 1:
10000111
+ 1
---------
10001000
Thus, the two's complement of -120 is:
10001000
Report Improved Results
Recommend to friends
Students Supported
Questions answered