Logic gates — Engineering, 14–17 years
Logic gates turn simple yes-or-no inputs into a clear output, forming the basic decisions inside digital devices.
Tiny yes-or-no decisions
A logic gate follows a rule about inputs that are either 0 or 1, such as off or on. An AND gate gives 1 only when both inputs are 1; an OR gate gives 1 when at least one input is 1.
The problem of reliable decisions
A machine may need to start only when several conditions are true, or warn when any one condition is true. Logic gates give engineers exact, repeatable rules for combining sensor signals instead of building each decision from guesswork.
A two-condition alarm
Suppose an alarm should sound only when a door is open and the system is armed. Let open = 1 and armed = 1. An AND gate receives 1,1 and outputs 1, so the alarm sounds; with 1,0 or 0,1 it outputs 0.
AND and OR are easy to swap
People often choose OR because ordinary language says an alarm needs a door or a window open. The mistake is reasonable, but the required condition may be both sensors together; write the rule in words before choosing the gate.
Logic inside everyday devices
Phones, washing machines, lifts and traffic lights combine many gates to make decisions. A lift can refuse to move when a door sensor says open, while a phone can unlock only when several checks produce the required pattern.
Keep exploring
Other languages
Loading MyLeoNes™…