大象传媒

Truth tables - EdexcelOR gates

Computers are collections of transistors and circuits. These connect together to form logic gates, which in turn are used to form logic circuits. These can be represented as truth tables, Boolean algebra logic statements, and diagrams.

Part of Computer SciencePrinciples of computer science

OR gates

An OR gate uses two to generate one . The output is 1 (TRUE) only if either or both of the inputs are 1 (TRUE).

OR gates are represented diagrammatically as:

Two separate OR gates representing TRUE outputs

A represents the first input. B represents the second input. Q represents the output.

A shows, for each combination of inputs, what the output will be. An OR gate is represented in a truth table as seen below.

ABQ
000
011
101
111
A0
B0
Q0
A0
B1
Q1
A1
B0
Q1
A1
B1
Q1

This OR gate is represented in by the logic A OR B.