Logic gates : are very small electronic decision- making hardware devices that are fed one or more inputs and give back one output.
There are three basic logic :
o The NOT gate
o The AND gate
o The OR gate
Thruth table : is used to define the output of a logic gate or a logic circuit for all possible combinations of input.
Boolean expressions
A NOT gate with INPUT X and OUTPUT Z : Z= NOT X ; Z= X
The OR gate with INPUT X & Y and OUTPUT Z : Z= X OR Y ; Z= X +Y
An AND gate with INPUT X & Y and OUTPUT Z : Z = X and Y ; Z= X . Y
NOTE : the combinations relay on the inputs eg. 2 inputs -> 4 combinations
Building the truth table for logic circuit
First, you need to ask these two questions :
o How many inputs does the circuit have?
o Hence how many input combinations of the circuit are ?.
example :
|
A B
|
C
|
D
|
|
0 0
|
1
|
0
|
|
0 1
|
1
|
1
|
|
1 0
|
0
|
0
|
|
1 1
|
0
|
0
|