Switching Theory allows us to understand the operation and relationship between Boolean Algebra and two-level logic functions with regards to Digital Logic Gates. Switching theory can be used to further develop the theoretical knowledge and concepts of digital circuits when viewed as an interconnection of input elements producing an output state or condition.
Digital logic gates whose inputs and output can switch between two distinct logical values of 0 and 1, can be defined mathematically simply by using Boolean Algebra. But we can also represent the two digital logic states of HIGH or LOW, “1” or “0”, “ON” or “OFF”, and TRUE or FALSE, using electromechanical contacts in the form of switches or relays as a logic circuit element. The implementation of switching functions in digital logic circuits is nothing new, but it can give us a better understanding of how a single digital logic gate works.
Digital logic gates are the basic building blocks from which all digital electronic circuits and microprocessor based systems are made. They can be interconnected together to form either combinational logic circuits which are fully dependent on any external input signals applied to it, or sequential logic circuits which are dependent on its present stable state, feedback of its output, as well as any external input signals that may trigger a switching event.
The Switching Theory of a Switch
You may think that a switch is, well a switch, that can be used to turn a lighting load “ON” or “OFF”. But a switch can also be a complex mechanical or electromechanical element used to control the flow of a signal through it in either direction, making it a bilateral device. Consider the circuit shown.
The Switching Theory of a Normally-open Switch
Here in this simple example, the lamp (L) is connected to the battery supply, VS via the normally-open switch, S1. If switch S1 is not-pressed and therefore open, no current (I) flows so the lamp will be “OFF” and not illuminated. If switch S1 is pressed closing it, then current flows around the circuit and the lamp (L) will be “ON” and illuminated. Under normal steady state conditions the switch is permanently “open” so the lamp is “OFF”.
We can use switching algebra to describe the operation of the circuit containing the switch, S1. For example, if we label the normally-open switch as a variable with the letter “A“, then when the switch is open, that is “A” is not-pressed, we can define the value of “A” as being “0”. Likewise, when the switch is closed, that is “A” is pressed, we can define the value of “A” as being “1”. This switching algebra theory is true for ALL normally-open switch configurations.
Switching Truth Table
We can develope this switching theory idea further by saying when the lamp is “ON” (illuminated), its switching alegebra variable will be “1”, and when the lamp is “OFF” (not illuminated), its switching algebra variable will be “0”. Thus, when the switch is pressed (activated) the lamp is “ON”, so “A” = 1 and “L” = 1, and when the switch is not-pressed (unactivated) the lamp is “OFF”, so “A” = 0 and “L” = 0. Therefore we can correctly say that for the switching theory of the lamp, L = A as shown in the truth table.
The type of switch used in the above example is called a normally-open, make-contact switch as the have to physically make it for the switch to be considered closed (A = 1). But there is another type of switch arrangement which is the exact opposite in operation of the switch above called a normally-closed, break-contact switch which is constantly closed.
The Switching Theory of Series Switches
We have seen that the lamp (L) circuit above can be controlled using a single switch, S1 and when S1 is closed (pressed) current flows around the circuit and the lamp is “ON”. But what if we added a second switch in series with S1, how would that affect the switching function of the circuit and the illumination of the lamp.
The Switching Theory of Series Switches
The switching circuit consists of two switches in series with a voltage source, VS and the lamp. To distinquish the operation of each individual switch, we shall label switch, S1 with the letter “A“, and label switch, S2 with the letter “B“. Thus when either switch is open, that is not-pressed, we can define the value of “A” as being “0” and “B” as also being “0”. Likewise, when either switch is closed or pressed, we can define the value of “A” as being “1” or “B” as being “1”. That is the logical level “1” corresponds to the supply voltage value, and will be positive. Whereas the logic level “0” corresponds to the voltage value of zero voltage, or ground.
As there are two switches, S1 and S2, or “A” and “B”, then we can see that there are four possible combinations of the Boolean variables “A” and “B” to illuminate the lamp. For example, “A” is open and “B” is closed, or “A” is closed and “B” is open, or both “A” and “B” are open or closed at the same time. Then we can define these operations in the following switching theory truth table.
Series Switch Truth Table
The truth table shows that the lamp will only be “ON” and illuminated when BOTH switch, A AND switch, B are pressed and closed as pressing only one switch on its own will not cause current to flow. This proves that when two switches S1 and S2 are connected in series, the only condition that will allow current (I) to flow and make the lamp illuminate is when both switches are closed giving the boolean expression of: L = A and B.
In Boolean Algebra terms, this expression is that of the AND function which is denoted by a single dot or full stop symbol, (.) between the variables giving us the Boolean expression of: L = A.B.
Thus when switches are connected together in series their switching theory and operation is the same as for the digital logic “AND” gate because if both inputs are “1”, then the output is “1”, otherwise the output is “0” as shown.
Digital Logic AND Gate
Thus if input “A” is AND’ed with input “B” it produces output “Q”. In switching terms, the AND function is referred to as the Boolean Algebra multiplication function.
The Switching Theory of Parallel Switches
If we now connect switches, S1 and S2 together in parallel as shown, how would is arrangement affect the switching function of the circuit and the illumination of the lamp.
The Switching Theory of Parallel Switches
The switching circuit now consists of the two switches in parallel with the voltage source, VS and the lamp. As before, when either switch is open, that is not-pressed, we can define the value of “A” as being “0” and “B” as also being “0”. Likewise, when either switch is closed or pressed, we can define the value of “A” as being “1” or “B” as being “1”.
As before, with two switches, S1 and S2, or “A” and “B”, there are four possible combinations of the Boolean variables “A” and “B” required to illuminate the lamp. The corresponding states are: “A” is open and “B” is closed, or “A” is closed and “B” is open, both “A” and “B” are open, or both closed at the same time. Then we can define these switching operations in the following switching theory truth table.
Parallel Switch Truth Table
The truth table shows that the lamp will only be “ON” and illuminated when EITHER switch, A OR switch, B are pressed and closed as pressing either switch will cause current to flow because there will always be a conducting path available for the lamp through whichever closed switch.
This therefore proves that when two switches S1 and S2 are connected together in parallel, the switching condition that allows current (I) to flow and make the lamp illuminate is when any one of the switches, or both are closed. This gives the boolean expression of: L = A or B.
In Boolean Algebra terms, this expression is that of the OR function which is denoted by a addition or plus sign, (+) between the variables giving us the Boolean expression of: L = A+B.
Thus when switches are connected together in parallel their switching theory and operation is the same as for the digital logic “OR” gate because if both inputs are “0”, then the output is “0”, otherwise the output is “1” as shown.
Digital Logic OR Gate
Thus if input “A” is OR’ed with input “B” it produces output “Q”, and in switching terms, the OR function is referred to as the Boolean Algebra logical addition function.
Switching Theory of a Boolean Function
Switching Theory can be used to implement Boolean expressions as well as digital logic gates. Ad we have seen above, in switch contact terms, the boolean expression using a dot (.) is interpreted as a series connection for Boolean multiplication, while a plus sign (+) is interpreted as a pair of parallel branches for Boolean addition.
Switching Theory Example No1
Implement the following Boolean function of Q = A(B+C) using switches to illuminate a lamp (or LED). Also show the equivalent digital logic circuit.
Logic Gate Implementation
Indempotent Law of Switches
Thus far we have seen how to connect two switches together either in series or parallel to illuminate a lamp. But what if the two switches representing a Boolean AND function or an OR function (operations of multiplication and sum) are of the same single Boolean variable, A. In Boolean Algebra there are various laws and theroems which can be used to define the mathematics of logic circuits. One such theorem is known by the name of indempotent law.
Idempotent laws used in switching theory states that AND-ing or OR-ing a variable with itself will produce the original variable. For example variable “A” AND’ed with “A” will give “A”, likewise variable “A” OR’ed with “A” will give “A”, allowing us to simplify our switching circuits and we can demonstrate this below.
Indempotent Law of AND Function
Indempotent Law of OR Function
We have seen here in this tutorial that switching theory techniques can be used to realise Boolean expressions and digital logic gate circuits using simple “ON/OFF” switches. The representation of “AND” and “OR” functions using normally-open switches are easy to construct, easy to understand, and form the basic building blocks for most combinational logic circuits. Thus given any Boolean expression or logic function, it is possible to use switching theory to implement it, after all, logic design is about using switches or electromechanical devices such as relays.