Quiz 6.5

DIRECTIONS: Read each question carefully. Then click on the dot next to the answer that most closely fits the question. Try to answer all questions on this quiz and when you are done, click on the grade me button at the bottom.


Coverage: Section 6.4

  1. What does the following sequence of bits, 1011011101011101, encode or represent?
2 ASCII bytes
a negative 2's complement number
an unsigned binary integer
some floating point number (fractional)
any of the above, we can't tell

  1. The following bit pattern, 0111111111111111111111111111111, has 30 1s in it. What is its value as an unsigned integer?
229-1
230-1
231-1
230

  1. The following bit pattern, 10111011, is an 8-bit 2's complement number. How do we find out what it encodes?
flip all the bits and then report "negative" of this value
add 1, flip all the bits then report "negative" of this value
flip all the bits, add 1 and then report "negative" of this value
we can't, it's too hard!

  1. What is -3 in 10 bits 2's complement?
1111111100
1000000011
1111111110
1111111101

  1. If a 2's complement ends in 0, is it odd or even?
odd
even
depends on whether it is negative or not

  1. How can we tell at a glance if a bit pattern represents a negative integer in 2's complement?
it will have a 1 in the leftmost bit
it will have a 0 in the leftmost bit
it will have a 1 in the rightmost bit
there is no easy way, need to flip and add 1

  1. In 2's complement, how many negative numbers are there relative to the number of positives?
the same
one more negative
one more positive

  1. If you are working with 24 bit unsigned binary integers, how many total integers are there? 16,777,215 is the largest 24-bit unsigned number.
16,777,215
16,777,216
33,554,431
33,554,432

  1. 100110 is a 6-bit 2's complement integer. What is its decimal equivalent?
-13
-6
-14
-26

  1. 000101 is a 6-bit 2's complement integer. What is its decimal equivalent?
+5
-5
-6
+15