布尔表达式和正则表达式
Example 1: Simplify the given Boolean Expression to minimum no. of variables or literals.
示例1:将给定的布尔表达式简化为最小编号。 变量或文字。
(A+B). (A+B)
(A + B)。 (A + B )
ABC + AB + ABC
ABC + A B + AB C
Answer:
回答:
1) (A+B). (A+B)
1)(A + B)。 (A + B )
= A.A + A. B + B.A + B.B
= A + A. B + B.A + 0
= A (1 + B + B) = A
2) ABC + AB + ABC
2)ABC + A B + AB C
= ABC + ABC + AB
= AB (C + C) + AB
= AB + AB
= B (A + A) = B. 1 = B
Example 2: Prove that: (A + C) (A.B +C) = 0
示例2:证明:( A + C)( A .B + C )= 0
Solution:
解:
LHS = A.(A + C) (A.B + C)
= (A. A + AC) (A.B + C)
= AC (A.B + C) [Since, A.A = 0]
= AC. A.B + AC. C
= 0 = RHS [Since, A. A = 0 and C. C = 0]
Hence, our result is proved.
Example 3: Reduce the expression (B +BC) (B + BC) (B + D)
示例3:减少表达式(B + BC)(B + B C)(B + D)
Solution:
解:
= (B +BC) (B + BC) (B + D)
= (BB +BBC) (B + D)
= (B +0) (B +D) [Since, B.B =0]
= BB +BD [Since, B.B =1]
= B + BD
= B (1+D) =B [Since, 1+D =1].
Example 4: Reduce the expression

示例4:简化表达式
Solution:
解:

= A.BC. (AB +ABC) [De-Morgan's Law]
= A.BC (AB+ABC)
= A.BC. AB + A.BC. ABC
= A.A.B.B.C + A.A.B.B.C.C [Manipulation]
= 0 + 0 = 0
Example 4: Prove the Associative Law for XOR operation.
示例4:证明XOR运算的关联律。
Solution:
解:
We know that XOR operation is given as: A⊕B = AB + AB
我们知道XOR运算为: A⊕B = A B + A B
To prove associativity for XOR operation we are required to prove:
为了证明XOR运算的关联性,我们需要证明:
(A⊕B) ⊕C =A⊕(B⊕C). Therefore,
( A⊕B ) ⊕C = A⊕ ( B⊕C )。 因此,


From equation 1 and 2 we can see LHS = RHS, thus associative law holds true for XOR operation.
从等式1和2可以看出LHS = RHS ,因此对于XOR运算 ,关联律成立。
翻译自: https://www.includehelp.com/basics/solved-examples-on-reduction-of-boolean-expression.aspx
布尔表达式和正则表达式