Primary contact for this homework: Pradip Vallathol [pradip16 at cs dot wisc dot edu]
You must do this homework in groups of two. Please write the full name and the student id of each member on every page and staple multiple pages together.
Problem 1 (4 points)
-
Assume that 453 scientists have been invited to attend a conference. If every scientist is to be assigned
a unique bit pattern, what is the minimum number of bits required to do this?
-
How many more scientists can be invited to the conference, without requiring additional bits for each
person's unique id?
Problem 2 (8 points)
Using 7 bits to represent each number, write the representations of 25, -25 and 0 in signed magnitude,
1's complement and 2's complement notations.
Number | Sign-Magnitude | 1's Complement | 2's Complement |
25 | | | |
-25 | | | |
0 | | | |
Problem 3 (4 points)
The following binary numbers are 5-bit 2's complement binary numbers. Which of the
following operations generate overflow? Justify your answers by translating the operands
and results into decimal.
-
00111 + 00110
-
10111 - 11110
-
11000 - 00011
-
10110 + 10011
Problem 4 (2 points)
Compute the followings:
-
(10100 OR 01101) AND (NOT(10101))
-
(10101 OR 00100) AND (NOT(00101) OR 01010)
Problem 5 (4 points)
Convert the following decimal numbers into 6-bit 2's complement binary numbers. Explain any
problem that you encounter for these conversions.
-
23
-
-33
-
32
-
-32
Problem 6 (2 points)
Perform the specified arithmentic operation for the following 2's complement binary numbers:
-
11001 + 1011
-
00111 - 010
Note:
- All numbers beginning with 1 are negative.
- Don't forget to sign-extend when required.
Problem 7 (4 points)
Write the decimal equivalents for the following IEEE floating point numbers.
-
1 01111110 01000000000000000000000
-
0 10000001 10100000000000000000000
Problem 8 (2 points)
Write the IEEE floating point representation of the decimal number 2.50.