Make your own free website on Tripod.com
 Search: Lycos Tripod      King Kong
share this page Share This Page  report abuse Report Abuse  build a page Edit your Site  show site directory Browse Sites  hosted by tripod
    Previous | Top 100 | Next hosted by tripod

Chapter 5 - Notation

This lesson was a lot easier for me to write than the previous ones. Want to know why? Well, I didn't have to draw quite as many diagrams as before! The whole idea of this lesson is to show you a way of writing the circuits that we have seen up to now in the form of an algebra - something that looks rather like mathematics. In fact, it has quite a lot in common with ordinary mathematics, as you will find out!

The notation itself

We represent the AND operation using a dot . and the OR operation using a + so that A.B represents A "ANDed" with B and A + B represents A "ORed" with B:

A.B
A + B

The other symbol is for NOT. In this case, we put a line above the letter or expression as follows:

_
A
_____
A + B

That's a little difficult to do on a typewriter or computer (I should know!) so an alternative is to use the notation. The item that follows is inverted. You may also need brackets if it applies to a complicated expression:

B
(A.B)

What about something like A + B.C ? Does this mean that we do the OR first (the +), or the AND first (the .) or do we just do them in whichever order we come across them?

The rule is that AND takes precedence over OR, i.e. A + B.C is equivalent to A + (B.C) (where the brackets mean "do me first" as they do in ordinary mathematics) rather than (A + B).C. Of course, if you want the OR done before the AND, you would enclose it within brackets:

Also, note that NOT ( or a line above the symbol) takes precedence over both AND and OR, so X.Y would be equivalent to (X).Y rather than (X.Y). However, when we put the line above some complex expression to show that it is inverted, we assume that the complex expression has invisible brackets round it (i.e. the expression is worked out, then inverted). Note the difference between the following:

_____
X + Y
is equivalent to
(X + Y)
___
X.Y
is equivalent to
(X.Y)
_ _
X.Y
is equivalent to
(X).(Y)

As far as I know, there is no special notation for NAND, NOR and XOR. In the case of A NAND B we just say (A.B). In the case of A NOR B we just say (A + B), and in the case of A XOR B we just say A.B + A.B (which gives exactly the same result, if you work it out).

Axioms

An axiom is a statement of fact that is considered too simple to prove. For instance, in mathematics, it is an axiom that 1 + 1 = 2. Everyone older than about 2 years old knows this, but I bet you couldn't actually prove it. Neither could I. It's just too simple to prove.

In the following axioms A is any binary signal, 1 or 0:

The operations of AND and OR are also distributative, commutative and associative:

Commutative means that it doesn't matter which way round you do them - the answer is the same:

A.B = B.A
A + B = B + A

Associative means that when you are ANDing three items, it doesn't matter which order you do them in, and similarly for ORing three items:

A.B.C = A.(B.C) = (A.B).C
A + B + C = A + (B + C) = (A + B) + C

Distributative means that they obey this rule:

A.(B + C) = (A.B) + (A.C)

I'm sure that you will have noticed the similarity between this notation and normal algebraic notation in mathematics. If we treat AND (.) as if it were multiply and OR (+) as if it were add, then the two are almost identical. The only difference is that A + 1 = 1, which is not automatically true in mathematics (but if A = 0 ...) However, if we treated "anything apart from from 0" as being the same, then the rule becomes A + (non-zero number) = (non-zero number), which makes perfect sense in mathematics providing that A is 0 or 1.

AND-OR networks in this notation

We can express our AND-OR networks using the notation. Consider this network:

In the syntax, this becomes A.B.C + A.B.C + A.B.C. What a relief! No more drawing those long, tedious diagrams!

Take a look at the first and last terms: A.B.C + A.B.C. If you cast your mind back to the distributative property, then you will see that we can "factorise" these terms into brackets, as follows:

A.B.C + A.B.C = A.B.(C + C)

because they have the A.B part in common. Now we can apply another axiom, C + C = 1, to reduce the expression further:

A.B.(C + C) = A.B.1 = A.B

Effectively, we have reduced those two terms to one, and the whole expression becomes

A.B.C + A.B

You can see from the table below that the truthtables are the same for both the original and the simplified version - they are equivalent.

A
B
C
A.B.C + A.B.C + A.B.C
A.B.C + A.B
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
1
1
0
0
0
1
1
1
0
0

Effectively the terms A.B.C + A.B.C tells us that the circuit produces a 1 if A is on and B is off, regardless of the state of C.

Now consider this AND-OR network:

X.Y.Z + X.Y.Z + X.Y.Z

(and not a diagram in sight!) The expression could be simplified as follows:

X.Y.Z + X.Y.Z + X.Y.Z
= X.Z.(Y + Y) + X.Y.Z
= X.Z.1 + X.Y.Z
= X.Z + X.Y.Z
= Z.(X + X.Y)

This relies on the fact that the first two terms can be collapsed into one. Alternatively, we can go back to the original expression and simplify it a different way:

X.Y.Z + X.Y.Z + X.Y.Z
= X.Y.Z + (X + X).Y.Z
= X.Y.Z + 1.Y.Z
= X.Y.Z + Y.Z
= Z.(X.Y + Y)

This relies on the fact that the last two terms can be collapsed into one. Both these simplified expressions are equivalent to the original, so they must both be equivalent to each other. If you don't believe me, construct the truth table for each version and compare them. I'm not doing it - I'm far too lazy!

de Morgan's Laws

There are two rules which I should mention:
___
_
_
A.B
 = 
A
 + 
B
and
_____
_
_
A + B
 = 
A
.
B
On the left side of each equation, the ANDing and ORing is done before the inverting. On the right side of each equation, the inverting is done before the ANDing or ORing. Here are de Morgan's rules written using the alternative notation:

(A.B) = A + B
(A + B) = A.B

The easiest way to prove these rules is to construct a truthtable for each half of the equations and compare them. Of course, there is no reason why you should apply de Morgan's rule just to individual letters. Try a combination of signals, such as

((A.B).(C.D)) = ((A.B)) + ((C.D))
(according to the first rule above)
= A.B + C.D

Incidentally, we have just proved that a NAND-NAND network is exactly equivalent to an AND-OR network. ((A.B).(C.D)) is equivalent to A NANDed with B, C NANDed with D, and the output of these two NANDings being NANDed themselves. You can see that applying de Morgan's first rule turns the expression into A ANDed with B, C ANDed with D and the results ORed together.

Some More Examples

Just to finish off, here are some more expressions which are equivalent to each other.

(A + B.C).(C + A.D) = A.(C + A.D) + B.C.(C + A.D)
= A.C + A.A.D + B.C.C + B.C.A.D
= A.C + B.C + A.B.C.D
= C.(A + B + A.B.D)

X.Y.(X + Y + Z) = X.Y.X + X.Y.Y + X.Y.Z
= X.Y + X.Y + X.Y.Z
= X.Y + X.Y.Z
= X.Y.1 + X.Y.Z
= X.Y.(1 + Z)
= X.Y.1
= X.Y

P.Q.R + P.Q.R + P.Q.R + P.Q.R = P.Q.(R + R) + P.Q.(R + R)
= P.Q.1 + P.Q.1
= P.Q + P.Q
= P.(Q + Q)
= P.1
= P

Here's that last example again, this time simplified a slightly different way:

P.Q.R + P.Q.R + P.Q.R + P.Q.R = P.R.(Q + Q) + P.R.(Q + Q)
= P.R.1 + P.R.1
= P.R + P.R
= P.(R + R)
= P.1
= P

(We got to the same place by a slightly different route!)



Go back

Main Menu

Questions

Go on