Professional Documents
Culture Documents
P2_Unit 10 logic circuits
P2_Unit 10 logic circuits
Boolean Logic
Boolean logic
Unit 10 Advanced programming and databases
A B P
INPUT
A 0 0 0
OUTPUT
P 0 1 0
INPUT
B 1 0 0
A B P
INPUT
A 0 0 0
OUTPUT
P 0 1 1
INPUT
B 1 0 1
Logic statement: P = A OR B 1 1 1
A P
INPUT OUTPUT
0 1
A P
1 0
• An Exclusive OR gate (XOR) will only be true if one of the inputs is true
• It will be false if both inputs are true, hence it’s exclusive
INPUT
A R OUTPUT
P
INPUT
B
A B R = A AND B P = NOT R
0 0
Logic statement:
0 1
P= NOT R
1 0 P=NOT ( A AND B)
1 1
Boolean logic
Unit 10 Advanced programming and databases
Q= C OR D
Q= ( A AND B) OR ( NOT B)
A B C = A AND B D = NOT B Q = C OR D
0 0
0 1
1 0
1 1
Boolean logic
Unit 10 Advanced programming and databases
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
Logic statement
X = D OR E 1 0 1
X= ( A AND B) OR ( B OR C) 1 1 0
1 1 1
Boolean logic
Unit 10 Advanced programming and databases
Boolean logic
Unit 10 Advanced programming and databases
AND OR =
Sensor detects
Movement (S)
S N B R = S AND N P = R OR B
0 0 0 0 0
0 0 1 0 1
0 1 0 0 0 Logic statement:
0 1 1 0 1 P= R OR B
P = (S AND N) OR B
1 0 0 0 0
1 0 1 0 1
1 1 0 1 1
1 1 1 1 1
Boolean logic
Unit 10 Advanced programming and databases
Problem Statement
Boolean logic
Unit 10 Advanced programming and databases
Truth Table
Boolean logic
Unit 10 Advanced programming and databases
Not A and B ( is the logic statement for the above truth table )
Steps to how to write the logic statement and draw the logic circuit from the truth table
1. First identify the rows where outcome is 1, in the above truth table only 2 nd row outcome/x is 1
2. The write the expression for this Row. In second ROW , A off and B is on and when A is off and B is on
the output is one so Boolean expression is NOT A AND B
3. After this draw the logic circuit for this statement
Boolean logic
Unit 10 Advanced programming and databases