Preview

22 - Twos Complement (Advanced)

 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 __________________

  indicate the length of the binary sequence

  None of the above

  indicate positive or negative

  indicate the magnitude or size of the number

 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

  5

  7

  6

 5. 1111 in two's complement would be:

  zero

  minus 2

  minus 3

  minus 1

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

  1010

  1111

  1110

  1000

 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

  Add 1 to this number

  Invert th e bits again and remove the leading 1

  Add 0 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)

  Inverted' becomes 1110

  Invert all the bits and add 1 which gives 11101

  None of the above

  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 inverts the bits is incorrect

  The calculation is correct

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

  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?

  2

  1

  3

  4

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

  minus 6

  positive 3

  minus 3

  positive 6

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

  minus 5

  positive 3

  positive 5

  minus 3

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

  2 would be 0010

  2 would be 0011

  2 would be 1110

  2 would be 1100

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

  TRUE

  FALSE

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

  The answer is 00110011

  The answer is 01000000

  ERROR: input requires 10 bits; 8 bits were specified

  The answer is 01111111

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

  54 would require 7 bits

  54 would require 10 bits

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

  It is possible to represent in four bits

 17. The following representation is minus 74 in:
11001010

  None of the above

  sign and magnitude

  two's complement

  ASCII

 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