Three essential Logic circuits
The three circuits on this page are the fundamental hardware building blocks of any computing system. They make possible calculation - by allowing numbers to be added together - and memory, storing a system state as a value that can be read, written and reset.
Circuit one, the Half Adder
The Half-adder is very simple. It consists of a single XOR and AND gates in combination. It's effect is to allow two separate binary inputs to be combined into a binary number between 0 and 2.
With the half-adder we break out of the limits of 0 and 1, allowing the simplest kind of addition. Notice that the half-adder never produces the result '3', which, if you think about the inputs, is quite correct. |
Circuit two, the Full Adder
The full adder builds on the half adder by including an additional input, the 'Carry in' line. Outputs, as with the half adder are the sum and carry. Connecting full adders in sequence, wiring up the carry out of the first adder to the carry in of the second - allows an unlimited number of inputs to be added together.
Use Logic.ly to create three full adders and wire them together. Can you make them add properly numbers up to six? |
Circuit three, the flip-flop
Flip-flops come in many shapes and sizes. The diagram here is probably one of the simplest. Strange things happen when you feed the output of one gate to the input of another, and feed that output back into the original gate.
To see why a flip-flop is special, build one and explore what it does. Try and make a truth table for it's operation. You'll find that you can't - the state of the circuit doesn't just depend on the current inputs, it depends on what happened before. This is the core principle behind computer memory. |