1 x jumper wire from input pin 1 of XOR to input

DEVELOPING UNDERSTANDING OF LOGIC GATES THROUGH BUILDING AND
TESTING CIRCUITS
INTRODUCTION
3
AND
4
OR
5
NOT
6
NAND
7
NOR
8
XNOR
9
XOR
10
BREADBOARD BASICS
11
HALF ADDER CONSTRUCTION
12
FULL ADDER CONSTRUCTION
14
ONE CHIP BASIC CONSTRUCTION
16
FURTHER INFORMATION
17
M Jones 2017
[email protected]
2
LOGIC GATES: SCHEMATICS AND NOTATION
Introduction
At GCSE students must be able to work with basic logic gates (AND, NOT, OR). The
requirement stretches to being able to create gate diagrams, produce truth tables and
interpret Boolean notation. The National Curriculum at KS3 has a requirement for Boolean
understanding so this seems an even place to start.
This can be undertaken through a theory based approached (and there’s nothing wrong
with that) or exploration of how these circuits actually produce outputs. Taking the latter
approach introduces elements of simple electronics, hands on investigation and, if moving
to copper stripboard, elements of DT with soldering.
At KS5 students need an understanding of more advanced gates and how they operate. A
great way to get this idea off the ground is to work with physical ½ and full adders to mimic
the operations of adding 2 bits (1/2 adder) or 3 bits (full adder).
TTL chips, widely available and dare I say it ‘cheap as chips’ offers a way to create digital
circuits and program without coding. Relying on the gates contained within the TTL chips
outputs can be achieved, tested and mapped.
This short document contains two parts:
Part 1 covers a wide range of TTL chip types, diagrammatic representation, notation forms,
truth tables and physical construction. This latter point is important to be able to work with
the content of Part 2 in which there is guidance on creating circuits using basic electronic
components.
Good luck and, hopefully, enjoy!
M Jones 2017
[email protected]
3
AND
A.B
A AND B
AB
A
0
0
1
1
B
0
1
0
1
Q
0
0
0
1
A AND B gives Q
M Jones 2017
[email protected]
4
OR
A+B
A OR B
A
0
0
1
1
B
0
1
0
1
Q
0
1
1
1
A OR B gives Q
M Jones 2017
[email protected]
5
NOT
NOT A
A
A
0
1
1
M Jones 2017
Q
1
0
0
A gives Q
[email protected]
6
NAND
A.B
NOT(A AND B)
A
0
0
1
1
B
0
1
0
1
Q
1
1
1
0
A AND B gives NOT Q
M Jones 2017
[email protected]
7
NOR
A+B
NOT(A OR B)
A
0
0
1
1
B
0
1
0
1
Q
1
0
0
0
A OR B gives NOT Q
M Jones 2017
[email protected]
8
XNOR
(A AND B) OR (NOT A AND NOT B)
A
A
0
0
1
1
B
0
1
0
1
Q
1
0
0
1
A AND B gives NOT Q
M Jones 2017
[email protected]
9
XOR
A
0
0
1
1
B
0
1
0
1
Q
0
1
1
0
A OR B gives Q
M Jones 2017
[email protected]
10
Breadboard Basics
When working with breadboards (or stripboards) you will be working with electrical circuits.
As a result you need to be aware of where the current is going to and coming from.
Current flows in a circular manner. Traditionally viewed as from the positive (anode) to
negative (cathode).
Many components, in particular LEDs, need resistors to prevent the LED from burning out.
In the ½ and full adder example 5v or 3.3v will be supplied to the circuit. Left without a
resistor on the LEDs will mean that they stand a chance of failing.
Resistors are applied to the switches in the examples to ensure that a low state (off/o) is in
operation until the circuit is activated through depression of the button. Without the
resistor in place there is no guarantee that the switch will remain off until pressed.
Typically, power can be
supplied to five components
vertically.
Adding more vertical
components can be achieved
through the use of jumper
wires linking across the
middle channel
M Jones 2017
[email protected]
11
Half Adder Construction
A
B
A.B
A
0
0
1
1
M Jones 2017
INPUTS
B
0
1
0
1
A OR B gives S
S (SUM)
0
1
1
0
[email protected]
OUTPUTS
C (CARRY)
0
0
0
1
A AND B gives C
12
Construction:
Note – when setting component pins on breadboard ensure they straddle the channel in
the middle – see the image above. Use the same approach if using stripboard – there will be
distinct vertical columns separated by horizontal rows.
Power supply – leave enough space for the pins to fix to the stripboard or breadboard.
Ensure you have jumpers set on power supply (5v or 3.3v).
2 x tactile buttons
2 x jumper wires from positive pole (anode) to left hand pin of tactile buttons
2 x 330 ohm resistor from negative pole (anode) to right hand pin of tactile button
2 x TTL Chips ~ XOR and AND. Place XOR first with notch facing buttons. Insert AND TTL in
series (take care with the pins)
1 x jumper wire from first button anode to input pin 1 of XOR chip
1 x jumper wire from second button anode to input pin 2 of XOR chip
1 x jumper wire from input pin 1 of XOR to input pin 1 of AND TTL
Check your placement –
space may become
limited
1 x jumper wire from input pin 2 of XOR to input pin 2 of AND TTL
1 x jumper wire from output 1 of XOR to resistor for SUM LED
1 x resistor joined to output of XOR and anode (long leg) of SUM LED
1 x jumper wire from cathode of SUM LED to cathode (negative) power rail
1 x jumper wire from output 1 of AND to resistor for CARRY LED
1 x resistor joined to output of AND and anode (long leg) of CARRY LED
1 x jumper wire from cathode of CARRY LED to cathode (negative) power rail
1 x jumper wire from ground of XOR and AND TTL to cathode power rail
1 x jumper wire from VCC (power) pin of XOR TTL to anode power rail
1 x jumper wire from VCC (power) pin of AND TTL to anode power rail (either horizontally
across the board to piggy back on XOR power wire or vertically to anode)
TEST
M Jones 2017
[email protected]
13
Full Adder Construction
SUM =
(A XOR B) XOR Cin = (A ⊕B) ⊕Cin
Cout=
A AND B OR Cin(A XOR B) = A.B + Cin(A ⊕B)
INPUTS
A
0
0
0
0
1
1
1
1
M Jones 2017
B
0
0
1
1
0
0
1
1
C-IN
0
1
0
1
0
1
0
1
[email protected]
C-OUT
0
0
0
1
0
1
1
1
OUTPUTS
S (SUM)
0
1
1
0
1
0
0
1
14
Construction:
Note – when setting component pins on breadboard ensure they straddle the channel in
the middle – see the image in the ½ adder section. If using stripboard plan your rail
allocation carefully (even better to prototype on a breadboard first)
Power supply – leave enough space for the pins to fix to the stripboard or breadboard.
Ensure you have jumpers set on power supply (5v or 3.3v).
3 x tactile buttons
3 x jumper wires from positive pole (anode) to left hand pin of tactile buttons
3 x 330 ohm resistor from negative pole (anode) to right hand pin of tactile button
3 x TTL Chips ~ XOR, AND, OR. Place XOR first with notch facing buttons. Insert AND TTL in
series then OR TTL (take care with the pins)
1 x jumper wire from first button anode to input pin 1 of XOR chip
gate 1
1 x jumper wire from first button anode to input pin 1 of AND chip
gate 1
Check your placement –
space may become
limited
1 x jumper wire from second button anode to input pin 2 of XOR chip gate 1
1 x jumper wire from second button anode to input pin 1 of AND chip gate 1
1 x jumper wire from third button anode pin to input pin 2 of XOR chip gate 2
1 x jumper wire from third button anode pin to input pin 1 of AND chip gate 2
1 x jumper wire from output gate 1 of XOR to input a gate 2 of XOR (tiny wire here)
1 x jumper wire from output gate 1 of AND chip to input 1 OR chip
1 x jumper wire from output gate 2 AND chip to input 2 OR chip
1 x jumper wire from output 1 of XOR chip to resistor for SUM LED
1 x resistor joined to output 1 of XOR and anode (long leg) of SUM LED
1 x jumper wire from output 1 of OR chip to resistor for CARRY OUT LED
1 x resistor joined to output 1 of OR chip and anode (long leg) of CARRY OUT LED
1 x jumper wire from cathode of SUM and CARRY OUT LEDs to cathode (negative) power rail
1 x jumper rail to ground each of XOR, AND, OR chips to cathode (negative) power rail
1 x jumper wire for each chip to anode power rail (anode to XOR VCC, then vertical contact
from XOR to AND. Then vertical contact of AND to vertical contact of OR chip)
TEST
M Jones 2017
[email protected]
15
One chip basic construction
Standard breadboard layout for 2 input gate.
Components:
2 x tactile buttons
2 x input jumper wire (to left side of button) from negative breadboard rail
2 x output jumper wire (from right side of button)
1 x 330ohm resistor (to protect LED)
1 x output jumper wire from TTL gate output (in this example pin 3 of the gate) to resistor
2 x 330 ohm resistor to button output from negative breadboard rail
1 x LED with ground (long leg) connected to resistor
1 x jumper wire from negative pole of LED to negative rail of breadboard
1 x jumper wire from TTL ground (in this example pin 7) to negative breadboard rail
1 x TTL chip
1 x jumper wire from pin 14 (VCC) of TTL chip to positive breadboard rail
TTL chip and buttons should straddle the valley between the two halves of the breadboard
M Jones 2017
[email protected]
16
Further Information
Tutorials and further guidance can be found on my CAS link:
http://community.computingatschool.org.uk/users/222/activity
and at YouTube on my channel here:
https://www.youtube.com/channel/UCDe-9WKghWtaykda7_jrV0Q
Further materials to be posted to CAS portal following the conference
M Jones 2017
[email protected]
17