1
6 points
|
a) Assume that there are 49 students in your class. If every student
is to be assigned a unique bit pattern, what is the minimum number of bits
required to do this?
b) How many more students can be added to the class without requiring
additional bits for the unique pattern?
|
|||||||||||||||||||||||||||||||||||||||||||||
2
8 points
|
a) What is the largest positive number one can represent in a 16-bit two’s complement code? Write your result in binary and decimal. b) What is the greatest magnitude negative number one can represent in 16-bit two’s complement code? Write your result in binary and decimal. c) What is largest positive number one can represent in n-bit two’s complement code? d) What is greatest magnitude negative number one can represent in n-bit two’s complement code? |
|||||||||||||||||||||||||||||||||||||||||||||
3
16 points
|
Add the following unsigned binary numbers. Complete the addition in binary and express the answers in hexadecimal. For each addition, indicate whether the operation resulted in overflow.
b) 11010011 + 00110111 c) 01110111 + 01111100 d) 01100110 + 10101010 |
|||||||||||||||||||||||||||||||||||||||||||||
4
12 points
|
Compute the following logical operations. Show the results in binary and hexadecimal. a) NOT(NOT(1001)) AND NOT(1101) |
|||||||||||||||||||||||||||||||||||||||||||||
5
16 points
|
For each of the following 16-bit hexadecimal value show in decimal its value if interpreted as unsigned, sign-magnitude, one's complement, and two’s complement integers.
|
|||||||||||||||||||||||||||||||||||||||||||||
6
16 points
|
Perform the following additions. Provide your answers in hexadecimal. Point out which operations result in overflow if (i) the operands are unsigned integers and (ii) the operands are two's complement integers.
b) xAC01 + xE1BD c) x6CA1 + x5B9D d) xABCD + x099E |
|||||||||||||||||||||||||||||||||||||||||||||
7
6 points
|
Complete the truth table for the equations given below. The first line is done as an example: Q2 = (A OR B) AND NOT (A) Q3 = NOT((A OR B) AND NOT (A AND B))
|
|||||||||||||||||||||||||||||||||||||||||||||
8
12 points
|
Fill in the truth table for the equations given below. The first line is done as an example: Q2 = (Y OR Z) AND (Z OR X) AND (X AND Y AND Z)
|
|||||||||||||||||||||||||||||||||||||||||||||
9
8 points
|
Recall that the two-input XOR function (where C = XOR(A, B) = A XOR B) can be described by the following truth table:
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|