SOLUTIONS_
PROBLEM 1: Complete truth tables and K-maps for HA and FA circuits, using XOR patterns where appropriate. Loop minimum SOP equations, and sketch the circuits (assume all inputs and outputs are active high). Half Adder
A 0 0 1 1 B 0 1 0 1 S 0 1 1 0 Cout 0 0 0 1
A B
0 0 1 1 0
A B
0 0 0 0 1
A 0 1
A 0 1 S
S = A xor B
Cout = AB
Cout
Full Adder
A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 Cin 0 1 0 1 0 1 0 1 S 0 1 1 0 1 0 0 1 Cout 0 0 0 A Cin AB 00 AB 00 01 Cin
11 10 1 1 0 1 Cout
01 1 0
11 0 1
10 1 0 S
0 0 1 0
0 1
0 1
0 1
1 0 1 1 1
Page 1
SOLUTIONS_
PROBLEM 2: Design a full-subtractor bit-slice circuit. Label the inputs A, B, and Bin, and label the outputs D and Bout. Start by completing the subtraction examples, then complete the truth table and K-maps, and then sketch the circuit. Just fill in the box for the subtractions of 2 positive numbers, below: 0 0 1 0 0 0 0 0
0 0
...
1 0
...
1 0
...
0 0 0 0
0
...0 1 1 0... -...1 1 0 0...
nd -...1 0 0 0...
...0 0 1 0... ...0 1 1 0... ...1 1 0 0... row redone with borrow in = 1!: ...1 0 0 0... ...
0 0 1 0...
1
...
1
...
1
...
1
...
AB 00 01 11 10 Bin 1 0 1 A 0 0
AB 00 01 11 10 Bin 1 0 0 A 0 0
1 1
0 Bout
Page 2
SOLUTIONS_
PROBLEM3: Complete the four 2s compliment arithmetic problems below, showing both the decimal and binary numbers in each case.
17 - 11
0 0 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 1
-22 + 6
0 0 00 00 1 1 0
- 16
11 1 1 0 1 0 1 0 00 0 0 0 0 1 1 0 11 1 1 1 0 0 0 0
166 11 155
0 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 0 1
0 1 0 0 1 1 0 1 1 1
35 - 42
-7
0 0 01 0 0 0 1 1 1 1 10 1 0 1 1 0 1 1 11 1 1 0 0 1
19 - -7 26
0 00 0 1 0 0 1 1 0 00 0 0 0 1 1 0 1 0 00 0 1 1 0 0 1 0
Is the above answer correct in 8 bits? Explain. If the 155 were represented by 8 bits, the first bit is the sign, and we would have a negative number! So you must have 9 bits to represent +155 or +166 or anything over +128
Page 3
SOLUTIONS_
(a) Implement a T-Flip-Flop from a J-K-Flip-Flop. It will help to first draw the truth table with T and Q and Q+ (Q+ implies a particular setup of J and K). Draw the resulting circuit (using the symbol for a J-K-Flip-Flop).
(b) Implement a D-Flip-Flop from a T-Flip-Flop. It will help to first draw the truth table with D and Q and Q+ (Q+ implies a particular setup of T). Draw the resulting circuit (using the symbol for a T-Flip-Flop). YOU CAN USE XOR GATE OR THE FOLLOWING LOGIC:
(c) Discuss whether following statements are true or false and why:
1. The inputs to a level-sensitive latch always affect its outputs False: Level sensitive latch will react to the inputs ONLY while the gating signal (or clock)is high 2. A master-slave flip-flop behaves similarly to a clocked latch, except that its output can change only near the rising edge of the clock. False: Master Slave flip flop can be a falling edge or a rising edge, depending on the construction. The key word that makes the statement false is "only"
Page 4