How to achieve Or gate

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to achieve Or gate

AntonioCS
Hey!

I was re-reading the Canonical representation part and I thought I could use that logic to get the hdl code for the Or Gate.

truth table
0 0 0
1 0 1
0 1 1
1 1 1

So I forgot about the first line and 'fixed the values'. So I got
And(1,Not(0)) = 1
And(Not(0),1) = 1
And(1,1) = 1

But now I have to 'Or' them together which is bad because this is the gate I am trying to create.
How can I achieve the canonical representation of the Or gate without the or gate?

I thought I could just negate the result of this but in the case of 0 0 negating will not work.
I just really want to know how I can properly use the canonical representation so that I can understand all the this and the other gates.

Note: Didn't try to represent the Not and the And gate just because I figured it out really quickly, but I am kind of stuck on this on.
Reply | Threaded
Open this post in threaded view
|

Re: How to achieve Or gate

ybakos
You're close.

Let me give you another hint. Note DeMorgan's Law:

(a + b)' = a'b'

Hence,

 a + b = (a'b')'

Aha, so OR is equivalent to...
Reply | Threaded
Open this post in threaded view
|

Re: How to achieve Or gate

AntonioCS
HA!!

Ok I read at wikipedia

NOT (P OR Q) = (NOT P) AND (NOT Q)

So as you said (a'b')'

Which basically means

NOT(AND(NOT(a),NOT(b))

Thanks for the help.

One other question. I wouldn't have been able to get to this by just looking at the truth table and trying to create a canonical representation would I?
Reply | Threaded
Open this post in threaded view
|

Re: How to achieve Or gate

cadet1620
Administrator
Sometimes, especially when there are fewer 0's than 1's in the truth table output, it is easier to build the inverted function and then invert the the output to get the true function.

The OR function has only one 0 in its output, so let's find the canonical form of the NOT OR (NOR) function

ab|NOR
00|1
01|0
11|0
11|0
NOR is true only when a is not true and b is not true, so the canonical form of NOR is simply
NOR(a, b) = (NOT a) AND (NOT b)
Since NOR is the invert of OR, invert NOR to get
OR(a, b) = NOT((NOT a) AND (NOT b))

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: How to achieve Or gate

AntonioCS
Thanks for the help!