1 Introduction (No Marks)
1 Introduction (No Marks)
1 Introduction (No Marks)
2 Icebreaker (1 mark)
When you arrive at the lab, your TAs will lead an icebreaker activity so that
you can get to know your labmates. This will help you find a partner for
the lab. The labs are meant to be done in pairs; you may change your lab
partner in subsequent weeks if you choose.
TODO 1 Completing the activity is worth one mark. Once you have
found a partner, your TA will give you a Magic Box for you to do the rest of
the lab.
1
3 Wiring a Gate (1 mark)
Upon getting your Magic Box kit from your TA, you will want to place your
circuit board (the green one) beside the bread board (the white one). Let’s
start with looking closely at the breadboard. You’ll notice that it has symbols
on the edge: + - a b c d e f g h i j + -.
The breadboard is divided into three parts:
1. two long columns; these run the length of the breadboard and have the
blue and red lines
2. the central grid, which is sandwiched in between those two long columns
In the central grid, the columns are labeled by a letter, and the rows are
numbered; every 5th row has its number beside it. This allows us to refer to
specific holes on the grid, like 5e in the picture.
In the central grid, all the holes in each row are connected, stopping at
the divide in the centre (it’s called "the gutter"). So, if we connect something
to 5b, and something else to 5a, those two things will be connected through
the breadboard. But, 5h will not be connected to either of them.
The two "rails", the columns between the red and blue lines, work differ-
ently. They are connected down the columns. We can see this if we strip the
layering underneath the breadboard, and look at it upside down:
2
Now, let’s start the wiring:
1. It is convention that rails are used for power (5 Volts) and ground.
Power and ground work as HIGH and LOW in our physical circuits,
and like TRUE and FALSE in logic. Every logic gate needs these to
work, so we always start wiring by connecting our rails to the circuit
board. Red is always used for power, and black is always used
for ground. Do not use these colours for anything else! Following
this convention will make it easier for you and your TAs to see that
you have properly powered and grounded your chip, especially as your
circuits become more complex. Your TAs will deduct 1 mark if
you do not follow this convention.
3
2. Since the two sides are independent of each other, we then
connect them. Now the two blue rails are grounded, and the two red
rails are powered:
4
Manual to find out how to wire it. Get out a copy of the User’s Manual
now, and find the entry for the Quad 2-Input OR Gate.
You can use the pdf version of the manual on Canvas. The entry will
look like this:
5
5. We want to place it so that the notch is on the left. From there, we
want to power and ground the chip. Almost all ICs take power to
the top left pin and ground to the lower right pin, but always check
the User’s Manual first! A powered 74LS32 chip will look like this:
6. We have powered the chip with a small red wire, and grounded it with
a small black wire. The colour of the wires is used so that other
people can look at the circuit and immediately see that we are
powering and grounding. This is especially useful when debugging
circuits.
Our next task is to add inputs to our circuit. We will control the
OR gate using the switches near the bottom left corner of the circuit
board. Connect the first wire (in this case a green one) from a
switch to the first input of the OR gate (pin 13 on the chip).
The choice of colour for these wires is open to anything other than
red and black. Connect a second wire (in this case an orange
one) from a switch to the second input of the OR gate (pin
12 on the chip). Refer to the User’s Manual for where these inputs
are located on the chips.
A note about switches and corresponding values: If the top half
of the switch is pressed down, the circuit is closed and the switch is in
the ON position. This corresponds to a value of 1, or TRUE. Likewise,
6
if the bottom half is pressed down, the circuit is open and the switch
is in the OFF position, corresponding to 0 or FALSE.
7. But how can we tell what we are inputting to this gate? If we also
connect those two pins to two LEDs (the lights on the Magic
Box), we can see whether each of these inputs is on or off.
7
8. Now, we also want to see the output of our OR gate. The output of
the gate comes out at pin 11. Connect a wire from pin 11 to a
third LED (as with the yellow wire in the photo below). Now we can
turn on The Magic Box.
9. We see the LEDs illuminate. When a light is on, its value is TRUE;
if it is off, then it is FALSE. If we then turn the switches that we
have connected on and off, we can observe the truth table for the OR
gate by looking at the lights. TODO 2 Try this now, and fill in the
table on a piece of paper:
10. Once you are done this, turn off the Magic Box.
8
4 The Clock (1 mark)
1. Switches are not the only input we have available. In this section, we
will see the "clock output" can be as used as an input to a circuit as
well. First, we must find an inverter, or NOT gate, which has
the label 74LS04. We must also look it up in the User’s Manual to
understand how to wire it:
2. Once you have found this chip, place it in the breadboard with
the notch on the left. Then, add power and ground wires.
9
3. Now, we want to add the input to our inverter. We will use the clock
input, which comes from the switches on the right side of the board. It
looks like this:
10
5. Let’s see this wave in action before we do any more wiring. Connect
the input (pin 13) of the NOT chip to an LED. We then turn
on the Magic Box and watch the light go on and off:
6. Turning the Magic Box back off, connect the output of the inverter
to an LED. This is at the pin directly to the right of the input. Here,
we connected a yellow wire from the output to the rightmost LED.
11
7. Turning the Magic Box back on, we now have the two LEDs on the
right flashing on an alternate cycle. TODO 3 Show your circuit to
your TA.
12
The questions are fairly open ended, so you are free to focus on particular
components of each question, and partial credit may be available.
TODO 5 (further analysis) Think back to that 74LS32 (OR) chip
you checked the truth table for. Do you think it behaves exactly like the
mathematical OR gates you’ve seen in class? Why or why not? If not, what
are some differences between the physical chip and the mathematical model?
Hint: What acts the input and output for each model?
7 Survey (1 mark)
TODO 6 To help us improve these labs both this term and for future offer-
ings, complete the survey here1 . After you submit your survey, you will get
a confirmation page; show that to your TA.
1
https://goo.gl/forms/gWpe4ASNvylpbUBB2
13