Question

In: Computer Science

7.What is the hexadecimal equivalent of the 16-bit signed integer -32,760 ? *Note: answer in two's...

7.What is the hexadecimal equivalent of the 16-bit signed integer -32,760 ? *Note: answer in two's complement*

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
So, 32760 in normal binary is 0111111111111000

Step 2: flip all the bits
   0111111111111000 is flipped to 1000000000000111

Step 3:. Add 1 to above result
1000000000000111 + 1 = 1000000000001000
so, -32760 in 2's complement binary is 1000000000001000
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
1000 => 8
0000 => 0
0000 => 0
1000 => 8
So, in hexadecimal 1000000000001000 is 0x8008

Related Solutions

What is the 11 bit, binary representation of -108? What is the hexadecimal equivalent of this...
What is the 11 bit, binary representation of -108? What is the hexadecimal equivalent of this number?
Multiply the following 16 bit signed binary number together Provide a 32bit signed binary answer 0000...
Multiply the following 16 bit signed binary number together Provide a 32bit signed binary answer 0000 0001 0001 0001 1111 1111 1000 0000
Assignment 3C: Answer the following questions Question 1. a. Declare a 32-bit signed integer variable and...
Assignment 3C: Answer the following questions Question 1. a. Declare a 32-bit signed integer variable and initialize it with the smallest possible negative decimal value. b. Declare an uninitialized array of 100 16-bit unsigned integers. c. Declare a string variable containing the word “DVC” repeated 20 times, and terminated with the null char. Question 2 For the following declarations, assuming that the address of I is 404000h What are the addresses of J, K, and L? What is the total...
Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)...
Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)      a. -18      b. -41
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
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.
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.
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of...
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
1-How is -89 represented using 8-bit two's compliment? (The answer should be 8 binary digits). 2-What...
1-How is -89 represented using 8-bit two's compliment? (The answer should be 8 binary digits). 2-What is 10101100 - 00100100 using 2's compliment arithmetic? (The answer should be 8 binary digits) 3-Assume we are using the simple model for floating-point representation as given in the text (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 15, a normalized mantissa of 8 bits, and a single sign bit for the number):Show how the computer would...
Assembly Language Define a 64-bit constant signed integer in Flash. Then, Write a subroutine count_1s that...
Assembly Language Define a 64-bit constant signed integer in Flash. Then, Write a subroutine count_1s that would count the number of 1s in a byte. The subroutine will receive the input parameter in A and return the result back in A. Use this subroutine to write a program that would count the number of 1s inside the 64-bit constant signed integer. Define a variable that would hold the total count of 1s. (Application of Shift/Rotate instructions) (No specific Architecture)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT