Boolean Algebra Operations

Boolean operations are mathematical functions that process one or more Boolean variables following the principles of Boolean algebra.

Widely utilized in fields such as computer science and digital electronics, these operations are essential for designing and analyzing logic circuits, software programs, and algorithms.

Below is an overview of the primary Boolean operations:

  • AND (Conjunction)
    This operation returns true only if every operand is true. For example, \( A \wedge B \) yields true if both A and B are true. $$ \begin{array}{cc|c}
    A & B & A \land B \\
    \hline
    0 & 0 & 0 \\
    0 & 1 & 0 \\
    1 & 0 & 0 \\
    1 & 1 & 1 \\
    \end{array} $$

    Example: If $A = 1$ and $B = 1$, the outcome is $1$ (true) because both inputs are true. For instance, a security system may require two correct access keys (A and B) to unlock a door.

  • OR (Disjunction)
    Returns true if at least one operand is true. \( A \vee B \) is true if A, B, or both are true. $$
    \begin{array}{cc|c}
    A & B & A \lor B \\
    \hline
    0 & 0 & 0 \\
    0 & 1 & 1 \\
    1 & 0 & 1 \\
    1 & 1 & 1 \\
    \end{array} $$

    Example: If $A = 0$ and $B = 1$, the result is \(1\) (true) because at least one of the inputs is true. For example, an alarm system activates if motion (A) is detected or a window sensor (B) is triggered.

  • NOT (Negation)
    Inverts the value of its operand. If \( A \) is true, \( \neg A \) (not A) is false, and vice versa. $$
    \begin{array}{c|c}
    \text{A} & \neg A \\
    \hline
    1 & 0 \\
    0 & 1 \\
    \end{array} $$

    Example: If $A = 0$, the result is \(1\) (true), as the negation flips the value of a false input. For instance, a LED indicator lights up (true) when the television is turned off (false).

  • NAND (Not AND)
    True if at least one operand is false, NAND is the logical inverse of AND. \( A \text{ NAND } B \) is false only if both A and B are true. This equates to the Boolean expression $ \neg ( A \wedge B ) $ $$ \begin{array}{cc|c}
    A & B & \neg ( A \wedge B ) \\
    \hline
    0 & 0 & 1 \\
    0 & 1 & 1 \\
    1 & 0 & 1 \\
    1 & 1 & 0 \\
    \end{array} $$

    Example: If $A = 1$ and $B = 1$, the result is \(0\) (false) since both inputs are true, and NAND reverses AND's output. For instance, a security circuit disables a mechanism when both safety conditions (A and B) are not met.

  • NOR (Not OR)
    Produces a true result only when all operands are false, acting as the opposite of OR. \( A \text{ NOR } B \) is true solely if both A and B are false. This corresponds to the Boolean expression $ \neg ( A \lor B ) $ $$ \begin{array}{cc|c}
    A & B & \neg ( A \lor B ) \\
    \hline
    0 & 0 & 1 \\
    0 & 1 & 0 \\
    1 & 0 & 0 \\
    1 & 1 & 0 \\
    \end{array} $$

    Example: If $A = 0$ and $B = 0$, the result is \(1\) (true) since neither input is true, and NOR reverses the outcome of OR. For instance, a toll system locks the barrier if there are no vehicles or if two vehicles try to pass simultaneously (neither A nor B).

  • XOR (Exclusive OR)
    True if the operands are of opposite values. \( A \text{ XOR } B \) yields true if A is true and B is false, or vice versa. The symbol typically used for XOR is \( \oplus \). $$ \begin{array}{cc|c}
    A & B & A \oplus B \\
    \hline
    0 & 0 & 0 \\
    0 & 1 & 1 \\
    1 & 0 & 1 \\
    1 & 1 & 0 \\
    \end{array} $$

    Example: If $A = 0$ and $B = 1$, the result is \(1\) (true) as the inputs differ. For example, a control circuit might activate a function only when one of two conditions is met, not both, similar to a switch that turns a device on with one button and off with another.

  • XNOR (Not XOR)
    Returns true (1) when the operands have identical values, and false (0) otherwise. It stands as the reverse of XOR. \( A \text{ XNOR } B \) is true if both operands are either true or false. This is identical to the Boolean expression $ \neg ( A \oplus B ) $ $$ \begin{array}{cc|c}
    A & B & \neg ( A \oplus B ) \\
    \hline
    0 & 0 & 1 \\
    0 & 1 & 0 \\
    1 & 0 & 0 \\
    1 & 1 & 1 \\
    \end{array} $$

    Example: If $A = 0$ and $B = 0$, the result is \(1\) (true) as the inputs are identical, and XNOR reverses the outcome of XOR. For example, a consistency check system confirms an event only when two corresponding inputs verify the same condition.




Report a mistake or post a question




FacebookTwitterLinkedinLinkedin