Binary logic has two binary operators denoted by `+` and `-` Operators.
The basic logic operations are AND, OR and NOT. Boolean expression consists of logic operators and logic variables for example x + xy is a Boolean expression with `2` logic variables x and y and with one Boolean operator `+`.
The operator precedence for evaluating Boolean expression is
- parentheses
- NOT
- AND
- OR.
Truth table for AND operation
A
|
B
|
Y
|
0
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
Let A and B be the two Boolean variables, performing an AND operation on these variables leads to a result Y.
AND operation results in True or 1 when the input variables are true or 1 otherwise false or 0. AND operation is referred to as logical multiplication. Because it leads to a product of variables, the dot symbol is used to represent AND operation. i.e A.B
Truth table for OR operation.
A
|
B
|
Y
|
0
|
0
|
0
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
The symbol for OR operation is `+`. It is also referred to as logical sum. This operation is sometimes called as inclusive – OR.
When any one of the variable is true the OR operation results in true.
Truth table for NOT operation
A
|
Y
|
0
|
1
|
1
|
0
|
It is denoted by A1 or Ā this is similar to the complement operation.
Dual and complement Boolean expression: The term literal refers to both the variables and their complements.
The complement of a logical expression is obtained by
- Changing all `•` to `+`
- Changing all `+` to `•`
- Changing all 1` to 0`
- Changing all 0` to 1` and
- Complementing each literal.
For example: Obtain the complement of 1.A + BC + 0
complement is (0 + A) (B + C).1
The dual of a Boolean expression is obtained by
- Changing all `•` to `+`
- Changing all `+` to `•`
- Changing all 1` to 0`
- Changing all 0` to 1` and
- But not complementing any literal.
Example
Que. Obtain the dual of 1.A + BC + 0
Ans. (0 + A) (B+ C) 1 is the dual of the given boolean expression.
Special forms of boolean expressions
There are 4 forms of boolean expressions.
- Sum of products
- Product of sums
- Canonical sum of products
- Canonical product of sums
0 comments:
Post a Comment