Question

In: Computer Science

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

Solutions

Expert Solution

11111111111111110111011110000000

Explanation:
-------------
0000000100010001 x 1111111110000000
Let's sign extend our first number to 00000000000000000000000100010001
Let's sign extend our second number to 11111111111111111111111110000000
Two's complement binary Multiplication:
---------------------------------------
                                  00000000000000000000000100010001
                                 x11111111111111111111111110000000
-------------------------------------------------------------------
                                 00000000000000000000000000000000
                                00000000000000000000000000000000
                               00000000000000000000000000000000
                              00000000000000000000000000000000
                             00000000000000000000000000000000
                            00000000000000000000000000000000
                           00000000000000000000000000000000
                          00000000000000000000000100010001
                         00000000000000000000000100010001
                        00000000000000000000000100010001
                       00000000000000000000000100010001
                      00000000000000000000000100010001
                     00000000000000000000000100010001
                    00000000000000000000000100010001
                   00000000000000000000000100010001
                  00000000000000000000000100010001
                 00000000000000000000000100010001
                00000000000000000000000100010001
               00000000000000000000000100010001
              00000000000000000000000100010001
             00000000000000000000000100010001
            00000000000000000000000100010001
           00000000000000000000000100010001
          00000000000000000000000100010001
         00000000000000000000000100010001
        00000000000000000000000100010001
       00000000000000000000000100010001
      00000000000000000000000100010001
     00000000000000000000000100010001
    00000000000000000000000100010001
   00000000000000000000000100010001
  00000000000000000000000100010001
-------------------------------------------------------------------
                                 11111111111111110111011110000000  (we only need to calculate the 32 right most bits in the result)
-------------------------------------------------------------------
Answer: 11111111111111110111011110000000

Verification:
--------------
Let's convert 00000000000000000000000100010001 to decimal first
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 100010001 to decimal
100010001
=> 1x2^8+0x2^7+0x2^6+0x2^5+1x2^4+0x2^3+0x2^2+0x2^1+1x2^0
=> 1x256+0x128+0x64+0x32+1x16+0x8+0x4+0x2+1x1
=> 256+0+0+0+16+0+0+0+1
=> 273
so, 00000000000000000000000100010001 in decimal is 273

Now, Let's convert 11111111111111111111111110000000 to decimal
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11111111111111111111111110000000 is flipped to 00000000000000000000000001111111
II. Add 1 to above result
00000000000000000000000001111111 + 1 = 00000000000000000000000010000000
III. Now convert this result to decimal value
Converting 10000000 to decimal
10000000
=> 1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 128+0+0+0+0+0+0+0
=> 128
so, 11111111111111111111111110000000 in decimal is -128

Now, Let's convert the answer=11111111111111110111011110000000 to decimal
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   11111111111111110111011110000000 is flipped to 00000000000000001000100001111111
II. Add 1 to above result
00000000000000001000100001111111 + 1 = 00000000000000001000100010000000
III. Now convert this result to decimal value
Converting 1000100010000000 to decimal
1000100010000000
=> 1x2^15+0x2^14+0x2^13+0x2^12+1x2^11+0x2^10+0x2^9+0x2^8+1x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x32768+0x16384+0x8192+0x4096+1x2048+0x1024+0x512+0x256+1x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 32768+0+0+0+2048+0+0+0+128+0+0+0+0+0+0+0
=> 34944
so, 11111111111111110111011110000000 in decimal is -34944

We can verify that 273*-128 = -34944
Hence, the answer is 11111111111111110111011110000000

Related Solutions

Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000...
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000 0000 0000 0000 0000
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers...
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers as shown. 01110101 + 00111011 Add the following unsigned 8 bit binary numbers as shown. 01000100 + 10111011
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*
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.
Concern the following 16-bit floating point representation: The first bit is the sign of the number...
Concern the following 16-bit floating point representation: The first bit is the sign of the number (0 = +, 1 = -), the next nine bits are the mantissa, the next bit is the sign of the exponent, and the last five bits are the magnitude of the exponent. All numbers are normalized, i.e. the first bit of the mantissa is one, except for zero which is all zeros. 1. What's the smallest difference between two consecutive or adjacent numbers?...
Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the...
Complete the following table. All binary numbers are 8-bit signed integers. (Don't forget to show the steps of your solution!) Decimal value Sign-magnitude representation Ones' complement representation Two's complement representation -98 10001011 01110101 10100100 Compute the results of the indicated operations in columns 2 and 3, assuming that the binary numbers represent integers in the formats given by column 1. Identify which of the operations, if any, results in an overflow. (Don't forget to show the steps of your solution!)...
Perform the following arithmetic in Binary assuming 16 bit registers (67)10 + (-89)10 List the values...
Perform the following arithmetic in Binary assuming 16 bit registers (67)10 + (-89)10 List the values of the status bits: C, V, N and Z
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary...
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary numbers. Working purely in hex, negate each and then state whether the result is positive or negative. (a) 5E91 (b) D00F 2.
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...
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT