LogicBench — Professional C++ Arduino & 74xx IC Circuit Simulator
LogicBench is a free, browser-based digital logic and Arduino circuit simulator engineered for professional accuracy. It is the only online simulator that compiles genuine C++ Arduino sketches — not block-based visual code — and pairs them with a 34-IC 74xx TTL library, 555 Timer RC physics, and component burn simulation. No download. No registration. Runs entirely client-side in any modern browser.
LogicBench vs. Other Online Circuit Simulators
Most free online circuit simulators trade accuracy for accessibility. LogicBench takes the opposite position: professional-grade simulation tools delivered at zero cost. Here is how LogicBench compares to the most widely used alternatives.
C++ Arduino Compilation vs. Block-Based Visual Coding
Several popular simulators offer "Arduino simulation" through a Scratch-style block-coding interface — a visual drag-and-drop system designed for children learning programming concepts. While accessible, block coding does not translate to or from real Arduino C++ firmware. Students who learn circuit behaviour through block code cannot transfer that knowledge directly to professional firmware development workflows.
LogicBench executes real Arduino C++ sketches. You write void setup() and
void loop() functions using the same API you would deploy to physical hardware:
digitalWrite(pin, HIGH), digitalRead(pin),
analogWrite(pin, 0–255), analogRead(A0–A5),
pinMode(pin, OUTPUT), delay(ms). The sketch is transpiled to a
JavaScript generator function and executed tick-by-tick against the live circuit model.
Pin state changes propagate immediately into the breadboard net — driving LEDs, logic gates,
flip-flops, or any other connected component with zero additional configuration. This is
professional-grade Arduino simulation, not block coding.
High-Fidelity 74xx IC Simulation vs. Basic Logic Gate Primitives
Many online simulators offer a handful of abstract logic gate primitives — AND, OR, NOT — drawn as schematic symbols. These are useful for learning Boolean algebra but do not model real integrated circuits. They have no pin numbers, no DIP package layout, no enable logic, no tri-state outputs, and no timing behaviour.
LogicBench simulates 46 distinct 74xx TTL series ICs with accurate DIP pin assignments that match real component datasheets. Place a 74138 decoder and every pin — A0, A1, A2, E1, E2̄, E3̄, Y0̄–Y7̄ — behaves exactly as specified in the Texas Instruments datasheet. Place a 7474 D flip-flop and the asynchronous PRE and CLR overrides work correctly at every clock edge. This is the level of fidelity required for pre-lab verification of real university digital logic practicals — not schematic sketching.
Component Burn Physics: Simulation of Hardware Destruction
Physical electronics labs teach students that miswiring circuits damages or destroys components. Most simulators silently ignore incorrect wiring — an LED connected directly to 5V without a current-limiting resistor simply glows in the simulator, teaching students that the error is harmless.
LogicBench includes a component burn physics engine. An LED connected to an overvoltage source without a correctly-rated series resistor will visually burn out — the component shows a destruction state and stops conducting. Similarly, ICs subjected to incorrect supply voltages or pin violations enter a fault state. This teaches the critical engineering habit of protecting components before powering a circuit, directly bridging the gap between virtual simulation and physical lab work.
555 Timer RC Physics vs. Simplified Toggle Outputs
Some simulators include a "555 Timer" component whose output simply toggles at a user-entered frequency, ignoring the underlying RC circuit entirely. The resistor and capacitor values chosen by the student have no effect on simulation behaviour.
LogicBench simulates the 555 Timer using the industry-standard RC timing equations. In astable mode, the oscillation frequency is computed as f = 1.44 ÷ ((R1 + 2×R2) × C). The high-state duration is THIGH = 0.693 × (R1 + R2) × C and the low-state duration is TLOW = 0.693 × R2 × C. Duty cycle is D = (R1 + R2) ÷ (R1 + 2×R2). In monostable mode, pulse width is T = 1.1 × R × C. Change the resistor or capacitor value in the inspector and the oscillation frequency updates in real time. This is the same physics model used in professional SPICE simulators, delivered for free in a browser.
Complete 74xx Series IC Simulation Library
LogicBench is a technical reference implementation of the 74xx TTL series. Every IC listed below is independently simulated with correct pin counts, accurate logic behaviour, and DIP package pin assignments.
NAND Gates
- 7400 — Quad 2-input NAND. Logic: Y = ¬(A·B). DIP-14. 4 independent gates.
- 7410 — Triple 3-input NAND. Logic: Y = ¬(A·B·C). DIP-14. 3 independent gates.
- 7420 — Dual 4-input NAND. Logic: Y = ¬(A·B·C·D). DIP-14.
- 7430 — Single 8-input NAND. Logic: Y = ¬(A·B·C·D·E·F·G·H). DIP-14.
AND Gates
- 7408 — Quad 2-input AND. Logic: Y = A·B. DIP-14. 4 independent gates.
- 7411 — Triple 3-input AND. Logic: Y = A·B·C. DIP-14.
- 7421 — Dual 4-input AND. Logic: Y = A·B·C·D. DIP-14.
NOR Gates
- 7402 — Quad 2-input NOR. Logic: Y = ¬(A+B). DIP-14.
- 7427 — Triple 3-input NOR. Logic: Y = ¬(A+B+C). DIP-14.
OR, XOR, XNOR Gates
- 7432 — Quad 2-input OR. Logic: Y = A+B. DIP-14.
- 7486 — Quad 2-input XOR. Logic: Y = A⊕B. Parity, comparators, adders. DIP-14.
- 74266 — Quad 2-input XNOR (open-collector). Logic: Y = ¬(A⊕B). DIP-14.
NOT Gates / Inverters
- 7404 — Hex inverter. Logic: Y = ¬A. DIP-14. 6 independent inverters.
- 7414 — Hex Schmitt-trigger inverter. Hysteresis for noise-immune inputs. DIP-14.
Flip-Flops and Latches
- 7474 — Dual D flip-flop, positive edge-triggered, with asynchronous PRĒ and CLR̄. DIP-14.
- 7476 — Dual JK flip-flop with asynchronous preset and clear. DIP-16.
- 74112 — Dual JK flip-flop, negative edge-triggered, individual asynchronous PRĒ/CLR̄ per flip-flop. Different pinout from 7476. DIP-16.
- 74175 — Quad D flip-flop with common clock and common asynchronous clear (active-low). DIP-16.
- 4013 — CMOS dual D flip-flop, positive edge-triggered, with asynchronous SET and RESET (active-HIGH, opposite polarity from TTL 7474). DIP-14.
- 74373 — Octal transparent D latch with common output enable. Active-high enable, 3-state outputs. DIP-20.
- 74273 — Octal D flip-flop with common clock and common asynchronous clear (active-low), no 3-state outputs. DIP-20.
Decoders and Demultiplexers
- 74138 — 3-to-8 line decoder / demultiplexer. Address inputs A0–A2, enable inputs E1 (active-high), E2̄ and E3̄ (active-low), outputs Y0̄–Y7̄. DIP-16.
- 74139 — Dual 2-to-4 line decoder / demultiplexer. Two independent decoders, each with active-low enable. DIP-16.
Encoders and Multiplexers
- 74148 — 8-to-3 priority encoder. Active-low inputs D0̄–D7̄, binary outputs A0–A2, group signal GS̄, enable output EŌ. DIP-16.
- 74151 — 8-to-1 multiplexer. Select inputs S0–S2, data inputs D0–D7, complementary outputs Y and W̄. Strobe input (active-low). DIP-16.
- 74153 — Dual 4-to-1 multiplexer. Shared select inputs S0–S1, two independent data selectors. DIP-16.
- 74157 — Quad 2-to-1 multiplexer, non-inverting. Shared select S and active-low enable. DIP-16.
- 74158 — Quad 2-to-1 multiplexer, inverting outputs. Same pinout as 74157. DIP-16.
Counters and Shift Registers
- 74193 — Synchronous 4-bit presettable up/down binary counter. Separate up-clock and down-clock inputs, asynchronous parallel load, terminal count outputs TC_U and TC_D. DIP-16.
- 74194 — 4-bit bidirectional universal shift register. Mode inputs S0–S1 select parallel load, shift left, shift right, or hold. Serial inputs SR and SL. DIP-16.
- 7490 — Decade counter: independent ÷2 and ÷5 ripple sections (wire QA→CKB externally for BCD ÷10). Reset-to-0 and set-to-9 inputs. DIP-14.
- 7493 — 4-bit binary counter: independent ÷2 and ÷8 ripple sections (wire QA→CKB externally for full ÷16 count). DIP-14.
- 4017 — CMOS Johnson decade counter/divider. One-hot decoded outputs Q0–Q9, carry-out for cascading, active-high reset. DIP-16.
- 74165 — 8-bit parallel-in, serial-out shift register. Asynchronous parallel load, clock-inhibit input. DIP-16.
- 74595 — 8-bit serial-in, parallel-out shift register with separate storage latch and 3-state outputs. DIP-16.
Arithmetic ICs
- 7483 — 4-bit binary full adder with fast carry. Inputs A1–A4, B1–B4, carry-in C0. Outputs Σ1–Σ4, carry-out C4. Cascadable for wider word widths. DIP-16.
- 74283 — 4-bit binary full adder with fast carry, functionally identical to 7483 but with a different (non-interchangeable) pin arrangement. DIP-16.
- 7485 — 4-bit magnitude comparator. Produces A>B, A=B, A<B outputs. Cascading inputs for wider comparison. DIP-16.
Display Drivers
- 7447 — BCD-to-7-segment decoder / driver (common anode). BCD inputs A–D, segment outputs a–g (active-low). Lamp test LT̄, blanking BĪ, ripple-blanking RBĪ/RBŌ for multi-digit suppression. DIP-16.
Bus Interface and Buffer ICs
- 74245 — Octal bus transceiver, bidirectional, 3-state. DIR controls A→B or B→A. OĒ tri-states all outputs. DIP-20.
- 74125 — Quad 3-state buffer, active-low enable per gate. DIP-14.
- 74126 — Quad 3-state buffer, active-high enable per gate. DIP-14.
- 74240 — Octal inverting buffer / line driver, 3-state. DIP-20.
- 74244 — Octal non-inverting buffer / line driver, 3-state. DIP-20.
- 74541 — Octal buffer / line driver, 3-state, non-inverting, separate OE pins. DIP-20.
- 74273 — Octal D flip-flop, common clock, common asynchronous active-low clear, no 3-state (fixed outputs). DIP-20.
Timer IC
- 555 Timer — Astable and monostable modes. Physics-accurate RC timing model. Astable: f = 1.44 ÷ ((R1 + 2×R2) × C). Monostable: T = 1.1 × R × C. Threshold = 2/3 VCC, trigger = 1/3 VCC. Output frequency updates in real time when R or C values are changed.
Arduino Uno C++ Sketch Simulation — Technical Specification
LogicBench's Arduino simulation is built around a C++ transpiler that converts a subset
of Arduino sketch syntax into a JavaScript generator function. This generator is stepped
by the simulation engine on each tick, allowing delay() calls to yield
control back to the event loop without blocking the browser thread.
Supported Arduino API Calls
pinMode(pin, mode)— Sets pin 0–13 as INPUT or OUTPUT. Analog pins A0–A5 also supported.digitalWrite(pin, value)— Drives a digital pin HIGH (5V) or LOW (0V). Propagates immediately into the breadboard net on that pin.digitalRead(pin)— Reads the current logic state of a digital pin from the circuit net. Returns HIGH or LOW based on connected component states.analogWrite(pin, value)— Sets PWM duty cycle (0–255) on PWM-capable pins (3, 5, 6, 9, 10, 11). Drives the pin voltage proportionally.analogRead(pin)— Reads analog voltage from pins A0–A5. Returns 0–1023 proportional to the 0–5V input, computed from the circuit net voltage.delay(ms)— Suspends sketch execution for the specified number of milliseconds without blocking the simulation loop.millis()— Returns elapsed simulation time in milliseconds since sketch start.- Standard C++ control flow:
if/else,for,while,do-while, functions, local variables,int,bool,float,long, arrays.
Pin state changes made by digitalWrite() propagate into the breadboard net
synchronously on each simulation tick, driving connected logic gates, LEDs, displays,
and 74xx ICs with the same signal propagation rules as manually toggled switches.
555 Timer IC Engineering Documentation — Mathematical Accuracy
The LogicBench 555 Timer simulation is derived from the NE555 / LM555 datasheet specifications published by Texas Instruments and Signetics. The following formulas are implemented exactly.
Astable Oscillator Mode
In astable mode, the 555 Timer continuously charges and discharges a timing capacitor C through resistors R1 and R2, producing a square wave output.
- Oscillation frequency: f = 1.44 ÷ ((R1 + 2 × R2) × C)
- High-state period: THIGH = 0.693 × (R1 + R2) × C
- Low-state period: TLOW = 0.693 × R2 × C
- Total period: T = THIGH + TLOW = 0.693 × (R1 + 2×R2) × C
- Duty cycle: D = (R1 + R2) ÷ (R1 + 2×R2) × 100%
- Note: Duty cycle is always greater than 50% in standard astable configuration because R1 adds to charge time but not discharge time. To achieve ≤50% duty cycle, a bypass diode across R2 is required.
Monostable (One-Shot) Mode
In monostable mode, a falling edge on the trigger pin (pin 2) initiates a single output pulse whose width is determined solely by R and C:
- Pulse width: T = 1.1 × R × C
- Trigger threshold: VTRIGGER = 1/3 × VCC
- Output goes HIGH when trigger falls below 1/3 VCC.
- Output returns LOW when capacitor voltage rises to 2/3 VCC.
Internal Voltage Divider and Comparator Model
The 555 Timer contains an internal resistor voltage divider that sets two reference voltages: an upper threshold at 2/3 VCC (connected to the inverting input of the upper comparator) and a lower threshold at 1/3 VCC (connected to the non-inverting input of the lower comparator). These thresholds trigger the internal SR flip-flop, driving the output and the discharge transistor. LogicBench models both comparator thresholds and the SR flip-flop state correctly across both operating modes.
Component Burn Physics — Overvoltage and Destruction Simulation
Real digital electronics labs teach students through failure. Connecting an LED directly to a 5V supply without a current-limiting resistor burns it out. Applying voltage to the wrong IC pin can permanently damage the device. These are critical engineering lessons that most circuit simulators silently ignore.
LogicBench's burn physics engine monitors the voltage and current across every component on every simulation tick. When a component exceeds its rated limits — for example, an LED receiving more than its forward-voltage drop without current limitation — the component enters a burn state. The LED visually displays a destruction indicator and stops conducting. This simulates the irreversible damage that would occur in a physical lab, teaching students the critical habit of computing and placing a current-limiting resistor before applying power.
This feature is unique among free online circuit simulators and is specifically designed to close the gap between virtual simulation and real-world electronics lab practice.
Virtual Breadboard Simulation
The LogicBench virtual breadboard replicates the physical layout of a standard 830-tie-point solderless breadboard: numbered tie-strip rows a–e and f–j on either side of the split centre channel, with separate positive and negative power rails running the full length. Components snap to individual holes with correct electrical net connectivity — all five holes in a half-row connect to the same net, the power rails connect end-to-end, and the centre channel isolates the two halves. Multiple breadboards can be placed on the canvas simultaneously, connected by wires, for experiments requiring more space than a single board.
Key Features
- Real-time signal propagation — logic states update across the entire net on every component or wire change
- C++ Arduino sketch compiler — write real firmware, not block code
- Component burn physics — learn to protect components before powering circuits
- 46 74xx series TTL ICs with datasheet-accurate pin layouts
- 555 Timer with RC physics — frequency and duty cycle computed from R and C values
- Save and load circuits as JSON files — shareable, version-controllable
- Subcircuit ghost-import for hierarchical modular design
- Combo-export: auto-simulates all input permutations, exports screenshots and CSV truth table as a ZIP archive
- Undo and redo with full edit history
- Multi-colour wires (black, red, teal, amber) for net identification
- Component search bar for instant toolbox filtering
- Completely free, no registration, no download, no install
Who Uses LogicBench?
- University students in Digital Logic Design (DLD), Computer Architecture, Digital Electronics, and Microprocessor Systems courses
- Engineering educators preparing lab practicals and lecture demonstrations
- Embedded systems engineers prototyping Arduino-to-logic-gate interface circuits
- Hobbyists and makers who need to verify 74xx circuit behaviour before breadboarding
- Self-learners working through digital electronics textbooks and wanting a hands-on simulator
Frequently Asked Questions
Is LogicBench free to use?
Yes. LogicBench is completely free with no subscription, login, or download required. It runs entirely in the browser.
Can LogicBench simulate real C++ Arduino code?
Yes. LogicBench compiles and executes real Arduino C++ sketches — not Scratch-style block code. You write
void setup() and void loop() using digitalWrite,
digitalRead, analogRead, analogWrite, and delay.
The sketch executes against the live circuit model, driving connected components in real time.
How does LogicBench compare to Tinkercad for Arduino simulation?
Tinkercad uses a Scratch-style block-coding interface for beginners. LogicBench executes professional C++ Arduino sketches directly. LogicBench also includes a 34-IC 74xx TTL library and component burn physics that Tinkercad does not model.
How does LogicBench compare to Wokwi?
LogicBench provides a complete 34-IC 74xx series TTL library — including decoders, counters, shift registers, bus transceivers, and arithmetic ICs — with physics-accurate 555 Timer simulation and component burn physics. These capabilities are not available in Wokwi's free tier.
What 74-series ICs does LogicBench simulate?
LogicBench simulates 46 74xx TTL ICs: 7400, 7402, 7404, 7408, 7410, 7411, 7414, 7420, 7421, 7427, 7430, 7432, 7447, 7474, 7476, 7483, 7485, 7486, 7490, 7493, 74112, 74125, 74126, 74138, 74139, 74148, 74151, 74153, 74157, 74158, 74165, 74175, 74193, 74194, 74240, 74244, 74245, 74266, 74273, 74283, 74373, 74541, 74595, CD4013, CD4017, plus the 555 Timer IC.
What is the 555 timer formula for frequency?
In astable mode, the 555 Timer oscillation frequency is f = 1.44 ÷ ((R1 + 2×R2) × C), where R1 and R2 are in ohms and C is in farads. LogicBench computes this in real time from the resistor and capacitor values you place on the breadboard.
Does LogicBench simulate component damage and burn?
Yes. LogicBench includes component burn physics. An LED connected without a current-limiting resistor will visually burn out, teaching students to protect components before applying power — a feature unique among free online circuit simulators.
Can I simulate Arduino with digital logic gates in LogicBench?
Yes. Place an Arduino Uno component, write a C++ sketch, and connect its digital pins directly
to 74xx ICs, LEDs, resistors, or any other component on the breadboard. Pin state changes from
digitalWrite propagate into the circuit net in real time.
What file format does LogicBench use for saving circuits?
Circuits are saved as standard JSON files. You can save, share, version-control, and reload any circuit by exchanging the .json file. The subcircuit import feature lets you embed saved circuits as reusable modules inside larger hierarchical designs.
Is LogicBench good for DLD lab practicals?
LogicBench is specifically designed for Digital Logic Design lab environments. Its accurate breadboard topology, correct 74xx IC pin assignments, combo-export truth-table generator, and pre-lab verification workflow make it a direct substitute for physical DLD lab equipment.
Does LogicBench work offline?
After the initial page load, LogicBench runs entirely client-side. No server communication is required for simulation, saving, or loading circuits.