Digital logic forms the fundamental building blocks of modern computer hardware and microprocessors. In Sri Lankan school ICT, students learn how basic logic gates process binary inputs (0 for False/Low, 1 for True/High) using Boolean algebra. In this interactive Logic Gate Designer, you can place input toggle switches, connect gates with virtual signal wires, monitor output bulbs in real time, and automatically generate comprehensive truth tables for your custom circuits.
The three basic logic operations are AND (output is 1 only when all inputs are 1; Y = A • B), OR (output is 1 if at least one input is 1; Y = A + B), and NOT (inverter that flips 0 to 1 and 1 to 0; Y = A').
NAND (Y = (A • B)') and NOR (Y = (A + B)') are known as universal gates because any combinational logic function or computer processor circuit can be built exclusively using combinations of either gate alone.
XOR (Exclusive-OR; Y = A ⊕ B) produces output 1 when the inputs are different, making it essential for binary arithmetic adders. XNOR (Y = (A ⊕ B)') produces output 1 when both inputs are identical, serving as an equality comparator.
Summary of output values for all 7 standard logic gates across all 4 binary input combinations:
| Input A | Input B | AND | OR | NAND | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |