Question

In: Computer Science

Show the decimal integer -126 in 8-bit sign magnitude, one's complement, two's complement and excess-127 respectively...

Show the decimal integer -126 in 8-bit sign magnitude, one's complement, two's complement and excess-127 respectively in the given order, separated by comma.

Solutions

Expert Solution

Answer:
----------
11111110,10000001,10000010,00000001

Explanation:
--------------
-126
-------
This is negative. so, follow these steps to convert this to various binary formats.
Divide 126 successively by 2 until the quotient is 0
   > 126/2 = 63, remainder is 0
   > 63/2 = 31, remainder is 1
   > 31/2 = 15, remainder is 1
   > 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 1111110
So, 126 of decimal is 1111110 in binary
Adding 1 zeros on left hand side of this number to make this of length 8
So, 126 in normal binary format is 01111110
sign-magnitude:
-----------------
set 1 as left most bit, since this number is negative.
so, 01111110 becomes 11111110
=====================================
||    sign-magnitude: 11111110    ||
=====================================

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

2's complement:
-----------------
Add 1 to above result
10000001 + 1 = 10000010
=====================================
||    2's complement: 10000010    ||
=====================================

for excess-127:
----------------
add 127 to given number
-126 + 127 = 1
in binary 1 is 00000001
=================================
||    excess-127: 00000001    ||
=================================

Related Solutions

Show the decimal integer 79 in 8-bit sign magnitude, one's complement, two's complement and excess-127 respectively...
Show the decimal integer 79 in 8-bit sign magnitude, one's complement, two's complement and excess-127 respectively in the given order, separated by comma.
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
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.
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.
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
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent...
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent ___________ b. 1010 1001 Decimal Equivalent ___________ c. 1100 0011 Decimal Equivalent ___________ d. 0101 0101 Decimal Equivalent ___________
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT