# Gate Exercise

## Objective

To gain experience building circuits which use logic gates to
compute logical expressions.

## Task: Seven Segment Display

For this lab, you will write a circuit which displays binary numbers in the
range 0-3 on a "seven segment" display, which can display any subset of seven
line segments to form numbers (i.e. an alarm clock display).

Your circuit will have two input pins which together represent a number 0-3.
It will also feature a seven-segment display (found under the "Input/Output" menu).

In between, will be a number of gates connecting the two. The goal of the circuit
is to have the seven-segment display wired so that it shows the decimal value of the
binary number represented by the pins.

## Tips

- "Decode" the two-bit number into four separate wires such that one wire
each will be live for each of the four values.
- Next "or" in all of the possible values for each of the seven segments and
connect them up.
- Try connecting a power right into each of the seven-segment inputs to see
which one controls which segment.
- Logic gates can have their inputs negated before they come in. This will
reduce the number of not gates involved.
- Logic gates also have a variable number of inputs. You don't need to
restrict your circuit to two-input gates!

## Extra Credit

Using a two-bit input to represent the numbers 0-3 requires understanding the
concepts of the lab just as much as representing all 10 digits, but require much
fewer gates.

For extra credit, make your circuit handle either:

- The digits 0-7 using a three-bit input.
- The digits 0-9 using a four-bit input (but ignoring the 10-15 values).

## Submitting

When your circuit works, email the .circ file to ifinlay@umw.edu.
Copyright © 2019 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.