Resources | Subject Notes | Computer Science
This section covers the fundamental principles of Boolean algebra and their application to the design and analysis of logic circuits. We will explore truth tables, Boolean expressions, and how these are used to construct basic logic gates and combinational circuits like half and full adders.
Boolean algebra is a system of logic that deals with binary values (true or false, represented as 1 or 0). It provides a set of rules for manipulating these values using logical operators.
The basic logical operators are:
Boolean Expressions are formed by combining these operators with binary variables (e.g., A, B, C). These expressions can be simplified using algebraic rules.
Boolean Algebra Laws:
A truth table is a way to represent all possible combinations of input values and their corresponding output values for a logical expression or circuit.
Example: Truth table for $A \lor B$
A | B | A $\lor$ B |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Logic circuits are physical implementations of Boolean functions using logic gates. The most common logic gates are AND, OR, NOT, XOR, and XNOR.
A half adder is a combinational circuit that adds two single-bit binary numbers (A and B) and produces a sum (S) and a carry (C) bit.
Truth Table for a Half Adder:
A | B | Sum (S) | Carry (C) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
Boolean Expression for a Half Adder:
$$ \begin{aligned} S &= A \oplus B \\ C &= A \land B \end{aligned} $$A full adder is a combinational circuit that adds three single-bit binary numbers: two input bits (A and B) and a carry-in bit (Cin). It produces a sum (S) and a carry-out bit (Cout).
Truth Table for a Full Adder:
A | B | Cin | Sum (S) | Cout |
---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 0 |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 1 |
Boolean Expressions for a Full Adder:
$$ \begin{aligned} S &= A \oplus B \oplus Cin \\ Cout &= (A \land B) \lor (A \land Cin) \lor (B \land Cin) \end{aligned} $$