In this part of the tutorial, and as part of the plan for these tuts, I will be diving into the world of logic circuitry: the real world implementation of boolean algebra, who would have thought that math would actually have a real usage?
Logic gates
As we've seen that in boolean algebra there are three main operations: AND, OR, NOT.
For each of these there is a piece of basic circuitry that implements them on the hardware level, called Logic gates, that have the same name.
When it comes to boolean algebra, a circuit, a function or minterms are all the same, and given one of them, you can easily get the other two. So we're going to analyze circuits to be able to turn them into functions, and functions to be able to turn them into circuits, we'll do the latter first.
AND Logic Gate

Y = A AND B -> A*B -> AB
OR Logic Gate

Y = A OR B -> A+B
NOT Logic Gate

Y = NOT A -> A'
A Variable
In my circuits, variables will look like this:
1's and 0's
In some cases (specialy with multiplexors and decoders, we'll see them later) there is a need to have a constant value: 0 or 1.
I'll represent 0 as Ground and 1 as a voltage source, like in this picture:
Function -> Circuit
Let's see some examples of a function implemented using Logic Gates.
We're gonna start with a very basic function: AC+BD
This function has 4 distinct variables, so that's what we make first: Next thing I see is that there are two AND's, one between A and C, and the other between B and D, so that's what I write: I connect the ANDs to the variables as needed, I need to connect A and C to the same AND, and B and D to the other AND: Lastly, we know there is an OR between the two ANDs:
AC+BD -> (A AND C) OR (B AND D)
So we write an OR, and we conect the two ANDs to it:
Circuit -> Function
Lets try to convert the following circuit into a boolean function: Lets go step by step.
- The first thing I notice is that the circuit has an OR in its top level with three inputs, so it will look like this:
(something) OR (something) OR (something), or rather:
Code: Select all
(something) + (something) + (something)function will look like:
Code: Select all
(something AND something) + (something AND something) + (something AND something)Code: Select all
(something * something) + (something * something) + (something * something)--- In the first AND I can clearly see A connected to it on the first input, on the second input if I follow the connection line
I can see that B is connected to it, the resulting function is:
Code: Select all
(A*B)+(something*something)+(something*something)Code: Select all
(A*B)+(B*D)+(something*something)clearly comes from C, the resulting function is:
Code: Select all
(A*B)+(B*D)+(D*C)Code: Select all
AB+BD+DCFor practicing, try turning these circuits into functions:
Previous: viewtopic.php?f=37&t=33704
Next: viewtopic.php?f=37&t=33895
Advertising

