Boolean Algebra: Foundations & Applications
Abstract
Boolean algebra underpins digital computing and programming through logical operations. This page outlines its historical evolution, laws, applications, and demonstrates its implementation using R.
Key Concepts
- AND (∧): Returns 1 if both inputs are 1
- OR (∨): Returns 1 if at least one input is 1
- NOT (¬): Inverts the input
R Code Demonstration
This code validates De Morgan's First Law using truth tables in R:
A <- c(0, 0, 1, 1)
B <- c(0, 1, 0, 1)
lhs <- ! (A & B)
rhs <- (!A) | (!B)
truth_table <- data.frame(A = A, B = B, `NOT(A AND B)` = lhs, `NOT A OR NOT B` = rhs)
print(truth_table)
cat("De Morgan's First Law holds:", all(lhs == rhs), "\n")
References
- Boole, G. (1847). The Mathematical Analysis of Logic. Macmillan.
- Boole, G. (1854). An Investigation of the Laws of Thought. Walton and Maberly.
- Hehner, E. (2012). “From Boolean algebra to unified algebra”. The Mathematical Intelligencer, 34(2), 3–11.
- Shannon, C. (1937). “A symbolic analysis of relay and switching circuits”. Transactions of the AIEE, 57(12), 713–723.
No comments:
Post a Comment