Boolean logic Flashcards
What is a logical operator?
Inside of each computer system are millions of transistors. These are tiny switches that can either be turned on (represented in binary as 1) or turned off (represented by 0)
Logical operators are symbols used to represent circuits of transistors within. computer. The three mot common operators are: NOT, AND, OR
What is a truth table?
Truth tables are used to show all possible inputs and outputs for each input.
The input & output values in truth table must be a boolean value (0 or 1 / true or false)
NOT gates
A NOT logical operator (gate) will produce an output which is the opposite of the input
e.g the input 1 would output as 0
Not gates look like a triangle with a circle with two lines either side
AND gates
AND logical operators will output 1 only if both inputs are also 1. AND gates take two inputs
e.g. Input A = 0
Input B = 1
Input C = 0
An AND gate looks like a big D with two lines going into it and one line going out
OR gates
An OR gate will output 1 if either input is 1. It takes two inputs
e.g.
Input A = 0
Input B = 1
Output C = 1
If both inputs = 1, the output is also 1.
If both inputs = 0, the output is 0.
An OR gate looks like a rounded, bloated triangle with two lines going in and one line going out