Question

In: Computer Science

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

Solutions

Expert Solution

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

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

2's complement:
-----------------
Add 1 to above result
10000101 + 1 = 10000110
=====================================
||    2's complement: 10000110    ||
=====================================

Related Solutions

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 -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 -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.
1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for...
1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for the following decimal numbers: a) 1510 b) -2110 c) 3510 d) -2710 2. Use 1’s and 2’s complement system to perform the following calculations and mention if there will be overflow or not: a) 1100 – 0101 b) 1010 + 0100 c) 01100 + 00111
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Show the decimal integer -143 in 10-bit sign magnitude, one's complement, two's complement and excess-511 respectively...
Show the decimal integer -143 in 10-bit sign magnitude, one's complement, two's complement and excess-511 respectively in the given order
Binary How is 00001001 (base 2) represented in 8-bit two’s complement notation? Convert 0.3828125 to binary...
Binary How is 00001001 (base 2) represented in 8-bit two’s complement notation? Convert 0.3828125 to binary with 4 bits to the right of the binary point. How is 00110100 (base 2) represented in 8-bit one's complement.  
Represent -34 and +67 in the following way: a) 8 bit 1's complement representation.
Represent -34 and +67 in the following way: a) 8 bit 1's complement representation.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT