Sample Midterm Solutions
Sample Midterm Solutions
First Name:
__________________________________
Last Name:
__________________________________
Student Number:
____________________________
Question 1 [5p]
a. [1.5p] What is the largest binary number that can be expressed with 16 bits? What are
the equivalent decimal and hexadecimal numbers?
16-bit binary: 1111_1111_1111_1111
Decimal equivalent: 2^16 -1 = (65535)10
Hexadecimal equivalent: (FFFF)16
b. [1p] Convert (333)10 and (25.625)10 into binary, octal and hexadecimal.
(333)10 = (14D)16 = (515)8 = (101001101)2
(25.625)10 = (19.5)16 = (31)8 = (11001) 333)2
c. [1.5p] Perform subtraction on the given unsigned decimal numbers by using the 10s
complement. Where the result should be negative, find its 10s complement and
affix a minus . Show your work.
23 - 47
Note: Consider sign extension with 10s complement arithmetic.
023 + (10s compl) of 047 = 023 + 953 = 976 = -(10s compl) of 976 = - 24
d.
Question 2[3p]
The solutions to the quadratic equation x2 -13x + 32 = 0 are x = 4 and x = 5.What is the
base of the numbers? Show your work.
(x-4)(x-5) = 0, x2 -9x +20 = 0
13 = b+3 = 9 so b=6
Question 3[3p]
Determine the base of the numbers in each case for the following operations to be
correct:
a.
20/3=6
2b+0 /3 = 6 so b = 9
b.
12+24=40
b+2 + 2b+4 = 4b so b = 6
c.
12*13=211
(b+2)(b+3) = 2b2 + b +1 so b = 5
Question 4[3p]
Simplify the following Boolean expressions to a minimum number of literals:
a.
(x+y)(x+y)
xy
b.
ab + c
c.
xyz + xz
xz + yz
Question 5[4p]
Simplify the following expressions to (1) sum-of-products and (2) products-of-sums:
x'z' + y'z' + yz' + xy
SOP : z+ xy
POS: (z+x)(z+y)
Question 6[4p]
Draw the logic diagram corresponding to the following Boolean expressions by using
NAND gates without simplifying them:
a.
b.
A + CD + (A + D')(C' + D)
Question 7[3p]
Convert the following Boolean function from a sum-of-products form to a simplified
product-of-sums form.
F(w,x,y,z) = (0,1,2,5,8,10,13)
Question 8[5p]
Simplify the following function and implement them with two-level NOR gate circuits:
F(w,x,y,z) = (0,3,12,15)