AND Circuit Diagram — Logic Gate and Industrial Relay Implementation

And Circuit Diagram — circuit diagram showing component connectionsMainOutlet 1Outlet 2SwitchLight230V AC UtilityBasic Wiring Diagram
AND Circuit Diagram — Logic Gate and Industrial Relay Implementation — interactive diagram. Open it in the editor to customise components and wiring.

This is a free printable and circuit diagram: download the diagram as SVG or open it and print to paper or PDF.

An AND circuit produces an output only when all inputs are simultaneously active. AND logic underpins digital electronics, motor control interlocks, and machine guarding safety circuits. This guide covers both the 74HC08 IC implementation and the relay-based AND circuit used in industrial control panels, with wiring diagrams and practical troubleshooting steps.

AND logic is one of the three fundamental Boolean operations, alongside OR and NOT. The AND function states that output Q is HIGH only when input A AND input B are both HIGH. In all other combinations — A=0 B=0, A=1 B=0, A=0 B=1 — the output is LOW. The Boolean expression is Q = A · B. This behavior makes AND circuits essential wherever two or more conditions must be true simultaneously before an action is permitted.

The most straightforward semiconductor implementation uses the 74HC08 quad 2-input AND gate IC. This 14-pin device contains four independent AND gates operating from 2 V to 6 V DC supply. Logic HIGH is recognized above 0.7 × VCC; logic LOW below 0.3 × VCC. Each gate output can source or sink up to 25 mA — enough to drive an LED directly through a current-limiting resistor. Propagation delay is approximately 7–10 nanoseconds at 5 V, making the device suitable for logic circuits operating into the tens of MHz range.

For industrial applications requiring AND logic to switch high-power loads, two relays wired in series implement the AND function. Relay K1 is energized by condition A (for example, a guard door interlock switch), and relay K2 is energized by condition B (an operator run button). Only when both relays are energized — both normally-open contacts closed — does current flow through the series contact string to the output load, such as a motor starter coil. This relay AND circuit is the standard technique for machine guarding interlocks because it provides galvanic isolation between the input logic level (typically 24 V DC) and the output load (typically 120 V or 240 V AC).

Critical design details that are often missed: all unused input pins on a 74HC08 must be tied to either VCC or GND — never left floating. A floating input picks up induced noise and causes unpredictable output states. Pull-down resistors of 10 kΩ on mechanical switch inputs prevent glitches from switch bounce. In relay AND circuits, flyback diodes across each relay coil suppress the inductive voltage spike generated when the coil is de-energized; without diodes, the spike can reach hundreds of volts and destroy the transistor or IC driving the coil.

For safety-critical AND circuits meeting functional safety standards (IEC 62061, ISO 13849), a simple relay AND is insufficient. Certified safety relay modules with dual-channel input monitoring, contact monitoring feedback, and automatic reset functions are required to achieve the necessary Safety Integrity Level (SIL) or Performance Level (PL).

The AND gate circuit diagram is fundamental to digital logic design. An AND gate produces a HIGH output only when all of its inputs are simultaneously HIGH; in every other input combination the output is LOW. Implementing an AND function in hardware uses either a dedicated IC such as the 74LS08 (quad 2-input AND), or transistor-level circuits such as a resistor-transistor logic (RTL) or diode-transistor logic (DTL) arrangement. Understanding standard logic symbols — the distinctive D-shaped body for AND in ANSI notation, or a rectangular box with an ampersand in IEC notation — is essential before drawing any digital schematic. Use the free online schematic editor to place gates, add labels, and export your AND gate diagram without any download.

How to wire and circuit diagram

  1. Place the 74HC08 on a breadboard Insert the IC straddling the breadboard center gap, pin 1 at upper-left (aligned with the notch). Connect pin 14 to the 5 V power rail and pin 7 to the ground rail using short jumper wires.
  2. Connect input switches with pull-downs Wire two SPST push-buttons between the 5 V rail and gate inputs A (pin 1) and B (pin 2). Add a 10 kΩ resistor from each input pin to ground — this holds the input LOW when the button is open and prevents floating.
  3. Connect the output indicator LED Connect a 330 Ω resistor from output pin 3 to the LED anode. Connect the LED cathode to the ground rail. The LED illuminates only when both switches are pressed simultaneously, demonstrating AND logic.
  4. Test all four input combinations Verify the truth table: LED off with no switches pressed; LED off with only SW1 pressed; LED off with only SW2 pressed; LED on only when both SW1 and SW2 are pressed together.
  5. Tie unused gate inputs Connect all unused AND gate inputs (pins 4, 5, 9, 10, 12, 13) to GND or VCC. Tie to GND when the gate is unused entirely. This prevents oscillation and current spikes from floating inputs.

Specifications

IC Part Number74HC08 (quad 2-input AND)
Supply Voltage2–6 V DC (5 V typical)
Logic HIGH Input Threshold>0.7 × VCC
Output Drive Current±25 mA per gate

Safety warnings

Tools needed

Common mistakes

Troubleshooting

Output is always LOW regardless of input combinations
Cause: VCC absent on pin 14, GND absent on pin 7, or one input permanently held LOW by a pull-down with no switch Fix: Measure voltage on pins 14 (should be ~5 V) and 7 (0 V). Then measure each input pin — both must reach ≥3.5 V (0.7 × 5 V) to register as HIGH. Check for a shorted decoupling capacitor pulling VCC to GND.
Output glitches or oscillates randomly
Cause: Floating unused input pin picking up induced noise, or no decoupling capacitor on the IC supply Fix: Add a 100 nF ceramic decoupling capacitor between VCC and GND as close to the IC body as possible. Tie all unused gate input pins to GND or VCC with direct connections.
Relay AND circuit: load energizes with only one input active
Cause: Relay contacts wired in parallel instead of series, or one contact is welded closed from a previous overload Fix: Verify the NO contacts of K1 and K2 are wired in series in the load circuit. Test each contact with a multimeter — a welded contact reads <1 Ω when the coil is de-energized. Replace the damaged relay.

Frequently asked questions

What is the truth table for a 2-input AND gate?

The four input combinations and their outputs are: A=0 B=0 → Q=0; A=0 B=1 → Q=0; A=1 B=0 → Q=0; A=1 B=1 → Q=1. The output is HIGH only when both inputs are simultaneously HIGH. A single LOW input forces the output LOW regardless of the other input. This is why AND gates are used for interlock circuits that require all conditions to be met at the same time.

Can I build an AND gate using only resistors?

A passive resistor AND gate is possible in theory for positive logic, using pull-up and pull-down resistors. However, passive gates have poorly defined switching thresholds, degrade signal levels, cannot drive loads reliably, and have no noise immunity. For any real application, use a 74HC08 or equivalent CMOS IC. The IC costs pennies, operates correctly across the full logic voltage range, and can drive the next stage without loading problems.

How many AND gates are in a 74HC08?

The 74HC08 contains four independent 2-input AND gates sharing VCC (pin 14) and GND (pin 7). The four gates use input/output pins 1-2/3, 4-5/6, 9-10/8, and 12-13/11. This gives four complete AND functions from a single inexpensive IC in a 14-pin DIP or SOIC package. For three-input AND functions, cascade two 74HC08 gates: feed outputs of gate 1 (inputs A, B) into one input of gate 2 alongside input C.

What is the difference between AND and NAND?

A NAND gate is an AND gate with its output inverted. The NAND output is LOW only when all inputs are HIGH; it is HIGH for every other input combination. NAND gates (74HC00) are called universal gates because any logical function can be implemented using only NAND gates. AND gates are used when a non-inverted output is needed directly without an additional inverter stage. In relay circuits, series contacts implement AND while parallel contacts implement OR.

How do I implement a 3-input AND circuit?

Cascade two 2-input AND gates from a 74HC08: connect inputs A and B to gate 1 (pins 1, 2 → output pin 3), then connect the gate 1 output and input C to gate 2 (pins 4, 5 → output pin 6). Gate 2 output is HIGH only when A AND B AND C are simultaneously HIGH. Alternatively, use a 74HC11 triple 3-input AND gate IC, which provides three 3-input AND functions in a 14-pin package and avoids the cascading stage.

What does a circuit diagram for an AND gate look like?

In ANSI/IEEE notation the AND gate is drawn as a D-shaped symbol: a flat left edge for the inputs and a curved right edge for the single output. Two input lines enter the flat side and one output line exits the curved tip. In IEC notation it is a rectangle labelled '&'. Both representations are valid; choose the style required by your curriculum or standard and apply it consistently throughout the schematic.

What are the standard circuit diagram symbols used in digital logic?

Common digital logic symbols include the AND gate (D-shape or '&' box), OR gate (curved shield shape or '≥1' box), NOT gate (triangle with a bubble), NAND and NOR gates (AND/OR shapes with output bubbles), XOR gate (OR shape with an extra curved input line), and flip-flop blocks labelled D, SR, JK, or T. Wires carrying logic signals are drawn as straight lines; junctions are marked with a filled dot; buses are shown as thick lines or labelled multi-bit arrows.

What are common circuit diagram questions and answers for an AND gate?

A typical exam question asks: 'What is the output of a 2-input AND gate when A=1 and B=0?' — the answer is 0, because both inputs must be HIGH for the output to be HIGH. Another common question: 'How many input combinations give a HIGH output for a 3-input AND gate?' — only one (A=B=C=1). Truth tables with all 2^n input combinations are the standard way to verify AND gate behaviour for any number of inputs n.

What is the circuit diagram of an AND gate at the transistor level?

A simple transistor-level AND gate can be built with two NPN transistors connected in series between the supply rail (through a collector resistor) and ground. Both transistors must be driven into saturation by their respective input signals for current to flow and the output to go HIGH. In practice integrated-circuit AND gates use more refined CMOS or TTL topologies, but the series-transistor concept captures the fundamental AND behaviour.

What is the difference between a circuit diagram and a schematic diagram?

A schematic diagram (or schematic) uses standardised symbols to represent electronic components and their connections, emphasising logical function over physical layout. A circuit diagram is a broader term that can refer to the same thing, but in some contexts it also includes more pictorial or semi-realistic representations showing actual component placement. In formal electronics documentation the two terms are often interchangeable; in education 'circuit diagram' is common in physics, while 'schematic' is preferred in engineering.

Related diagrams

Free electrical calculators

Edit this diagram free in the online editor