Preview

23 - Twos Complement

 1. Another method of representing signed numbers is two's complement. Most computers use this method to represent negative numbers.

  FALSE

  TRUE

 2. With two's complement, the bit at the far left of the bit pattern - the most significant bit or MSB - is used to __________________

  None of the above

  indicate the magnitude or size of the number

  indicate positive or negative

  indicate the length of the binary sequence

 3. In twos complement positive numbers always start with a 1.

  FALSE

  TRUE

 4. A four-bit, positive, two's complement number could hold a maximum value of _________

  8

  6

  7

  5

 5. 1111 in two's complement would be:

  minus 3

  minus 1

  minus 2

  zero

 6. The number -8 would be represented in two's complement as:

  1010

  1110

  1000

  1111

 7. Read the rules (below) for using two's complement for negative numbers. What is the missing step #4?
#1:
Find the positive binary value for the negative number 
you want to represent.

#2
Add a 0 to the front of the number, to indicate that it is positive.

#3
Invert or find the complement of each bit in the number.

#4
__________________________________

  None of the above

  Invert th e bits again and remove the leading 1

  Add 0 to this number

  Add 1 to this number

 8. What should happen in step 3? (to convert -1 into twos complement)
Find -1 using two's complement numbers
=======================================

Step 1: 1 = 001
Step 2: Adding 0 to the front becomes 0001
Step 3: .................................
Step 4: Add 1 = 1111 (-8 + 4 + 2 + 1 = -1)

  Invert all the bits and add 1 which gives 11101

  None of the above

  Inverted' becomes 1110

  Reverted becomes 1111000

 9. Look at the following calculation to convert -4 into two's complement. Is it correct? Which statement is true?
Find -4 using two's complement numbers
======================================

4 = 100
Adding 0 to the front becomes 1000
'Inverted' becomes 0001
Add 1 = 0010 = -4

  The step that adds 1 is incorrect - in this case, it should add +4

  The step that inverts the bits is incorrect

  The calculation is correct

  The step which adds a 0 has been done wrong. It should be 0100

 10. What is the two's complement four bit binary number 0001?

  1

  3

  4

  2

 11. What is the two's complement four bit binary number 0110?

  positive 3

  minus 3

  positive 6

  minus 6

 12. What is the two's complement four bit binary number 1011?

  minus 3

  positive 5

  minus 5

  positive 3

 13. What is +2 in two's complement binary? (four bits)

  2 would be 0010

  2 would be 1100

  2 would be 0011

  2 would be 1110

 14. Positive 2 in two's complement binary (using eight bits) would be 01110010

  FALSE

  TRUE

 15. How would you represent the positive integer 256 in eight bits (two's complement format)?

  ERROR: input requires 10 bits; 8 bits were specified

  The answer is 01000000

  The answer is 01111111

  The answer is 00110011

 16. Why is it not possible to represent the number 54 in four bits (two's complement)?

  54 is not an odd number, which presents difficulties in two's complement

  54 would require 10 bits

  It is possible to represent in four bits

  54 would require 7 bits

 17. The following representation is minus 74 in:
11001010

  sign and magnitude

  two's complement

  ASCII

  None of the above

 18. The following number is -74 in two's complement: 10110110

  TRUE

  FALSE

 19. The following calculation that converts -9 into two's complement is correct?
-9
-128	64	32	16	8	4	2	1
1	1	1	1	0	1	1	1

-128+64+32+16+4+2+1=-9

  FALSE

  TRUE

 20. Is this calculation, that converts -105 to two's complement, correct?
-105
-128	64	32	16	8	4	2	1
1	1	0	1	0	1	1	1
	-128+64+ 16+4+2+1=-105

  No - there should be no 1 under the 64

  No - there should be no 1 under the 16

  Yes

  It is incorrect because -105 cannot be represented in just eight bits