Making a Full Adder With LogicBoard From MH-EDU-Electronics
by kevinjwalters in Circuits > Electronics
2158 Views, 0 Favorites, 0 Comments
Making a Full Adder With LogicBoard From MH-EDU-Electronics
The LogicBoard (STEM Logic Gates Experimentation Lab) from MH-EDU-Electronics is an affordable, small board for learning about logic gates which are the fundamental building blocks of digital computers. It has 13 gates, three switched inputs and three red LED outputs.
This article shows how to make a full adder, a circuit which can add single bit binary numbers together. This is one of the building blocks of the mathematical operators in the arithmetic logic unit (ALU) inside a CPU. An interactive version of the circuit is also shown in the Falstad Circuit Simulator which runs in a web browser. Physical construction may be a more engaging experience for learning about circuits and electronics than the browser version.
This board can be used with an Arduino UNO. Another product, the 8 gate LogicShield is specifically designed for use with an Arduino.
There's now a second article on using this board: Making an Oscillator With LogicBoard From MH-EDU-Electronics.
Supplies
- MH-EDU-Electronics LogicBoard - Tindie (supplied with 20 female-female 10cm (4") jumper wires)
- Power source with 2.1mm centre-positive DC barrel jack connector (same as Arduino UNO)
- A 9V PP3 battery with a connecting lead or
- a 4xAA battery pack with a connecting lead or
- a mains power supply between 4V and 14V - ensure it is centre-positive.
- With care the board can be powered from an Arduino UNO by connecting
- Arduino GND to LogicBoard 0 and
- Arduino 5V to LogicBoard 1.
Introduction to the LogicBoard
The LogicBoard features 13 gates:
- 2 AND, 2 NAND;
- 2 OR, 2 NOR;
- 2 XOR, 1 XNOR, 2 NOT.
The gates are implemented using the gates in four Texas Instruments logic chips, descendants from the original 1968 RCA 4000 series logic:
- CD4093BE - 4 2-input NAND gates (Schmitt-Trigger inputs);
- CD4069BE - 6 NOT (AKA inverter) gates;
- CD4071BE - 4 2-input OR gates ;
- CD4070BE - 4 XOR gates.
This series of logic chips are complementary-metal oxide semiconductor (CMOS) technology and can be powered from 3V to 18V but the board recommends 4V to 14V.
The board has AND, NOR and XNOR gates which are not provided by these chips but are created by combining gates - the output of NAND, OR and XOR gates, respectively, are each connected to a NOT gate. There are three input switches, two reference values, 0 (low) and 1 (high), and three red LED outputs.
The board uses the same 2.1mm barrel connector as the Arduino UNO although the board does not have a voltage regulator. The logic will operate at approximately 9V if a PP3 battery is used. The voltage will be 0.6V lower due to a diode which provides reverse polarity protection. The high logic level is the supply voltage minus 0.6V, the low level is 0V.
Multiple boards using the same voltage could be used together. The 0 and 1 inputs are not intended for powering but can be used to connect boards for one to power another - care is needed as there is no polarity protection using this method. This may require longer jumper wires than the ones supplied.
The board is approximately 99mm x 76mm.
Binary Addition With Logic Gates
The classic implementation in logic gates of an adder is shown above on the left. The adder includes a third carry input making it a full adder rather than the half adder which only has two inputs. The inputs of A, B and Cin are added together to produce a sum S and a carry output Cout.
The diagram on the right is the same circuit rearranged to tailor it to the layout of the LogicBoard.
Making and Testing a Full Adder Using LogicBoard
The construction of the full adder by the two logicians is shown in the video above with a third supervisor. They use
- 2 orange cables for input A;
- 2 yellow cables for input B;
- 2 green cables for input C;
- 4 blue cables** for intermediate outputs;
- 2 violet/purple cables for outputs to X (sum) and Y (carry out).
They test it at the end but the input switch positions are difficult to see. The next page shows the testing more clearly.
** The LogicBoard comes with 2 cables of each colour, some extra cables were used here.
Annotated Testing of LogicBoard Full Adder
This is the same test from the video but the input and output values are annotated using a red font. The sum is shown at the bottom with the decimal value in round brackets.
The truth table is shown below, A & B & C are the inputs on the left with the top being A, C (carry output) & S (sum) are the outputs Y and X, respectively.
ABC | CS
-------
000 | 00
001 | 01
010 | 01
011 | 10
100 | 01
101 | 10
110 | 10
111 | 11
Making and Testing a Full Adder Using Falstad Circuit Simulator
The animation above shows a full adder being tested in the Falstad Circuit Simulator.
Here's a LogicBoard implemented in Falstad with no connections if you wish to make your own circuit.
Thoughts on the LogicBoard
- The board has a useful collection of gates for creating logic circuits.
- The single board approach is less cumbersome than thirteen separate, small boards.
- The four chips which contain the gates are clearly visible.
- The graphics on the PCB's silkscreen clearly show the gates with symbols and words.
- It would benefit from some rubber feet to prevent desk scratching. There is enough space on the underside to allow four small ones to be attached.
- The gates with Schmitt trigger inputs could be marked with a symbol.
Going Further
Some ideas for areas to explore:
- Create some more digital building blocks like flip-flops.
- Build an oscillator using a few external passive components. The presence of Schmitt triggers on the AND/NAND gates may help here. See Making an Oscillator With LogicBoard From MH-EDU-Electronics for an example of this.
- If you have more than one LogicBoard then create a multibit adder by combining them.
- Explore the Combinatorial Logic and Sequential Logic library examples in Falstad Circuit Simulator.
Similar products:
- Digirule (AKA Digirule 1A) - shows how gates work but is not designed to connect them together.
- LogicBits - shown in Instructables: Logic Gates Demonstration Kit
- littleBits logic gates - some are included in the STEAM+ Coding Expansion Pack.
- Snap Circuits logic gates - unfortunately there are no current kits which include these as the Snap Circuits Digital Logic Gates 200 Exploration Kit appears to no longer be sold.
- Kitronik: Digital Logic Pack for Kitronik Inventor's Kit for the BBC micro:bit - a collection of chips intended as an addition to the Inventor's Kit for the BBC micro:bit.
- JK Electronic Logic Professor - demonstrated in Binary Half Adder with Logic Professor Board (YouTube)
- Second-hand
- InterTan/Science Fair/Elenco/Maxitronix/Radio Shack/Velleman 300 1 in Electronics Kit - this includes NOR and NAND gates and three higher-level logic chips.
- DFRobot BOSON Inventor Kit - 3 AND, 3 OR and 3 NOT gates.
- SparkFun LogicBlocks Kit - 2 AND, 2 OR and 3 NOT gates.
- University of Southampton (UK) Logic and Arithmetic board - "The kit is currently not available to purchase, but limited numbers are being provided to schools for free. Schools/colleges interested in receiving kits, or organisations interested in sponsoring the scheme, can join our mailing list to find out more."
Related projects:
- Instructables: One Transistor Full Adder - some clever circuit design to use a single PNP transistor to create a full adder.
- Instructables: 4-Bit Binary Adder - made with a mix of 7400 and 4000 series logic chips on a breadboard.
Related larger projects:
- Ben Eater: Build an 8-bit computer from scratch
- MOnSter 6502 - a 6502 processor built from transistors.
- The Megaprocessor - James Newman's computer built from transistors on display at the Centre for Computing History in Cambridge, UK.
- Jeroen Brinkman's MERCIA Relay Computer - a project to build a computer using relays.
- Charles Babbage's Difference Engines and the Science Museum - early mechanical calculators.
- Konrad Zuse Z1 electro-mechanical computer - rebuilt and residing in the German Museum of Technology in Berlin.
Further reading:
- Khan Academy: code.org: Circuits & Logic
- element14 presents (YouTube)
- Making Logic Gates From Discrete Components - The Learning Circuit - making gates from (BJT) transistors.
- Essential Logic Families - Workbench Wednesdays - discusses and examines the behaviour of CMOS and TTL logic.
- Learn Electronics Repair: All You Need To Know About Logic Gates To Fix Stuff - Tutorial Guide (YouTube)
- Ben Eater: Learn how computers add numbers and build a 4 bit adder circuit - explanation and example made using 7400 series logic chips on a breadboard.
- Adafruit Learn (1-7 series)
- Digital Circuits 1: Binary, Boolean, and Logic
- Digital Circuits 2: Combinatorial Circuits
- Digital Circuits 4: Sequential Circuits
- Future Learn: Digital Logic Examples
- ElectroBOOM: Making Intelligence with Basic Switch (YouTube) - covers logic gates, truth tables, S-R and D latches and making gates from switches and relays.