Logic Gates Assignment
In this assignment you will use a logic circuit simulator, Logic.ly, to design and test a small logic
circuit. The tool has an intuitive interface with drag-and-drop components that you can easily put
together to design logic circuits. The screenshot below depicts an example with two binary inputs, A
and B, represented with toggle switches, that are fully connected to two logic gates, AND and OR, and
the outputs of the two gates are wired to one light bulb each. When input A is off and input B is on, the
output of the AND gate is false, therefore the left light bulb doesn’t turn on. However, for the same
inputs, the output of the OR gate is true and the right bulb turns on.
Access the simulator at https://logic.ly/demo/ and familiarize yourself with the tool and the
available components. Replicate the above example and then modify it to see how the tool works.
Task 1 (10pts): Create a half adder circuit that can be used for the addition of two single bits. Use
toggle switches (not push buttons) for the inputs so that it’s easier to test it. Test the circuit thoroughly
(i.e. try all possible combinations of the truth table) to make sure it works correctly. Take a screenshot
of your design and save it as half_adder_1_bit.jpeg
Task 2 (20pts): Extend your design to create a full adder circuit. Test the circuit thoroughly to make
sure it works correctly for all possible combinations of the two inputs. Take a screenshot of your design
and save it as full_adder_1_bit.jpeg
Task 3 (30pts): Extend your design to create an 8-bit full adder circuit. You should simply copy+paste
your full adder 8 times and then wire the carry signals accordingly. Test the circuit with a couple of
examples (it’s practically infeasible to do a thorough test here) to see if it works as expected. Take a
screenshot of the entire circuit and save it as full_adder_8_bit.jpeg
Task 4 (40pts): Test your 8-bit full adder with two specific numbers taken from your # as follows:
Example 1: If your # is 01234567, the two numbers must be 45 and 67
Example 2: If your # is 01851332, the two numbers must be 13 and 32
First convert the two numbers into unsigned 8-bit integers. Then, use the toggle switches in your
circuit to set the two inputs of the 8-bit full adder. Check the light bulbs to verify that the output is
correct. If there is an error, fix your circuit. Once the circuit it correct, take a screenshot and save it
with the following pattern:
Example 1: If your # is 01234567, the filename must be test_45_67.jpeg
Example 2: If your # is 01851332, the filename must be test_13_32.jpeg
Make sure the proper toggle switches are turned on when you take this screenshot. You will not
get any credit if the two numbers depicted in the screenshot are not the correct numbers from
your #.