Computer System:Boolean Expression
Logical Operators
• AND (.)
• OR (+)
• NOT (~, !, ¯ )
Example of Boolean Expression
1.A AND B OR C
A.B+C
2.A AND B NOT C
(A.B)~C
3.NOT ((A AND B) OR C)
~[(A.B)+C]
Logical Operator : AND (.)
Example :
Given A=1, B=1, C=0
Write a value for the expression.
TRUTH TABLE (A.B)
= 1.1
= 1
Hence, A.B = 1
b) A.C TRUTH TABLE (A.C)
= 1.0
= 0
Hence, A.C = 0
Logical Operator : OR (+)
Example :
Given A=1, B=1, C=0
Write a value for expression
a) A + B TRUTH TABLE (A + B)
= 1 + 1
= 1
Hence, A + B = 1
Logical Operator : NOT(~, !, ¯ )
Example :
Given A=1, B=1
Write a value for the expression.
a) !A TRUTH TABLE (!A)
= 0
Hence, !A = 0
b) !(A + B) TRUTH TABLE !(A + B)
= 0
Hence, !(A+B) = 0
No comments:
Post a Comment