logic - Basic Applications of Boolean Gates
Experiments with electronic gates
can be divided into
logic and sequential
logic. The main difference
the first type of
circuit logic doesn’t depend on time or
sequence of movements, and
type of logic does.
A clear example
this difference can be
illustrated by showing the two locks
lock on the left has four discs that can be rotated separately. When
notches are aligned, the metal hook is released. The only one condition
that the appropriate four notches are aligned, no matter if the left
disc is set
before the one on the right. The lock will open if you have the
contrary, the lock on the right has only one knob, and the combination
3cw – 52ccw – 20cw. This means that one must first get to number 3
clockwise, then to 52 counterclockwise, and finally get to number 20
If you use the same numbers in different order, the lock won’t open.
This is a sequential
lock, a correct sequence is important.
its stability, reliability, low maintenance and ease at reading digital
displays, these days everything is going the digital way.
circuits can be simulated with the so called boolean or logic gates.
This is kind of Digital
say that we’d like to find out the behavior of the following
create an m-file to effortlessly solve the logic circuit, like this:
function f =
x(1) = A
x(2) = B
x(3) = C
Symbol ~ is used for NOT gates
We have 4 logic-AND gates
~x(1) & ~x(2) & ~x(3);
~x(1) & x(2) & ~x(3);
~x(1) & ~x(2) & x(3);
~x(1) & x(2) & x(3);
We have 1 logic-OR gate
f = and1
| and2 | and3 | and4;
test our function for this specific example of combinational logic:
These are all the possible combinations for 3 inputs
M = [ 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1];
We give all the combinations, one at a time
for i = 1 :
We display the results
you make some analysis using the DeMorgan laws, you can
that this function can also be simplified to F = not(A), and you can
visualize it from the results...
means that we have not only a MATrix LABoratory, but we've
got also a
From 'Combinational Logic'
'Combinational Logic' to 'Boolean Algebra'