Question

(5 points) Convert the following decimal numbers to 8-bit twos complement binary numbers and carry out the additions in bina

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer

a)
Number: 39
Let's convert this to two's complement binary
Since this is a positive number. we can directly convert this into binary
Divide 39 successively by 2 until the quotient is 0
   > 39/2 = 19, remainder is 1
   > 19/2 = 9, remainder is 1
   > 9/2 = 4, remainder is 1
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 100111
So, 39 of decimal is 100111 in binary
Adding 2 zeros on left hand side of this number to make this of length 8
so, 39 in 2's complement binary is 00100111

Number: -78
Let's convert this to two's complement binary
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 78 successively by 2 until the quotient is 0
   > 78/2 = 39, remainder is 0
   > 39/2 = 19, remainder is 1
   > 19/2 = 9, remainder is 1
   > 9/2 = 4, remainder is 1
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1001110
So, 78 of decimal is 1001110 in binary
Adding 1 zeros on left hand side of this number to make this of length 8
So, 78 in normal binary is 01001110
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   01001110 is flipped to 10110001
Step 3:. Add 1 to above result
10110001 + 1 = 10110010
so, -78 in 2's complement binary is 10110010

Adding 00100111 and 10110010 in binary
00100111
10110010
-------------
(0)11011001
-------------
Sum does not produces a carry
So, sum of these numbers in binary is 11011001

Verification:
---------------
sum = 11011001
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.
   11011001 is flipped to 00100110
II. Add 1 to above result
00100110 + 1 = 00100111
III. Now convert this result to decimal value
=> 100111
=> 1x2^5+0x2^4+0x2^3+1x2^2+1x2^1+1x2^0
=> 1x32+0x16+0x8+1x4+1x2+1x1
=> 32+0+0+4+2+1
=> 39
Answer: -39
This is correct since we can verify that 39+-78 = -39
So, there was no overflow.

b)
Number: -43
Let's convert this to two's complement binary
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 43 successively by 2 until the quotient is 0
   > 43/2 = 21, remainder is 1
   > 21/2 = 10, remainder is 1
   > 10/2 = 5, remainder is 0
   > 5/2 = 2, remainder is 1
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 101011
So, 43 of decimal is 101011 in binary
Adding 2 zeros on left hand side of this number to make this of length 8
So, 43 in normal binary is 00101011
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00101011 is flipped to 11010100
Step 3:. Add 1 to above result
11010100 + 1 = 11010101
so, -43 in 2's complement binary is 11010101

Number: -92
Let's convert this to two's complement binary
This is negative. so, follow these steps to convert this into a 2's complement binary
Step 1:
Divide 92 successively by 2 until the quotient is 0
   > 92/2 = 46, remainder is 0
   > 46/2 = 23, remainder is 0
   > 23/2 = 11, remainder is 1
   > 11/2 = 5, remainder is 1
   > 5/2 = 2, remainder is 1
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1011100
So, 92 of decimal is 1011100 in binary
Adding 1 zeros on left hand side of this number to make this of length 8
So, 92 in normal binary is 01011100
Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0.
   01011100 is flipped to 10100011
Step 3:. Add 1 to above result
10100011 + 1 = 10100100
so, -92 in 2's complement binary is 10100100

Adding 11010101 and 10100100 in binary
11010101
10100100
-------------
(1)01111001
-------------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 01111001

Verification:
---------------
sum = 01111001
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1111001
=> 1x2^6+1x2^5+1x2^4+1x2^3+0x2^2+0x2^1+1x2^0
=> 1x64+1x32+1x16+1x8+0x4+0x2+1x1
=> 64+32+16+8+0+0+1
=> 121
Answer: 121
-43+-92 must be -135
This is not correct since we can verify that -43+-92 not equals 121
So, there was an overflow.


Please let me know if you hawe any doubts Please upvote this answer. Thank s!!

Add a comment
Know the answer?
Add Answer to:
(5 points) Convert the following decimal numbers to 8-bit two's complement binary numbers and carry out...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers.

    2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers. a. 110101 b. 01101010 c. 10110101 3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Write the results in 6-bit two's complement binary number format and decimal number format. Indicate whether or not the sum overflows a 6-bit result. a. 14 + 12 b. 30 + 2 C. -7 + 20 d. -18-17 4. What is the signed/magnitude and two's complement range of...

  • Convert the following two's domplement binary numbers to decimal. 100101 -5 27 -27 Question 2 (4...

    Convert the following two's domplement binary numbers to decimal. 100101 -5 27 -27 Question 2 (4 points) Convert the following two's complement binary numbers to decimal. 100011 -29 36 -3 28 Question 3 (4 points) Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Indicate whether or not the sum overflows a 6-bit result. 011001+011011 110100; no overflow 100111 100101-001100; overflovw 100110 100100 001010; overflow 100111 + 100101 -001100; no overflow Question 4 (4 points)...

  • Convert the following decimal numbers to 6-bit two's complement binary number and add them. Keep result...

    Convert the following decimal numbers to 6-bit two's complement binary number and add them. Keep result in binary form. Enter yes/no for any overflows (overflows only, not carried bits). 16 + 9 .............. Overflow?................... 27 + 31 .............. Overflow?....................... (-4) + 19 .............. Overflow? ........................ 3 + (-32) ............ Overflow? ........................ (-16) + (-9) ............... Overflow? .............................. (-27) + (-31) ................ Overflow? ...........................................

  • 1. What is the largest decimal number we can represent with a 16 bit two's complement...

    1. What is the largest decimal number we can represent with a 16 bit two's complement number? 2. Convert the following signed binary numbers to decimals. 11001         010011            1110100            1100111           3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Note if there is an overflow. 7 + 13 Two's complement/binary number for 7: Two's complement/binary number for 13: Sum: Overflow? 4. Convert the following decimal numbers to 6-bit two's complement binary numbers...

  • 1. a) Perform the following binary subtractions of unsigned binary numbers. Convert your answer to decimal....

    1. a) Perform the following binary subtractions of unsigned binary numbers. Convert your answer to decimal. i) 101001012 - 01001001, ii) 110110102 - 100100112 b) Repeat the calculations above but for when the binary numbers are in two's complement form. Comment on the results of the two methods used, noting and discrepancies. 2. Find the sums of the following unsigned hexadecimal numbers. Indicate whether or not the sum overflows an equivalent 8-bit binary result. a) 1116 +2216 b) 1716 +3516...

  • Perform the following binary multiplications using 7-bit signed numbers in two's complement format. Convert them to...

    Perform the following binary multiplications using 7-bit signed numbers in two's complement format. Convert them to decimal, and verify the correct result of the operation.

  • 5. Express (76) 10 and (-114)10 in 8-bit binary two's complement arithmetic and then add the...

    5. Express (76) 10 and (-114)10 in 8-bit binary two's complement arithmetic and then add the numbers. What would be the representation (0)10 in 16-bit binary two's complement? (be sure to show your work). 6. Create two 16-bit 2's complement integer such that their sum causes an overflow. Why does the sum of a negative 2's complement number and a positive 2's complement number never generate an overflow? Discuss.

  • Exercise 1.25 Convert the following decimal numbers to unsigned binary numbers Exercise 1.31 Repeat Exercise 1.29,...

    Exercise 1.25 Convert the following decimal numbers to unsigned binary numbers Exercise 1.31 Repeat Exercise 1.29, but convert to 8-bit sign/magnitude numbers KExercise 1.32 Repeat Exercise 1.30, but convert to 8-bit sign/magnitude numbers (a) 4210 (b) 6310 Exercise 1.33 Convert the following 4-bit two's complement numbers to 8-bit two's complement numbers. (c) 22910 (d) 84510 (a) 0101 b) 1010 XExercise 1.26 Convert the following decimal numbers to unsigned binary numbers. Exercise 1.34 Convert the following 4-bit two's complement numbers to...

  • QUESTION 1 Convert 1 0110 1010 from binary to decimal, assuming nine-bit two's complement binary representation....

    QUESTION 1 Convert 1 0110 1010 from binary to decimal, assuming nine-bit two's complement binary representation. Provide only the number. For a negative number provide the negative sign. Example 79 NOT +79 or 78 Decimal Example -79 NOT negative 79 or -79 Decimal QUESTION 2 Count the next 10 numbers in base 5 starting after 3434. (Don't include 3434) Provide you answer with only numbers and spaces. No extra spaces or words Example  410 411 412   NOT 410, 411, 412

  • Convert the decimal numbers A and B to 5-bit binary numbers. Using two’s complement representation, show...

    Convert the decimal numbers A and B to 5-bit binary numbers. Using two’s complement representation, show (i) how to subtract the two 5-bit binary numbers (A−B); (ii) how to translate the binary result back to decimal

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT