Resources | Subject Notes | Computer Science
Boolean logic is the foundation of digital circuits. It deals with logical operations that can have only two possible outcomes: true (1) or false (0). These outcomes are represented by Boolean values.
There are three basic Boolean operators:
A truth table shows all possible input combinations and their corresponding output for a Boolean expression.
Input A | Input B | Output (A AND B) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Input A | Input B | Output (A OR B) |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Input | Output (NOT Input) |
---|---|
0 | 1 |
1 | 0 |
Logic gates are electronic circuits that implement Boolean logic operations.
An AND gate has two or more inputs and one output. The output is high (1) only if all inputs are high (1).
An OR gate has two or more inputs and one output. The output is high (1) if at least one input is high (1).
A NOT gate has one input and one output. The output is the inverse of the input. If the input is high (1), the output is low (0), and vice versa.
Logic circuits are constructed by combining logic gates. A problem statement, logic expression, or truth table can be used to design a logic circuit.
Consider the Boolean expression: $Y = (A \text{ AND } B) \text{ OR } C$
This expression can be implemented using logic gates as follows:
You should practice designing logic circuits from problem statements, logic expressions, and truth tables to master the concept of Boolean logic.