vhdl problem

Thread Starter

randb

Joined Dec 29, 2012
16
VHDL
begin
x<=not ( (not a and not b) or (not a and not c) or (not a and not d)
or ( not b and not c) or (not b and not d) or ( not d and not c) ).

create truth table that describes logic circuit?

I used a'b' + b'c' + a'd' +b'c' + b'd' + d'c' then negated again. used
demorgans and simplified to abcd. abcd would be 1 in truth table.

answer in book indicates abcd ab'cd a'bcd abc'd. Having trouble understanding their tt.

any help would be welcomed. Thanks
 

WBahn

Joined Mar 31, 2012
29,976
It appears you are both wrong, but the book is closer.

How did you get your second term (which is a duplicate of your fourth)?

How did you get to your result? We are NOT mind readers. SHOW YOUR WORK!

Have you tried seeing if their other terms are solutions to the original expression?

Think of the higher level logic being implemented. You have the OR of six different terms. In each term two of the four inputs are combined such that the term is HI only if both of the inputs are LO. Given four things, there are only six ways to take them two at a time, so unless there are duplicate terms, you have all of the possible pairings represented. The overall output is HI only if ALL of the six terms are LO. This means that your final output is LO if any two of the inputs are LO. Conversely, it will be high if one or fewer inputs are LO. How many such input conditions are there? What are they?
 

Thread Starter

randb

Joined Dec 29, 2012
16
Lets try this again. port (A,B,C,D:in bit; X out bit);
begin
x<=not ( (not a and not b) or (not a and not c) or (not a and not d)
or ( not b and not c) or (not b and not d) or ( not d and not c) ).
Not this term a'b' +a'c' +a'd' +b'c' +b'd' +d'c' by Demorgans and I would obtain abcd? (ab'')(ac'')(ad'')(bc'')(bd'')(dc'')=abcd?
 

WBahn

Joined Mar 31, 2012
29,976
Lets try this again. port (A,B,C,D:in bit; X out bit);
begin
x<=not ( (not a and not b) or (not a and not c) or (not a and not d)
or ( not b and not c) or (not b and not d) or ( not d and not c) ).
Not this term a'b' +a'c' +a'd' +b'c' +b'd' +d'c' by Demorgans and I would obtain abcd?
How?

(ab'')(ac'')(ad'')(bc'')(bd'')(dc'')=abcd?
You are trying to do too much at once and messing yourself up. Take it one step at a time.

The NOT of a string of terms is the AND of a string of factors in which each factor is the NOT of one of the original terms.

Do JUST THAT MUCH -- don't simplify it ANY further. What do you get?
 

Thread Starter

randb

Joined Dec 29, 2012
16
Iam missing something. If I just take two of the terms a' and b' ( same as a' times b') I get a'b'. If I then take another term a' and c' = a'c' the two terms would then represent a'b' + (or) a'c'. Then I would place a not over this string and apply DeMorgans and my result would be abac which would equal abc? Is this wrong?
Thank you for your time
 

WBahn

Joined Mar 31, 2012
29,976
Iam missing something. If I just take two of the terms a' and b' ( same as a' times b') I get a'b'. If I then take another term a' and c' = a'c' the two terms would then represent a'b' + (or) a'c'. Then I would place a not over this string and apply DeMorgans and my result would be abac which would equal abc? Is this wrong?
Thank you for your time
Yes, this is wrong.

You are doing exactly what I told you NOT to do -- trying to do multiple steps at once. Apply DeMorgan's to the expression AND NOTHING MORE!

(x+y)' = x'y'

If x is equal to some other expression, say (bob*fred+sue), then I had better see (bob*fred+sue)'y' as your answer after JUST applying DeMorgan's.
 

Thread Starter

randb

Joined Dec 29, 2012
16
I think I have it. (a+b)(a+c)........(d+c). Then develop my tt with abcd using the above pos terms.

Thank you for your help
 

WBahn

Joined Mar 31, 2012
29,976
I think I have it. (a+b)(a+c)........(d+c). Then develop my tt with abcd using the above pos terms.

Thank you for your help
Yes, you have made it past the stumbling block. Do you see what you were doing wrong? When working with DeMorgans algebraically, I always do it at the most basic level and don't try to combine other steps. That's a recipe for disaster.

Before developing your truth table from the POS form with six factors, bang away on that expression some more and you will see that things combine very, very nicely so that you end up with an SOP form that has just four terms with each term having three factors (none of them complemented).
 

WBahn

Joined Mar 31, 2012
29,976
Correct. Did you get that by doing a truth table and/or K-map or by direct algebraic manipulation?

For anyone that stumbles across this thread in the future, the algebraic approach goes as follows;

y = (a'b'+a'c'+a'd'+b'c'+b'd'+c'd')'
y = (a'b')'(a'c')'(a'd')'(b'c')'(b'd')'(c'd')'
y = (a+b)(a+c)(a+d)(b+c)(b+d)(c+d)
y = (aa+ab+ac+bc)(ab+ac+bd+cd)(bc+bd+cd+dd)
y = (a+bc)(ab+ac+bd+cd)(bc+d)
y = (aab+aac+abd+acd+abbc+abcc+bbcd+bccd)(bc+d)
y = (ab+ac+bcd)(bc+d)
y = abbc+abcc+bbccd+abd+acd+bcdd
y = abc+abd+acd+bcd

The next thing to do is to consider if this makes sense.

The original equation says that the output is true unless at least two of the inputs are false. Given four inputs, another way of saying this same thing is that the output is true as long as at least three inputs are true. The final result are the four possible ways in which at least three out of four things can be true, keeping in mind that the case when all four things are true is covered by each on of them.
 
Top