Knowee
Questions
Features
Study Tools

Compute the following binaryarithmetic operations using 2’s complement method. Show all the steps clearly. (LO 01)(2*5 = 10 Marks)a) Sum of -30 and 17b) Sum of -42 and -15c) Sum of -13 and -16d) Multiplication of -8 by 6e) Multiplication of -11 by -9

Question

Compute the following binaryarithmetic operations using 2’s complement method. Show all the steps clearly. (LO 01)(2*5 = 10 Marks)a) Sum of -30 and 17b) Sum of -42 and -15c) Sum of -13 and -16d) Multiplication of -8 by 6e) Multiplication of -11 by -9

🧐 Not the exact question you are looking for?Go ask a question

Solution 1

a) Sum of -30 and 17

  1. Convert -30 and 17 to 8-bit binary numbers:

    • 30 in binary: 00011110
    • To find -30 in 2's complement, invert the bits and add 1: 11100001 + 1 = 11100010
    • 17 in binary: 00010001
  2. Add the two binary numbers:

      11100010
    + 00010001
    -----------
      11110011
    
  3. The result is 11110011, which is in 2's complement form. Convert it back to decimal:

    • Invert the bits: 00001100
    • Add 1: 00001100 + 1 = 00001101
    • The result is -13.

So, the sum of -30 and 17 is -13.

b) Sum of -42 and -15

  1. Convert -42 and -15 to 8-bit binary numbers:

    • 42 in binary: 00101010
    • To find -42 in 2's complement, invert the bits and add 1: 11010101 + 1 = 11010110
    • 15 in binary: 00001111
    • To find -15 in 2's complement, invert the bits and add 1: 11110000 + 1 = 11110001
  2. Add the two binary numbers:

      11010110
    + 11110001
    -----------
     111100111
    
  3. The result is 111100111, which is a 9-bit number. Discard the overflow bit:

      11100111
    
  4. The result is 11100111, which is in 2's complement form. Convert it back to decimal:

    • Invert the bits: 00011000
    • Add 1: 00011000 + 1 = 00011001
    • The result is -57.

So, the sum of -42 and -15 is -57.

c) Sum of -13 and -16

  1. Convert -13 and -16 to 8-bit binary numbers:

    • 13 in binary: 00001101
    • To find -13 in 2's complement, invert the bits and add 1: 11110010 + 1 = 11110011
    • 16 in binary: 00010000
    • To find -16 in 2's complement, invert the bits and add 1: 11101111 + 1 = 11110000
  2. Add the two binary numbers:

      11110011
    + 11110000
    -----------
     111100011
    
  3. The result is 111100011, which is a 9-bit number. Discard the overflow bit:

      11100011
    
  4. The result is 11100011, which is in 2's complement form. Convert it back to decimal:

    • Invert the bits: 00011100
    • Add 1: 00011100 + 1 = 00011101
    • The result is -29.

So, the sum of -13 and -16 is -29.

d) Multiplication of -8 by 6

  1. Convert -8 and 6 to 8-bit binary numbers:

    • 8 in binary: 00001000
    • To find -8 in 2's complement, invert the bits and add 1: 11110111 + 1 = 11111000
    • 6 in binary: 00000110
  2. Multiply the two binary numbers:

      11111000
    x 00000110
    -----------
      00000000
     11111000
    11111000
    -----------
    111000000
    
  3. The result is 111000000, which is a 9-bit number. Discard the overflow bit:

      11000000
    
  4. The result is 11000000, which is in 2's complement form. Convert it back to decimal:

    • Invert the bits: 00111111
    • Add 1: 00111111 + 1 = 01000000
    • The result is -48.

So, the multiplication of -8 by 6 is -48.

e) Multiplication of -11 by -9

  1. Convert -11 and -9 to 8-bit binary numbers:

    • 11 in binary: 00001011
    • To find -11 in 2's complement, invert the bits and add 1: 11110100 + 1 = 11110101
    • 9 in binary: 00001001
    • To find -9 in 2's complement, invert the bits and add 1: 11110110 + 1 = 11110111
  2. Multiply the two binary numbers:

      11110101
    x 11110111
    -----------
      11110101
     11110101
    11110101
    

11110101 11110101 11110101 11110101 11110101

111000000111


3. The result is 111000000111, which is a 12-bit number. Discard the overflow bits:
 00000111

4. The result is 00000111, which is in 2's complement form. Convert it back to decimal:
- The result is 99.

So, the multiplication of -11 by -9 is 99.

This problem has been solved

Solution 2

a) Sum of -30 and 17

Step 1: Convert the numbers to binary -30 = 11101 (in 2's complement form) 17 = 10001

Step 2: Add the numbers 11101 +10001

101110

Step 3: Ignore the carry 01110

Step 4: Convert back to decimal -14

b) Sum of -42 and -15

Step 1: Convert the numbers to binary -42 = 101010 (in 2's complement form) -15 = 1111

Step 2: Add the numbers 101010

  • 1111

110101

Step 3: Ignore the carry 10101

Step 4: Convert back to decimal -21

c) Sum of -13 and -16

Step 1: Convert the numbers to binary -13 = 1101 (in 2's complement form) -16 = 10000

Step 2: Add the numbers 1101 +10000

11101

Step 3: Ignore the carry 1101

Step 4: Convert back to decimal -29

d) Multiplication of -8 by 6

Step 1: Convert the numbers to binary -8 = 1000 (in 2's complement form) 6 = 110

Step 2: Multiply the numbers 1000 x 110

00000 1000 1000

11000

Step 3: Convert back to decimal -48

e) Multiplication of -11 by -9

Step 1: Convert the numbers to binary -11 = 1011 (in 2's complement form) -9 = 1001

Step 2: Multiply the numbers 1011 x1001

1011 0000 1011

11111

Step 3: Convert back to decimal 99

This problem has been solved

Similar Questions

n binary system each and every number and its sign are represented by using only thesetwo digits 0 and 1. As the negative and positive signs cannot be written directly in binarysystem. The alternative method to represent negative and positive numbers is the 2’scomplement method. It has an interesting property that the binary arithmetic operationcan be performed easily on signed or unsigned numbers. Compute the following binaryarithmetic operations using 2’s complement method. Show all the steps clearly. (LO 01)(2*5 = 10 Marks)a) Sum of -30 and 17b) Sum of -42 and -15c) Sum of -13 and -16d) Multiplication of -8 by 6e) Multiplication of -11 by -9

Compute the following decimal arithmetic operation using 8-bit 2's complement: i) t5- 7; ii) -10+6 ; iii) -23-7.

erform six bit signed two’s complement arithmetic operation on (−15)10 +(+65)10

Perform the arithmetic operations ( +42) + ( - 13) in binary using signed-2's complement representation for negative numbers*111110100111000011000001110

Show all the steps clearly. (LO 01)(2*5 = 10 Marks)a) Sum of -30 and 17b) Sum of -42 and -15c) Sum of -13 and -16d) Multiplication of -8 by 6e) Multiplication of -11 by -

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.