OR gates
Categories: logic logic gates
An OR gate has two inputs and one output. It is similar to an AND gate, except that the output obeys different rules.
The two inputs can each have values 0 or 1.
The state of the inputs controls the state of the output. The output value is 1 if either (or both) inputs are 1, otherwise it is 0. It is called an OR gate because the output will be 1 if input A OR input B is one.
Symbol
Here is the symbol for an OR gate. The inputs are labelled A and B, the output is labelled Q.
Truth table
A truth table is a table which shows all possible combinations of inputs (A and B), and the resulting value of the output, Q. Here is the truth table for an OR gate, as you can see the output is 1 if either (or both) inputs are 1.
See also
Sign up to the Creative Coding Newletter
Join my newsletter to receive occasional emails when new content is added, using the form below:
Popular tags
555 timer abstract data type abstraction addition algorithm and gate array ascii ascii85 base32 base64 battery binary binary encoding binary search bit block cipher block padding byte canvas colour coming soon computer music condition cryptographic attacks cryptography decomposition decryption deduplication dictionary attack encryption file server flash memory hard drive hashing hexadecimal hmac html image insertion sort ip address key derivation lamp linear search list mac mac address mesh network message authentication code music nand gate network storage none nor gate not gate op-amp or gate pixel private key python quantisation queue raid ram relational operator resources rgb rom search sort sound synthesis ssd star network supercollider svg switch symmetric encryption truth table turtle graphics yenc