90 likes | 324 Views
Logic Gates and Boolean Algebra. Logic Gates and Boolean Algebra. Boolean Variable: May have two possible values, e.g. True or False. Truth Table: A table that shows the result of applying the logical function to all possible combinations of inputs.
E N D
Logic Gates and Boolean Algebra • Boolean Variable: May have two possible values, e.g. True or False. • Truth Table: A table that shows the result of applying the logical function to all possible combinations of inputs. • Boolean Equation: An equation that expresses a Boolean output Q in terms of Boolean inputs, X, Y, Z, etc., to which one or more Boolean functions, such as OR, AND and NOT are applied. • Logic Gate: An electronic circuit that performs a Boolean function. • De Morgan's Laws: and .
Simple Logic Gate Functions • OR Function: The output is true if either or both inputs are true. • AND Function: The output is true if all inputs are true. • NOT Function: The output is the inverse of the input. • XOR Function: The output is true if either input is true but not if both inputs are true. • NAND Function: The output is true if any input is false. • NOR Function: The output is true only when all inputs are false.
OR Function • If both gates are open the output is false • whereas for example if Input A is open and Input B is closed the value of the output is still true. • You can alsorepresentthis the us of a Boolean Equation. • Input A(closed) + Input B(closed) Then Output = On • You can also draw a truth table another way of representing it.
AND Function • The AND function only has a true output if all of the needed situations are met. • For example in a fridge the lamp only turns onif the energy supply = true AND door open = true, only then will the light turn on . • But on the other hand it wouldn’t work if Energy supply = True And Door is open = False : in this case the light wouldn’t turn on because the conditions for the lamp to turn on have not been met • Referring to the picture at the top of the Boolean equation for this is: A.B=Q • A is the gate( informs whether it True or False) in this case open or close • The (dot) represents the And Sign • B is the gate ( informs whether it True or False) in this case Q would be true (light on) if A and B are true else it will be false. • You can also draw a truth table for the and function:
NOT Function • The not function causes the output (Q) to be opposite to what the input would be. • For example if A is closed then it would cause Q to be open. • It’s Boolean algebra equation is: Q = NOT X or Q = X • It can also be written in a truth table. .
NAND Function A B Q • This Function is a simply a combination of the NOT and an AND functions. • When Writing it in Boolean algebra, we write it as A.B with a bar on top to show that both the inputs have been noted. • A NAND function has a circle at the end of the tip to show that it is a NAND function.
NOR Function • NOR function is a combination of NOT and OR functions. • In Boolean algebra it is Written - A+B with a bar on top to show that the entire Equation has been noted. • A NOR symbol also has a circle at the end to show that it is NOR symbol
De Morgan’s Laws • De Morgan’s laws enable Boolean expressions to be converted to forms requiring only OR and NOT functions or only AND and NOT functions.