Question

In: Computer Science

Please convert decimal value -32760 into 2's complement binary value

Please convert decimal value -32760 into 2's complement binary value

Solutions

Expert Solution

This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 32760 successively by 2 until the quotient is 0
32760/2 = 16380, remainder is 0
16380/2 = 8190, remainder is 0
8190/2 = 4095, remainder is 0
4095/2 = 2047, remainder is 1
2047/2 = 1023, remainder is 1
1023/2 = 511, remainder is 1
511/2 = 255, remainder is 1
255/2 = 127, remainder is 1
127/2 = 63, remainder is 1
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 111111111111000
Adding 1 zeros on left hand side of this number to make this of length 16
So, 32760 in normal binary is 0111111111111000
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   0111111111111000 is flipped to 1000000000000111
Step 3:. Add 1 to above result
1000000000000111 + 1 = 1000000000001000
so, -32760 in 2's complement binary is 1000000000001000
Answer: 1000000000001000

Related Solutions

(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system....
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system. Make sure there are enough digits in the results to be able to perform arithmetic operations with these two numbers. (b) Perform in the signed 2’s complement system, (+70) + (-26) (c) Perform in the signed 2’s complement system, (-70) - (-26) (d) Perform in the signed 2’s complement system, (+70) + (+26)
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary...
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary format) Hint: –17 + 0.375 Given the hint above, the fractional number will be divided into two parts, - Whole number, - Fractional part, must be positive (2) Proof to check that your calculation above is correct
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate...
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+31)+(-47), (-31)+(+47), and (-31)+(-47). Convert the answers back to decimal and verify that they are correct.
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to...
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers, Then, perform the binary equivalent of (+47)+(-38) and (-47)+(-38) using addition. Convert the answers back to decimal and verify that they are correct.
i need to convert decimal to twos complement binary and then add the binary digits but...
i need to convert decimal to twos complement binary and then add the binary digits but I am unable to do it. I am only allowed to use string, can anyone help me out please. i need the code urgently. #include #include #include #include using namespace std; string reverse(string s) { string x = ""; for (long i = s.length() - 1; i >= 0; i--) { x += s[i]; } return x; } string twosComplementStringsAddition(string A, string B) {...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030 b.404 c.5050 d.-5050 e.-20000 Show work with steps
Design a 9’s complement of a Binary Coded Decimal
Design a 9’s complement of a Binary Coded Decimal
Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal. a.FCAD b.DEAD c.1111...
Convert the following hexadecimal representations of 16-bit 2’s complement binary numbers to decimal. a.FCAD b.DEAD c.1111 d.8000 e.FACE
Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK) 1. B2 - binary: - decimal:...
Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK) 1. B2 - binary: - decimal: 2. 37 - binary: - decimal: 3. 0A -binary: - decimal: 4. 11 - binary: - decimal:
1.convert the following numbers from decimal to binary assuming seven-bit twe's complement binary representation: a)49 b)...
1.convert the following numbers from decimal to binary assuming seven-bit twe's complement binary representation: a)49 b) -27 c)0 d) -64 e) -1 f) -2 g) what is the range for this computer as written in binary and in decimal? 2.convert the following numbers from decimal to binary assuming nine-bit twe's complement binary representation: a)51 b) -29 c) -2 d)0 e) -256 f) -1 g ) what is the range for this computer as written in binary and in decimal?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT