Pre-Lab 04
Digital systems lab – Section 4
Ramez Al-Masadeh – 20221102027
a. Fill the truth table below for the 2’s complement calculator
A B C D W X Y Z
0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1
0 0 1 0 1 1 1 0
0 0 1 1 1 1 0 1
0 1 0 0 1 1 0 0
0 1 0 1 1 0 1 1
0 1 1 0 1 0 1 0
0 1 1 1 1 0 0 1
1 0 0 0 1 0 0 0
1 0 0 1 0 1 1 1
1 0 1 0 0 1 1 0
1 0 1 1 0 1 0 1
1 1 0 0 0 1 0 0
1 1 0 1 0 0 1 1
1 1 1 0 0 0 1 0
1 1 1 1 0 0 0 1
b. From the circuit, derive the Boolean expression that describes each output (W, X, Y, and Z) in terms of
the inputs (A, B, C, and D).
W = A ^ (B + C + D)
X = B ^ (C + D)
Y= C^D
Z=D
2.A - Fill the truth table below for the 4-bit gray code to 4-bit binary convertor
A B C D W X Y Z
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 0
0 0 1 0 0 0 1 1
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
0 1 0 1 0 1 1 0
0 1 0 0 0 1 1 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 1 1 0 1 0
1 1 1 0 1 0 1 1
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 0 0 1 1 1 1 0
1 0 0 0 1 1 1 1
b. From the circuit, derive the Boolean expression that describes each output (W, X, Y, and Z) in terms of
the inputs (A, B, C, and D).
W=A
X=A^B
Y = (A ^ B) ^ C
Z = [ (A^B) ^C] ^D
Note: ^ is the symbol of XOR