QueryEd.com

Your Human AI Coding Tutor

London & Birmingham & Online

Back

Boolean logic deals with two values: true and false. It's the basis for all digital electronics and computer decisions.

Logic Gates

Truth Tables

A truth table shows all possible input combinations and the resulting output for a gate or circuit.

Example Truth Table (AND Gate)

Input AInput BOutput
FALSEFALSEFALSE
FALSETRUEFALSE
TRUEFALSEFALSE
TRUETRUETRUE

Combining Gates into Circuits

You can combine gates to create more complex circuits. Example: a security system might trigger an alarm only if both a motion sensor (Input A) AND a door sensor (Input B) are active.