Monday, August 27, 2012

Electronics Lessons: Logic Notation

In the last post I looked at various gates.

Now we're going to look at the various notations that are used when writing out statements of what logic circuits do.

First, lets think about a binary circuit.

Basically we'll have at least one input, and at least one output.

We'll call our inputs a series of letters, starting with A, and out outputs will be assigned the letter Q, if there is more than one output we'll call it Q1 and Q2.

It's exactly the same notiation for all the logic operators if you call inputs In1, In2 and so on


So lets start with the four simple gates
NOT, AND, OR, XOR
/ . + ⊕

the NOT gate is a slash.

Q = /A
q = not A

Alternativly not can be represented by an apostraphy after the letter

Q = A'
1 = 0'
0 = 1'
1 = /0
0 = /1

The AND gate is represented by a dot.
Q = A.B

0 . 0 = 0
0 . 1 = 0
1 . 0 = 0
1 . 1 = 1

the OR gate is represented by a plus sign.

Q = A+B
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1

and XOR is represented by a plus with a circle around it

Q = A⊕B
0 ⊕ 0 = 0
0 ⊕ 1 = 1
1 ⊕ 0 = 1
0 ⊕ 0 = 0

finally we make up logical expressions the same way as we made up the gates for more complicated gates.
a NAND gate was just an AND gate with a NOT gate following it.

Q' = A + B
/Q = A + B
Q = /(A + B)

NOR
Q' = A+B
/Q = A+B
Q = /(A+B)

XNOR
Q' = A⊕B
/Q = A⊕B
Q = /(A⊕B)

No comments: