Lab

AND, OR and XOR Logic Gates with Two Inputs

Two logic inputs, A and B, drive an AND, an OR and an XOR gate. Click an input to switch it between 0 and 1 and watch the three outputs follow the truth…

Preview of AND, OR and XOR Logic Gates with Two Inputs
Open in the lab Embed Run the circuit right here. To edit it in the full lab, sign in; free accounts have a time limit there.

Online Logic Gate Simulator

Teaching with circuits?

Create a classroom, give your students a circuit to build, and review what they submit. Try it free with one classroom and up to 5 students.

Try the free classroom demo

How it works

Click input A or input B to switch it between 0 and 1. Each input feeds all three gates, and each gate drives its own output: A AND B is 1 only when both inputs are 1, A OR B is 1 when either input is 1, and A XOR B is 1 when exactly one input is 1.

Try all four combinations of A and B and write down the three outputs each time. The table you get is the truth table of the three gates. The XOR and AND outputs together are a half adder: XOR gives the sum bit and AND gives the carry.

What's inside

  • 8× Logic Gate

Tags

About

By Samir Sabri
Saved November 11, 2026
10 views
Page: dcaclab.com/circuits/87951-and-or-and-xor-logic-gates-with-two-inputs

Embed this circuit

<iframe src="https://dcaclab.com/experiments/87951-and-or-and-xor-logic-gates-with-two-inputs/iframe" width="560" height="410" frameborder="0"></iframe>

Cite: Sabri, S. (2026). AND, OR and XOR Logic Gates with Two Inputs. DCACLab. https://dcaclab.com/circuits/87951-and-or-and-xor-logic-gates-with-two-inputs

Related circuits