Question

In: Computer Science

Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.

Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.

Solutions

Expert Solution

-18
------
This is negative. so, follow these steps to convert this to various binary formats.
Divide 18 successively by 2 until the quotient is 0
18/2 = 9, remainder is 0
9/2 = 4, remainder is 1
4/2 = 2, remainder is 0
2/2 = 1, remainder is 0
1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10010
Adding 3 zeros on left hand side of this number to make this of length 8
So, 18 in normal binary format is 00010010
sign-magnitude:
-----------------
set 1 as left most bit, since this number is negative.
so, 00010010 becomes 10010010
=====================================
||    sign-magnitude: 10010010    ||
=====================================

1's complement:
-----------------
flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00010010 is flipped to 11101101
=====================================
||    1's complement: 11101101    ||
=====================================

2's complement:
-----------------
Add 1 to above result
11101101 + 1 = 11101110
=====================================
||    2's complement: 11101110    ||
=====================================

Related Solutions

Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain...
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain all the steps and details.
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain...
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain all the steps and details.
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain...
convert -44 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain all the steps and details.
convert -97 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain...
convert -97 to 8-bit sign-magnitude, 1's complement, 2's complement and excess-127. Please be careful and explain all the steps and details.
1. Please convert the following decimal numbers to 8-bit binary sign magnitude and to 8-bit 2’s...
1. Please convert the following decimal numbers to 8-bit binary sign magnitude and to 8-bit 2’s complement. Please show your work if there are multiple steps. Sign Magnitude 2’s complement a. +67 b. +40 c. -28 d. -40
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT