# logic gate optimization problem

5 messages
Open this post in threaded view
|

## logic gate optimization problem

 When i have written out the algebra expression, i tried to optimize and simplify the expression by following :x+x=x;. And then i found out that the xor and or gate would be the same if it worked. What's wrong with my simplification process? I followed the explanation here: http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Logic/Logic2.htmlThanks for your kind help!
Open this post in threaded view
|

## Re: logic gate optimization problem

 Administrator moonwalk wrote When i have written out the algebra expression, i tried to optimize and simplify the expression by following :x+x=x;. And then i found out that the xor and or gate would be the same if it worked. What's wrong with my simplification process? I followed the explanation here: http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Logic/Logic2.htmlThanks for your kind help! Your truth table for XOR is inverted. 0 XOR 0 = 0. The canonical form read from the XOR truth table is   A ~B + ~A B which is the minimized sum-of-products implementation. I don't understand what you are trying to do by ORing AB into   ~A B + A ~B You can not do this without changing the function: ```a b ~AB+A~B AB ~AB+A~B+AB 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 ```--Mark
Open this post in threaded view
|

## Re: logic gate optimization problem

 Administrator Given F = AB~C + A~BC + ~ABC + ABC. Adding +ABC+ABC to this function to simplify only works because there is already an ABC term.  They do this so that the can reduce F as follows ```F = AB~C + A~BC + ~ABC + ABC = AB~C + A~BC + ~ABC + (ABC + ABC + ABC) = (AB~C + ABC) + (A~BC + ABC) + (~ABC + ABC) = AB(~C+C) + AC(~B+B) + BC(~A+A) F = AB + AC + BC ```For X = ~AB + A~B, there is no AB term already in there, you can not arbitrarily add it. There is another proof/derivation trick which is to add +X~X terms to a sum-of-products.  (X~X = 0) You can use this to derive the product-of-sums form of XOR: ```X = ~AB + A~B = ~AB + A~B + A~A + B~B = (~AB + A~A) + (A~B + B~B) = ~A(A+B) + ~B(A+B) X = (~A+~B)(A+B) ```--Mark