1. Complete the truth-tables for the following five basic logic elements and test the operation of at least one
of them.

2.

- Show two ways of converting a 2-input NAND gate into an inverter.
- Show two ways of converting a 2-input NOR gate into an inverter.

3.

- Two 2-way switches are used in house-wiring to control a single light from either ends of a hallway or flight of stairs. Draw the electrical schematic for such an arrangement.
- Draw the truth table for the two switches and light and design a digital circuit to perform this function. What is this function called? What is the negated function called?
- Implement the function using 2-input NAND gates only.

4.

- Examine the circuit shown below and determine the boolean equation representing the circuit.
- Simplify the boolean equation using (i) boolean reduction and (ii) Karnaugh mapping.
- Draw a truth-table for the circuit.
- Perform a logic simulation of the circuit using LogicWorks and compare the results with your-truth table.
- Construct the circuit as shown and verify that it functions according to the truth-table.
- Using the results from (b) design the simplest circuit which performs the same function as the original circuit. (The minimal solution consists of 2 gates.)
- Perform a logic simulation of your simplified circuit in order to verify your design.
- Finally, construct your simplified solution and confirm that it is correct.

5. Design a half-adder circuit which forms the sum and carry of two bits.

6. Design a full-adder circuit which forms the sum and carry of three bits.

7. Design a digital circuit which will produce the sum of two 2-bit numbers.

8. Design a digital comparator which takes as input two 2-bit words A(a_{1}, a_{0}) and B(b_{1},
b_{0}). The outputs of the circuit are A>B, A=B and A<B.

9. Design a priority encoder for three possible inputs A, B, and C. The inputs are in order of descending priority such that A takes priority over B, and B over C. The output is a binary code indicating the presence of the input with the highest priority. Thus the output will be 3 for priority A, 2 for B, 1 for C and 0 for no input.

10. Design an interrupt priority encoder. The purpose of this circuit is to indicate when a device requests service and to identify by means of an identifying code or vector the requesting device possessing the highest priority. For this exercise there will be 8 inputs assigned codes 0 to 7. There will be four output lines. One output indicates that one or more devices are active, i.e., requesting service. The remaining three outputs are to provide the binary code of the device with the highest priority, where 0 is the highest and 7 is the lowest priority.

11. Design a circuit which takes a 4-bit input and produces the corresponding Hamming code. Display the 7-bit
word on the lights with the format C_{1}C_{2}D_{1}C_{3}D_{2}D_{3}D_{4}.