hw2 - solutions 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · hw2 - solutions . 1....

14
HW2 - SOLUTIONS 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR gates using the two-input NOR gate. The basis for many of these functions uses a combination of DeMorgan’s laws and other Boolean Algebra simplifications. Similarly NAND is a universal logic element since NAND and NOR are duals of each other, any function that NOR implements, NAND can implement the dual of that function. Since XOR and XNOR are complements of each other, combining NOT and XNOR can be implemented with NAND gates. XOR is not a universal logic element, since it cannot implement NOT just using the inputs X and Y without leaving an input disconnected.

Upload: vutu

Post on 02-Sep-2018

247 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

HW2 - SOLUTIONS

1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR gates using the two-input NOR gate. The basis for many of these functions uses a combination of DeMorgan’s laws and other Boolean Algebra simplifications.

Similarly NAND is a universal logic element since NAND and NOR are duals of each other, any function that NOR implements, NAND can implement the dual of that function. Since XOR and XNOR are complements of each other, combining NOT and XNOR can be implemented with NAND gates. XOR is not a universal logic element, since it cannot implement NOT just using the inputs X and Y without leaving an input disconnected.

Page 2: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

2. Here define H1S to be the sum output and H1C to be the carryout of the first half adder that takes inputs A and B. H2S is the sum output and H2C is the carryout of the second half adder that takes H2S and Cin as inputs. The output of H2S is equivalent to S for the full adder, and OR is equivalent to Cout of the full adder.

3.

Page 3: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

4.

Page 4: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

5.

Page 5: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR
Page 6: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

6.

Page 7: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR
Page 8: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR
Page 9: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

7.

Page 10: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR
Page 11: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

8.

Page 12: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR

9.

Page 13: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR
Page 14: HW2 - SOLUTIONS 1.cseweb.ucsd.edu/classes/sp10/cse140/homeworks/hw2sol.pdf · HW2 - SOLUTIONS . 1. The following figure demonstrates the implementation of the NOT, AND, OR, and XOR