Explain the Logical Operators and Truth Table.
Advertisements
प्रश्न
Explain the Logical Operators and Truth Table.
स्पष्ट करा
Advertisements
उत्तर
Logical operators are used to combine two or more conditions or expressions and produce a Boolean result, either True (1) or False (0).
The three basic logical operators are:
- AND Operator: Returns True only when both conditions are True.
- OR Operator: Returns True when at least one condition is True.
- NOT Operator: Reverses the logical value. It converts True into False and False into True.
Truth Table
A Truth Table is a table that shows all possible combinations of input values and their corresponding output values for a logical operation.
1. AND Operator
|
A |
B |
A AND B |
|---|---|---|
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
2. OR Operator
|
A |
B |
A OR B |
|---|---|---|
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
1 |
3. NOT Operator
| A | NOT A |
| 0 | 1 |
| 1 | 0 |
Interactive Truth Table
Change the inputs and select an operator to see how its output changes.

shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
