Quiz 2 - Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Name and surname:

Student ID number:

ELEC 205 Digital Systems Design


Problem Session Quiz 2
October 14, 2022

Answer the following two questions:


1) Complete the following addition, subtraction, multiplication, and conversion operations. All
numbers are unsigned for parts (a), (c), (d). The numbers are signed binary in part (b). Each part
is worth 15 points. (60 points)

(a) (30705.04)8
+ (101.01)2

The simplest way is to convert the numbers to binary and complete the calculation.

(30705.04)8 = (011 000 111 000 101.000 100)2


+ (101.01 )2
011 000 111 001 010.010 100

(b) (101.01)2 = (5.25)10


- (11011.11)2 = -(-4.25)10
= (9.5)10
• Binary subtraction is A-B = A + (-B), where -B is the 2’s complement of B. 2’s complement
of B is defined as 1’s complement of B + 1 (invert all digits of B and add 1).
• To take the radix point into account, you take both values into (2-2) parentheses (which is
multiplication of both sides by 4. Then, the summation (A+(-B)) is completed. Finally, the
sum is multiplied by 2-2.
• Since the second number has higher number of digits, one can assume the sign bit of the first
number is 0 and the sign bit of the second number is 1. So, the first number is positive (5.25).
The second number is negative. To calculate the decimal value of the second number, you can
again multiply the number by 4 first (ignore the radix point), take the two’s complement and
divide by 4 again: 11011.11×22 = 1101111, 1101111 (2’s complement) → (0010001)2 = (17)10
Finally, divide by 4: 17/4 = 4.25, but since the second value is negative, it must be -4.25.
• The first value is 5.25, the second value is -4.25.
• So the output is 5.25-(-4.25) = 9.5, which is (01001.10)2.

(0010101)2
+(0010001)2
(0100110)2 and then divide by 4 → (01001.10)2 = (9.5)10
(c) (10101.01)2 = 21.25
× (111.11)2 = 7.75
= 164.6875 = (10100100.1011)2

First, multiply both multiplicands by 4 to eliminate the radix points. We will divide the outcome
by 16 (or 4 radix points from the right) to correct for this step.

1010101
1010101
1010101
1010101
+ 1010101
1010 01001011 (divide by 4) => (1010 0100.1011)2

(d) Convert (A0F0B.0E)16 = (X)2 = (Y)5 = (Z)8, Find X, Y, and Z.

Decimal: 659211.0546875
X = 10100000111100001011.0000111
Y = (659211.054)10 = (132043321.01133333...)5
Z = 2407413.034

For conversion to base 5 after radix point, see https://madformath.com/calculators/basic-


math/base-converters/decimal-to-base-5-converter-with-steps/decimal-to-base-5-converter-with-
steps for the intermediate steps.
2) Complete the following Boolean simplifications using Boolean algebraic identities. Each part is
worth 10 points. (40 points)

(a) (x + y̅)(x̅ + y)(x̅ + y̅) =


= (xx̅ + xy + x̅y̅ + yy̅)(x̅ + y̅)
= (0 + xy + x̅y̅ + 0)(x̅ + y̅)
= (xyx̅ + x̅y̅x̅ + xyy̅ + x̅y̅y̅)
= 0 + x̅y̅ + 0 + x̅y̅
= x̅y̅

(b) xy̅ + x̅y + x̅ + y̅ =


= y̅(x + 1) + x̅(y + 1)
= y̅ + x̅

(c) F = ∑ m(3, 7, 11, 15) =


Since the minterms reach 15, F must receive at least 4 binary input signals: X, Y, Z, and W.


X̅YZW + ̅
X YZW + XYZW + XY̅ZW
=̅ ̅ + Y) + XZW(Y + ̅
XZW(Y Y)
=X̅ZW + XZW
= ZW(X ̅ + X)
= ZW

Z'W' Z'W ZW ZW'


XY\ZW 00 01 11 10
X'Y' 00 0 (0) 0 (1) 1 (3) 0 (2)
X'Y 01 0 (4) 0 (5) 1 (7) 0 (6)
XY 11 0 (12) 0 (13) 1 (15) 0 (14)
XY' 10 0 (8) 0 (9) 1 (11) 0 (10)
** The parentheses in each cell of the K-map show the minterm index. The values on the left show the
function’s output for the given combination of input values.
(d) F = ∏ M(0, 4, 8, 12) =
Since the minterms exceed 8, at least 4 binary input signals must be used: X, Y, Z and W.
𝐹 = 𝑀0 𝑀4 𝑀8 𝑀12
= (X + Y + Z + W)(X + Y̅ + Z + W)(X̅ + Y + Z + W)(X̅+Y ̅ + Z + W)
̅ ̅ ̅
= (X(1 + Y + Z + W) + YX + YZ + YW + Z(1 + X + Y + W) + W)(X + Y + Z + W)(X ̅+̅
Y+Z
+ W)
= (X + YX + YZ + YW + Z + W)(X ̅ + Y + Z + W)(X̅+̅ Y + Z + W)
= (X + Z + W)(X̅ + Y + Z + W)(X̅+Y ̅ + Z + W)
= (X + Z + W)(X ̅(1 + ̅
Y + Z + W) + Y(X̅+̅ Y + Z + W) + Z(X̅+̅ ̅+̅
Y + 1 + W) + W(X Y+Z
+ 1))
= (X + Z + W)(X̅ + YX
̅ + YY̅ + YZ + YW + Z + W)
= (X + Z + W)(X̅(1 + Y) + 0 + Z(1 + Y) + W(1 + Y))
= (X + Z + W)(X̅ + Z + W)
= (XX + XZ + XW + Z(1 + X + W) + W(1 + ̅
̅ ̅ X + Z))
= (0 + XZ + XW + Z + W)
= Z(X + 1) + W(X + 1)
=Z+W

Z'W' Z'W ZW ZW'


XY\ZW 00 01 11 10
X'Y' 00 0 (0) 1 (1) 1 (3) 1 (2)
X'Y 01 0 (4) 1 (5) 1 (7) 1 (6)
XY 11 0 (12) 1 (13) 1 (15) 1 (14)
XY' 10 0 (8) 1 (9) 1 (11) 1 (10)

*** F’ = Z’W’, F = Z+W

You might also like