Boolean Algebra
Boolean Algebra
The section of abstract mathematics concerning two values: true and false.
History
History
introduced Boolean algebra in 1847 as part of his book, . The approach was then fine-tuned by , , and in the late 19th century. The system was applied to circuitry in the 1930’s when , a Mathematician and Electronics Engineer, made the realization that Boolean algebra could be used as tool to analyze logic gates. Any system using sentential logic will also have a way of representation in Boolean Algebra.
◼
It’s simpler and neater to just add hyperlinks directly using Insert > Hyperlink
George Boole introduced Boolean algebra in 1847 as part of his book, The Mathematical Analysis of Logic. The approach was then fine-tuned by William Stanley Jevons and Ernst Schröder in the late 19th century. The system was applied to circuitry in the 1930’s when Claude Shannon, a Mathematician and Electronics Engineer, made the realization that Boolean algebra could be used as tool to analyze logic gates. Any system using sentential logic will also have a way of representation in Boolean Algebra.
Rules of Boolean Algebra
Rules of Boolean Algebra
There are 13 Basic laws of Boolean algebra.
These concepts can be easily be represented using Mathematica’s built-in functions.
◼
Rule 1: A || 1 == 1
In[12]:=
True||1//Boole
Out[12]=
1
◼
Shouldn’t this rule be input as follows (parentheses are required because of operator precedence)?
In[10]:=
(||True)True
Out[10]=
True
◼
In StandardForm you can write this as (using to generate the ∨ operator)
or
In[23]:=
(∨True)True
Out[23]=
True
◼
I’ve used () instead of as using capital letters (such as , , ) can cause problems (reserved words in the system)
scA
A
C
D
K
◼
Alternatively, use TraditionalForm (Cell > Convert To > TraditionalForm)
In[24]:=
(∨True)True
Out[24]=
True
In[10]:=
False||1
In[20]:=
1||1//FullSimplify//Boole
Out[20]=
1
In[21]:=
0||1//FullSimplify//Boole
Out[21]=
1
◼
Rule 2: A || 0 == A
In[18]:=
1||0//FullSimplify//Boole
Out[18]=
1
◼
Here’s another way to write Rule 2
In[16]:=
(∨False)
Out[16]=
True
In[19]:=
0||0//FullSimplify//Boole
Out[19]=
0
◼
Rule 3: A && 1 == A
In[25]:=
1&&1//FullSimplify//Boole
Out[25]=
1
In[26]:=
0&&1//FullSimplify//Boole
Out[26]=
0
◼
Rule 4: A && 0 == 0
In[27]:=
1&&0//FullSimplify//Boole
Out[27]=
0
In[28]:=
0&&0//FullSimplify//Boole
Out[28]=
0
◼
Rule 5: A || A = A
In[29]:=
1||1//FullSimplify//Boole
Out[29]=
1
In[30]:=
0||0//FullSimplify//Boole
Out[30]=
0
◼
Rule 6: A && A = A
In[31]:=
1&&1//FullSimplify//Boole
Out[31]=
1
In[32]:=
0&&0//FullSimplify//Boole
Out[32]=
0
◼
Rule 7: !(!A) = A
In[33]:=
!(!A)
Out[33]=
A
In[1]:=
(¬(¬a))a
Out[1]=
True
◼
Rule 8: A || !A = 1
In[2]:=
1||!1//FullSimplify//Boole
Out[2]=
1
◼
Boole is not required here
In[22]:=
1||!1//FullSimplify
Out[22]=
True
◼
An alternative:
In[19]:=
(∧¬)False//FullSimplify
Out[19]=
True
◼
Rule 9: A && !A = 0
In[6]:=
1&&!1//FullSimplify//Boole
Out[6]=
0
In[7]:=
0&&!0//FullSimplify//Boole
Out[7]=
0
◼
Rule 10: A || B == B || A
In[10]:=
A||BB||A
Out[10]=
True
◼
Rule 11: A && B == B && A
In[18]:=
(A&&B)(B&&A)//FullSimplify
Out[18]=
(A&&B)(B&&A)
◼
Rule 12:-(A||B) = !A && !B
In[21]:=
(A⊽B)(!A&&!B)
Out[21]=
(A⊽B)(!A&&!B)
Applications
Applications
Proficiency in Boolean Algebra is a required skill for all Electrical Engineering. As Shannon observed, any piece of circuitry can be described in terms of Boolean algebra. An example of a use-case will be shown below.
◼
Typically, the problem or device that is to be solved will be put into a logical project description. From this, an engineer would then create a logical description of the problem. An example of this is shown below.
(!A&&!B&&!C&&!D)||(!A&&!B&&!C&&D)||(A&&B&&C&&D)||(A&&B&&C&&!D)
◼
Replacing by and converting this inert expression to TraditionalForm and then converting the Cell to an equation using Format > Style > DisplayFormula:
{A,B,C,D}
{,ℬ,,}
In[26]:=
(¬∧¬ℬ∧¬∧¬)∨(¬∧¬ℬ∧¬∧)∨(∧ℬ∧∧)∨(∧ℬ∧∧¬)
Equations like these are unique for every problem presented to the engineer, along with their method of approach.
◼
Using the rules of Boolean Algebra, BooleanConvert simplifies the expressing above:
In[24]:=
BooleanConvert[(!A&&!B&&!C&&!D)||(!A&&!B&&!C&&D)||(A&&B&&C&&D)||(A&&B&&C&&!D)]
BooleanConvert can also convert the expression into different forms.
◼
BooleanConvert converts above expression to all NAND, AND/NOT, and OR/NOT:
Once the equation is in it’s simplest form, the engineer can then determine which logic gates are required and how to link them correctly.
◼
Using * as AND gates and + as OR gates, the diagram for the above equation is shown below:
This is the basic process of breaking down a complex issue into it’s simple logic using Boolean algebra.
Further Explorations
Circuit Analysis
Karnaugh Map
Logic
Authorship information
Patrick Griffin
Friday, June 23, 2017
pgrfn5@gmail.com