Domanda

I have a truth table and I need to convert it into sum-of-product canonical form. Here is my equation from the truth table.

We have 4 variables A, B, C, D and an output Y

Y = !A!B!C!D + !A!BC!D + !A!BCD + !ABC!D + !ABCD + A!B!C!D + A!BC!D

My question is, can I simply using the hamming distance of 1 trick? For example, Y = AB + A!B = A because the B and !B would cancel out.

Here is what I did

1) !A!B!C!D + !A!BC!D = !A!B!D

2) !A!BCD + !ABC!D = !AC

3) !ABCD + A!B!C!D = nothing because they all cancel out

4) A!BC!D = A!BC!D

That gives me

Y = !A!B!D + !AC + A!BC!D

Would this be correct? or does ALL of the products need to have a hamming distance of 1 in order for me to cancel them out?

È stato utile?

Soluzione

No, this is not correct. For example, if A=1, and the rest are 0, then the second-last term from the original equation is satisfied, so Y=1, but none of your three new terms are satisfied, which would imply that Y=0.

You can only eliminate one variable at a time using this method. So your first step was correct (and the fourth step was trivial, but correct), but the second and third step were wrong.

It's a lot easier to reduce this case using a Karnaugh map. If you do, I think you'll find that it just reduces to !AC+!B!D.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top