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
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.
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754...
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754 standard is
What is the effect of applying ^255 to a 16-bit number? ^ is the bitwise XOR...
What is the effect of applying ^255 to a 16-bit number? ^ is the bitwise XOR operation. It inverts the low byte and leaves the high byte unchanged. It inverts the high byte and leaves the low byte unchanged. Suppose x is an 8-bit number and y is a 3-bit number. What is the effect of the following assignment? x = (x & 248) + y & is the bitwise AND operator. If x was originally 248, then x is...
Convert the following to Octal, hexadecimal and binary (long method (multiply and Divide by methods)) 2647.95...
Convert the following to Octal, hexadecimal and binary (long method (multiply and Divide by methods)) 2647.95 (10)
1.The binary bit pattern 10011. Please give the number for this pattern represent in each of...
1.The binary bit pattern 10011. Please give the number for this pattern represent in each of the following: ones complement integer, twos complement integer, unsigned integer, sign-magnitude integer, and fixed point factional number. (Please note that there will be two bits to the left of the binary points and three bits to the right)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT