Source: https://mokxi.com/full-adder-simulator

Simulator

# A half adder and full adder simulator, built from real chips

Mokxi is a free online full adder simulator that runs in your browser, with nothing to install and no account needed. Three slide switches for A, B and carry-in, a 74HC86, a 74HC08 and a 74HC32 on a breadboard, and two LEDs for the sum and the carry out. Flip the switches and the circuit adds the three bits.

Start building free or build it from the truth table

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Hold the button

Click the slide switches to set A, B and carry-in, or click anything else to open it in the editor.

## What you can do here

In the circuit above, or in the editor it opens.

- Flip A, B and carry-in and read the sum and carry LEDs
- Check all eight rows of the truth table
- Take the carry-in away and you have a half adder: one XOR and one AND
- Chain two adders into a 2-bit ripple-carry adder
- Follow a 1 through the gates: each wire is tinted by its logic level
- Go on to an 8-bit adder of 120 NAND gates, and a CPU

## What the running circuit shows

One bit of arithmetic.

The sum is A xor B xor Cin, two XOR gates of the 74HC86 in series. The carry out is (A and B) or ((A xor B) and Cin): two ANDs from the 74HC08 into one OR of the 74HC32. In the engine all eight rows come out as the truth table says. With every switch at 0 both LEDs are dark; any one switch at 1 lights the sum only; any two light the carry only, since 1 + 1 is binary 10; and all three light both, 1 + 1 + 1 = 11.

The LEDs are on the chips’ real outputs through 220 ohm: with all three switches at 1 the green sum LED takes about 8.7 mA and the red carry LED about 13.2 mA, from outputs sitting at about 4.74 V and 4.60 V.

## Half adder or full adder

The carry-in is the difference.

A half adder adds two bits: the sum is A xor B and the carry is A and B, one gate each. It has nowhere to take a carry from a column to its right, so it can only sit in the lowest bit of a sum. A full adder adds three bits, A, B and the carry from the column before, which is why chaining them, carry out to carry in, adds numbers of any width. Two make a 2-bit ripple-carry adder; eight make the adder inside an 8-bit CPU.

The chips are modeled with their supply pins, thresholds and typical propagation delays, so a carry really ripples from one stage to the next a few nanoseconds apiece. What it leaves out: the gates do not heat, fan-out is not limited, and the switches here never bounce.

Half adder and full adder, step by step The 74HC86 XOR chip A computer from NAND gates The logic gate simulator

## Questions

Is it free?

Yes. The circuit on this page, every part in it and the editor it opens in are on the free plan, with no card.

Do I need an account?

No. The circuit runs the moment the page does, and the editor opens without one. A free account is only for saving a project to the cloud and sharing it by link.

What is the truth table of a full adder?

Sum is 1 when an odd number of A, B and Cin are 1. Carry is 1 when at least two of them are. So 0 0 0 gives carry 0 sum 0, one input high gives 0 1, two give 1 0, and all three give 1 1.

Can I build a full adder from NAND gates only?

Yes. Nine NAND gates make one, and the logic path on Mokxi builds an 8-bit adder from 120 of them, packaged as chips you can unpack a level at a time.

Does it work on a Chromebook?

Yes. It runs in Chrome with nothing to install, which is how many school digital electronics classes use it.

## More simulators

Each one opens on a circuit that is already running.

Online circuit simulator Breadboard simulator ESP32 simulator Op-amp simulator Logic gate simulator LED circuit simulator Servo simulator LCD simulator OLED simulator NeoPixel simulator 7 segment display simulator LED matrix simulator Stepper motor simulator Motor driver simulator Ultrasonic sensor simulator Rectifier simulator Digital circuit simulator Potentiometer simulator PWM simulator Relay simulator Shift register simulator DHT11 simulator RFID simulator Accelerometer simulator RGB LED simulator Buzzer simulator MOSFET simulator Circuit simulator for kids Flip-flop simulator Multiplexer simulator I2C simulator UART simulator Thermistor simulator PIR sensor simulator Oscilloscope simulator Multimeter simulator DC motor simulator Traffic light simulator Diode simulator Capacitor simulator Series and parallel circuit simulator Wheatstone bridge simulator Voltage regulator simulator Soil moisture sensor simulator Zener diode simulator Solar panel simulator AC circuit simulator Thevenin simulator Decoder simulator Encoder simulator PID simulator Robot arm simulator Load cell simulator IR sensor simulator LM35 simulator HC-05 Bluetooth simulator nRF24L01 simulator

## Add two bits

Open the circuit, flip the switches and press Run. Nothing to install, and no account needed.

Start building free Open the editor
