I recall being introduced to Boolean algebra 42 years ago when I was 18. I was an airman in the United States Air Force, stationed at Keesler Air Force Base and studying to become a Radio Relay Equipment Repairman. It was the module on Voice Frequency Carrier Terminals, or VFCTs, that I was first introduced to this area of mathematics that was used extensively in the area of telecommunication electronics that I was studying and worked in solely for 15 years of my life.
Boolean algebra is a branch of algebra in which the variables are truth variables, being true or false, and usually denoted as 1 or 0 respectively. Boolean algebra was invented by George Boole in his first book, entitled “The Mathematical Analysis of Logic”, copyrighted in 1947.
Boolean algebra has been fundamental in the field of digital electronics and is provided for in all modern programming languages. Boolean algebra is also used in the study of sets and statistics.
The screenshot below gives a fairly descriptive symbology of the main components used in Boolean algebra:-
The basic operations of Boolean algebra are composed of the symbololgy of AND, OR, and NOT.
The NOT function is a symbol of a triangle with a dot on the end of it. This dot denotes the fact that the value is reversed. For example, if a 1 is at the input of a NOT gate then it will reverse the value and convert it to a 0.
A NOT gate can appear on the inputs and outputs of the And and OR gates, which serves the purpose of reversing the input or output value, depending on where the dot is placed in the circuit.
If a dot does not appear at the end of the triangle symbol, this means that the circuit is working as an amplifier or buffer. When this occurs, an input of a 1 will result in an output of a 1 as well.
The next circuit used in Boolean algebra is the AND gate. When using an AND gate, all inputs to the gate must be a 1 to give a 1 output, If any of the values are a 0, then the output of the gate will be a 0 too.
If the AND gate has a dot on the output then it becomes a NAND gate, which simply means NOT AND. What this means is that the output of the gate is reversed. For example, If all inputs to the NAN gate are 1, the output will be 0. If any of the inputs are 0 then the output will be one.
While the AND gate and NAND gates require that all input values are of a certain value to give an output, another logic symbol is the OR gate. When an OR gate is used, the means that only one value needs to be present at the input of the circuit to give the same value at the output. For example, If only one input is a value of 1, the resulting output will be a value of 1 as well.
When a OR gate has a dot on the output of the circuit, this indicates that it is a NOR gate, which simply means NOT OR gate. This means that the output of the OR gate is reversed. For example, if only one input of the gate is a 1, the resulting output will be reversed and made a 0.
The last gate that will be discussed in this blog is the XOR gate, which is an abbreviation for EXCLUSIVE OR. The XOR gate will give a 1 output when the number of inputs is odd and a 0 output when the number of inputs is even.
When a dot appears on the output of a XOR gate, it becomes a XNOR gate, which is an abbreviation for EXCLUSIVE NOT OR. The gate will give a 1 output when the inputs are even and a 0 output when the inputs are odd.
The above paragraphs cover a brief summation of the theory of Boolean algebra. It needs to be remembered,however, that there are a variety of circuits that can be used and their values can be changed based solely on the placement of the inverters, or dots, on either the input or output of the circuits.
When I was a Radio Relay Equipment Repairman and then a Wideband Maintenance Technician, I was required to be able to read and troubleshoot very complex schematic diagrams.
The screenshot below is an illustration of a very basic schematic diagram that I would have been required to interpret.
The diagram below is composed of a AND gate on the far left. Both inputs must be a 1 to give a 1 output.
The output of the AND gate is fed to a OR gate, which has another input coming into it. Only one value of 1 is needed to give a 1 output.
The output of the OR gate is fed to another AND gate, which has another input being fed into it. Both inputs are required to be a 1 to give a 1 output.
The circuit below is relatively simple. If any NOT gates had been put on the input or output of the circuitry then the output values would certainly changed:-
Any person who is studying programming needs to be familiar with Boolean algebra because this area of mathematics is catered for in many modern programming languages, such as Python.
In the Python programming language, the preferred language for data scientists, the two Boolean values are represented as being True or False.
Python also utilises a bool() function that evaluates any value and returns either a True or a False.
Python also allows for the use of Boolean logic when implementing conditional statements. An example of an easy piece of code is written below:-
To summarise, Boolean algebra is very much a part of modern life because digital electronics have become such a huge part of our existence.
I have gone back in time to my very humble beginnings when I was studying telecommunications and extracted the lessons that I learned from this science. In addition, I learned a few more concepts, such the XOR gate and XNOR gate, when I was researching the material for this post.
While it is not expected that most people will use Boolean algebra in much of their day to day lives, it is nevertheless useful to understand the mechanisms behind this algebraic science.
It is my view that, as mankind becomes more and more modernised, labour saving devices will make our lives much simpler and take the mental processing that we otherwise would have to undertake ourselves. Nevertheless, it is important to understand the science behind the technology.