Question

Assume a 5 bit machine using two's complement. (Show your work) 14.) If 010102 is added...

Assume a 5 bit machine using two's complement. (Show your work)

14.) If 010102 is added to 010012 an overflow will occur (True or false)

15.) If 001112 is added to 011102 an over flow will occur. (True or false)

If the following addition produces an overflow write "error." If it does not, then write the decimal value of the sum of the addition

17.)

110112 + 011112

18.)

110012 + 110102

19.)

111102 + 111012

20.)

110112 + 010112

21.)

001012 + 010102

22.)

100012 +100102

23.)

100002 + 100002

24.)

111112 + 111112

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

14)
Adding 01010 and 01001 in binary
01010
01001
----------
(0)10011
----------
Sum does not produces a carry
So, sum of these numbers in binary is 10011

Verification
---------------
first = 01010
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1010
=> 1x2^3+0x2^2+1x2^1+0x2^0
=> 1x8+0x4+1x2+0x1
=> 8+0+2+0
=> 10
Answer: 10

second = 01001
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1001
=> 1x2^3+0x2^2+0x2^1+1x2^0
=> 1x8+0x4+0x2+1x1
=> 8+0+0+1
=> 9
Answer: 9

sum = 10011
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.
   11110011 is flipped to 00001100
II. Add 1 to above result
00001100 + 1 = 00001101
III. Now convert this result to decimal value
=> 1101
=> 1x2^3+1x2^2+0x2^1+1x2^0
=> 1x8+1x4+0x2+1x1
=> 8+4+0+1
=> 13
Answer: -13
10+9 must be 19
This is not correct since we can verify that 10+9 not equals -13
So, there was an overflow.

15)
Adding 00111 and 01110 in binary
00111
01110
----------
(0)10101
----------
Sum does not produces a carry
So, sum of these numbers in binary is 10101

Verification
---------------
first = 00111
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 111
=> 1x2^2+1x2^1+1x2^0
=> 1x4+1x2+1x1
=> 4+2+1
=> 7
Answer: 7

second = 01110
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1110
=> 1x2^3+1x2^2+1x2^1+0x2^0
=> 1x8+1x4+1x2+0x1
=> 8+4+2+0
=> 14
Answer: 14

sum = 10101
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.
   11110101 is flipped to 00001010
II. Add 1 to above result
00001010 + 1 = 00001011
III. Now convert this result to decimal value
=> 1011
=> 1x2^3+0x2^2+1x2^1+1x2^0
=> 1x8+0x4+1x2+1x1
=> 8+0+2+1
=> 11
Answer: -11
7+14 must be 21
This is not correct since we can verify that 7+14 not equals -11
So, there was an overflow.

17)
Adding 11011 and 01111 in binary
11011
01111
----------
(1)01010
----------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 01010

Verification
---------------
first = 11011
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.
   11011 is flipped to 00100
II. Add 1 to above result
00100 + 1 = 00101
III. Now convert this result to decimal value
=> 101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: -5

second = 01111
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1111
=> 1x2^3+1x2^2+1x2^1+1x2^0
=> 1x8+1x4+1x2+1x1
=> 8+4+2+1
=> 15
Answer: 15

sum = 01010
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1010
=> 1x2^3+0x2^2+1x2^1+0x2^0
=> 1x8+0x4+1x2+0x1
=> 8+0+2+0
=> 10
Answer: 10
This is correct since we can verify that -5+15 = 10
So, there was no overflow.

18)
Adding 11001 and 11010 in binary
11001
11010
----------
(1)10011
----------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 10011

Verification
---------------
first = 11001
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.
   11001 is flipped to 00110
II. Add 1 to above result
00110 + 1 = 00111
III. Now convert this result to decimal value
=> 111
=> 1x2^2+1x2^1+1x2^0
=> 1x4+1x2+1x1
=> 4+2+1
=> 7
Answer: -7

second = 11010
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.
   11010 is flipped to 00101
II. Add 1 to above result
00101 + 1 = 00110
III. Now convert this result to decimal value
=> 110
=> 1x2^2+1x2^1+0x2^0
=> 1x4+1x2+0x1
=> 4+2+0
=> 6
Answer: -6

sum = 10011
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.
   11110011 is flipped to 00001100
II. Add 1 to above result
00001100 + 1 = 00001101
III. Now convert this result to decimal value
=> 1101
=> 1x2^3+1x2^2+0x2^1+1x2^0
=> 1x8+1x4+0x2+1x1
=> 8+4+0+1
=> 13
Answer: -13
This is correct since we can verify that -7+-6 = -13
So, there was no overflow.

19)
Adding 11110 and 11101 in binary
11110
11101
----------
(1)11011
----------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 11011

Verification
---------------
first = 11110
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.
   11110 is flipped to 00001
II. Add 1 to above result
00001 + 1 = 00010
III. Now convert this result to decimal value
=> 10
=> 1x2^1+0x2^0
=> 1x2+0x1
=> 2+0
=> 2
Answer: -2

second = 11101
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.
   11101 is flipped to 00010
II. Add 1 to above result
00010 + 1 = 00011
III. Now convert this result to decimal value
=> 11
=> 1x2^1+1x2^0
=> 1x2+1x1
=> 2+1
=> 3
Answer: -3

sum = 11011
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.
   11111011 is flipped to 00000100
II. Add 1 to above result
00000100 + 1 = 00000101
III. Now convert this result to decimal value
=> 101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: -5
This is correct since we can verify that -2+-3 = -5
So, there was no overflow.

20)
Adding 11011 and 01011 in binary
11011
01011
----------
(1)00110
----------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 00110

Verification
---------------
first = 11011
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.
   11011 is flipped to 00100
II. Add 1 to above result
00100 + 1 = 00101
III. Now convert this result to decimal value
=> 101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: -5

second = 01011
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1011
=> 1x2^3+0x2^2+1x2^1+1x2^0
=> 1x8+0x4+1x2+1x1
=> 8+0+2+1
=> 11
Answer: 11

sum = 00110
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 110
=> 1x2^2+1x2^1+0x2^0
=> 1x4+1x2+0x1
=> 4+2+0
=> 6
Answer: 6
This is correct since we can verify that -5+11 = 6
So, there was no overflow.

21)
Adding 00101 and 01010 in binary
00101
01010
----------
(0)01111
----------
Sum does not produces a carry
So, sum of these numbers in binary is 01111

Verification
---------------
first = 00101
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 101
=> 1x2^2+0x2^1+1x2^0
=> 1x4+0x2+1x1
=> 4+0+1
=> 5
Answer: 5

second = 01010
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1010
=> 1x2^3+0x2^2+1x2^1+0x2^0
=> 1x8+0x4+1x2+0x1
=> 8+0+2+0
=> 10
Answer: 10

sum = 01111
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1111
=> 1x2^3+1x2^2+1x2^1+1x2^0
=> 1x8+1x4+1x2+1x1
=> 8+4+2+1
=> 15
Answer: 15
This is correct since we can verify that 5+10 = 15
So, there was no overflow.

22)
Adding 10001 and 10010 in binary
10001
10010
----------
(1)00011
----------
Sum produces a carry of 1. We can ignore that carry.
So, sum of these numbers in binary is 00011

Verification
---------------
first = 10001
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.
   10001 is flipped to 01110
II. Add 1 to above result
01110 + 1 = 01111
III. Now convert this result to decimal value
=> 1111
=> 1x2^3+1x2^2+1x2^1+1x2^0
=> 1x8+1x4+1x2+1x1
=> 8+4+2+1
=> 15
Answer: -15

second = 10010
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.
   10010 is flipped to 01101
II. Add 1 to above result
01101 + 1 = 01110
III. Now convert this result to decimal value
=> 1110
=> 1x2^3+1x2^2+1x2^1+0x2^0
=> 1x8+1x4+1x2+0x1
=> 8+4+2+0
=> 14
Answer: -14

sum = 00011
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 11
=> 1x2^1+1x2^0
=> 1x2+1x1
=> 2+1
=> 3
Answer: 3
-15+-14 must be -29
This is not correct since we can verify that -15+-14 not equals 3
So, there was an overflow.

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

Verification
---------------
first = 10000
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.
   10000 is flipped to 01111
II. Add 1 to above result
01111 + 1 = 10000
III. Now convert this result to decimal value
=> 10000
=> 1x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x16+0x8+0x4+0x2+0x1
=> 16+0+0+0+0
=> 16
Answer: -16

second = 10000
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.
   10000 is flipped to 01111
II. Add 1 to above result
01111 + 1 = 10000
III. Now convert this result to decimal value
=> 10000
=> 1x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x16+0x8+0x4+0x2+0x1
=> 16+0+0+0+0
=> 16
Answer: -16

sum = 00000
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=>
=>
=>
=>
=> 0
Answer: 0
-16+-16 must be -32
This is not correct since we can verify that -16+-16 not equals 0
So, there was an overflow.

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

Verification
---------------
first = 11111
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.
   11111 is flipped to 00000
II. Add 1 to above result
00000 + 1 = 00001
III. Now convert this result to decimal value
=> 1
=> 1x2^0
=> 1x1
=> 1
=> 1
Answer: -1

second = 11111
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.
   11111 is flipped to 00000
II. Add 1 to above result
00000 + 1 = 00001
III. Now convert this result to decimal value
=> 1
=> 1x2^0
=> 1x1
=> 1
=> 1
Answer: -1

sum = 11110
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.
   11111110 is flipped to 00000001
II. Add 1 to above result
00000001 + 1 = 00000010
III. Now convert this result to decimal value
=> 10
=> 1x2^1+0x2^0
=> 1x2+0x1
=> 2+0
=> 2
Answer: -2
This is correct since we can verify that -1+-1 = -2
So, there was no overflow.

Add a comment
Know the answer?
Add Answer to:
Assume a 5 bit machine using two's complement. (Show your work) 14.) If 010102 is added...
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
  • 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...

  • Please show work on excel with equations. Thank you 16 #5 Expected 17 Stock 18 Correlation...

    Please show work on excel with equations. Thank you 16 #5 Expected 17 Stock 18 Correlation with Standard Correlation with Correlation with Duke Energy Return Deviation Microsoft Wal-Mart 19 Duke Energy 14% 6% -1 20 Microsoft 44% 24% -1 0.7 21 Wal-Mart 23% 14% 0.7 22 23 (a) Usin above table, calculate the volatility of a portfolio that is equally invested in Duke Energy and Microsoft. 24 (b) Usin above table, calculate the volatility of a portfolio that is equally...

  • hi i need help worh this problem. can you show your work in excel please File...

    hi i need help worh this problem. can you show your work in excel please File Home Insert Formulas Data Review View Help Open in Desh brovs Calibri V 11 V B A1 fx I 1 A B С D E F G H 14. Present Values. What is the present value of the following cash-flow stream if the interest rate is 6%? (LO5-2) 2 3 Year 4 5 Cash Flow $200 400 300 2 3 dar 6 7 8...

  • QUESTION 11 Assume that your investment decision for 2372-2374 is based on a net present value...

    QUESTION 11 Assume that your investment decision for 2372-2374 is based on a net present value calculation. You will only go ahead with the investment if the Net Present Value calculation is positive. Your Net Operating Income over the next 25 years must be positive. The discount rate you will use is 24%. The purchase price is $4,500,000. You will sell the property at the end of year 25 for $6 million. After a detailed analysis you project the following...

  • Show all of your work in each question. In parts (d), (e), and (g) make sure...

    Show all of your work in each question. In parts (d), (e), and (g) make sure to set up your null and alternative hypotheses and write your conclusions. Also, please round your numbers to 2 decimal points. Write legibly and neatly. You can use p-value approach or critical-value approach in writing the conclusions of your hypotheses. A large firm employing tens of thousands of workers has been accused of discriminating against its female managers. The accusation is based on a...

  • 17. Which of the following below should be added to set income in calculating net cash...

    17. Which of the following below should be added to set income in calculating net cash flow from operating activities using the indirect method. A. Gain on the sale of land. B. An increase in salaries payable. C. A decrease in accounts payable. D. An increase in accounts receivable. 18. Under the indirect method, expenses that do not affect cash are added to net income in the operating activities section of the statement of cash flows. A. True. B. False....

  • 17. Which of the following below should be added to net income in calculating net cash...

    17. Which of the following below should be added to net income in calculating net cash flow from operating activities using the indirect method A. Gain on the sale of land. B. An increase in salaries payable. C. A decrease in accounts payable. D. An increase in accounts receivable. 18. Under the indirect method, expenses that do not affect cash are added to net income in the operating activities section of the statement of cash flows. A. True B. False...

  • 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 1920...

    3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 1920 21 22 23 Question Unit Tutorials If you need help Question 24 O Mark this question Which statement below is NOT true regarding process mapping? O Process mapping forms a foundation for efficiency evaluation O Process mapping is used for evaluating sustainable business solutions. O A process map is a visual representation of the stages in a process. O Almost all business practices and...

  • Please write in the answer clear. Will leave like if its correct . Age Gen Sibs Work Exercise Units Mom 18 M 1 20 10 15 6 17 F 3 0 7 15 14 23 M...

    Please write in the answer clear. Will leave like if its correct . Age Gen Sibs Work Exercise Units Mom 18 M 1 20 10 15 6 17 F 3 0 7 15 14 23 M 3 20 5 13 8 20 M 2 0 5 15 16 18 F 4 22 6 16 9 20 F 2 11 7 20 20 34 F 1 48 10 10 18 22 F 3 37 13 13 18 19 M 3 0...

  • I'm not sure about my answer please check and let me know ASAP 13) 4 important...

    I'm not sure about my answer please check and let me know ASAP 13) 4 important difference between tarifls and quotas is that tariffs 1A) raise the price of the good B) generate tax revenue for the government C) help domestic producers D) stimulate international trade E) None of the above. 14) The main redistribution effect of a tariff is the transfer of income from 14) A) domestic buyers to domestic producers. B) domestic producers to domestic government. C) domestic...

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