Computer Science 37 HW 1
Computer Science 37 HW 1
Due on Friday, July 5th, at the beginning of class. Note that each problem herein must be turned in as a separate deliverable, each one clearly labeled with your name.
LogicWorks Practice
You are not required to use LogicWorks for this assignment, however, you are highly encouraged to use it and check the correctness of your solutions. Since Homework 2 will require you to implement and test your circuits, it doesnt hurt to get some practice right now. Before you do anything serious with LogicWorks, allow yourself time to play around with different devices and options. At this point, the devices youll be interested in can be found in libraries Simulation Gates (logic gates such as NOT, AND, OR, etc) and Simulation IO (the binary probe lets you see the bit-value of a signal and the binary switch allows you to provide input to your circuits: double-clicking on the switch toggles the value it produces). Make sure you know how to draw, rotate, select, move and delete devices and wires. Use the pencil tool (Edit->Name) and click on the wire you want to name, double-click on the textbox that appears, type a string and press enter: this will label a signal and allow you to identify it in the timing window. These labels can also be used to connect components far away from each other, what can greatly decrease the visual clutter when your circuits get complex.
2) A four-bit comparator is a component that takes X and Y, two four-bit values, as inputs and produces a single bit of output. When X=Y, the output is 0, otherwise the output is 1. Design a four-bit comparator using any of the logic gates weve seen in class. Hint: It pays off to understand well how each kind of logic gate that you have at your disposal works. If you dont heed this advice, youll do a lot more work than you need: you can think of a four-bit comparator as four one-bit comparators combined in some fashion. (10 points)
3) Consider a word made of four bits. A 4-bit parity function takes a 4-bit word as input and produces one bit as a result, which equals 1 if the number of 1-digits in the input is odd and 0 otherwise. (30 points) a. b. c. d. Construct the truth table for P, the 4-bit parity function. Derive the sum-of-products canonical form of P. Derive the product-of-sums canonical form of P. Using the expression youve derived for (b) above and a Karnaugh map, produce the minimal sum-of-products form for P. e. Draw the circuit that implements the minimal sum-of-products for P, which youve found in (d), using only NAND gates.