Switching Algebra Question

Started by
5 comments, last by Tangletail 8 years, 7 months ago

Hello all! I've ran into some problems with switching algebra. The professor teaching this course didn't run through any examples at all. And the ones in the book are fairly useless so far.

I am just going to list a few to help me along to solve the rest of the problems.

Simplify

f(w,x,y,z) = x + xyz + (!x)yz + wx + (!w)x + (!x)y

Use this theorem to simplify the following problem.
Theorem : a + (!a)b = a + b
: a((!a) + b) = ab

(!X) + XAB(!C) +(!B)C

Use Consensus to simplify
(X + Y + Z + (!W)) * (V+W) * ((!V) + Y + Z + (!W))

Advertisement
Which parts do you understand? Which parts do you have trouble with?

You can get pretty much everything you need from the 'laws' sections of this page:

https://en.wikipedia.org/wiki/Boolean_algebra

The laws I understand, it's the simplification process I'm unsure of. As I have stated. The professor didn't run through any examples. And the ones in the book are only simple cases. There's also no way for me to check my results with any problems to be sure that I am understanding it.

f(w,x,y,z) = x + xyz + (!x)yz + wx + (!w)x + (!x)y
           = x + (!x)yz + wx + (!w)x + (!x)y
           = x + (!x)yz + (!w)x + (!x)y
           = x + (!x)yz + (!x)y
           = x + yz + y
           = x + y
Let me know if you can't figure out why any of the steps is true.

For the other two expressions, I suspect you have typos, and then I cannot trust that I can figure out what they are. Please, check the expressions and post again.

The laws I understand, it's the simplification process I'm unsure of. As I have stated. The professor didn't run through any examples. And the ones in the book are only simple cases. There's also no way for me to check my results with any problems to be sure that I am understanding it.


You can always run a program like this one:

#include <iostream>

bool f(bool w, bool x, bool y, bool z) {
  return x || (x && y && z) || ((!x) && y && z) || (w && x) || ((!w) && x) || ((!x) && y);
}

bool g(bool w, bool x, bool y, bool z) {
  return x || y;
}

int main() {
  int n_errors = 0;
  for (int w = 0; w < 2; ++w) {
    for (int x = 0; x < 2; ++x) {
      for (int y = 0; y < 2; ++y) {
        for (int z = 0; z < 2; ++z) {
          if (f(w,x,y,z) != g(w,x,y,z)) {
            ++n_errors;
            std::cout << w << ' ' << x << ' ' << y << ' ' << z << ' ' << f(w,x,y,z) << ' ' << g(w,x,y,z) << '\n';
          }
        }
      }
    }
  }
  std::cout << "n_errors = " << n_errors << '\n';
}
Here's a good resource for some simplifications:

http://www.allaboutcircuits.com/textbook/digital/chpt-7/boolean-rules-for-simplification/

Explanations of Alvaro's steps:

First three steps:

"x + xyz" becomes "x"
"x + wx" becomes "x"
"x + (!w)x" becomes "x"

x OR (x AND anything) = x, because if x is 1, then the right side of the OR doesn't matter. If x is 0, then both sides will be 0. So the result is controlled 'x' alone and therefore can be simplified. This is the "A + AB = A + B" case on the simplification page.


Steps 4 and 5:

"x + (!x)yz" becomes "x + yz"
"x + (!x)y" becomes "x + y"

The reduction here is possible because: { if x is 1, then the other side of the OR doesn't matter. If x is 0, then !x is 1, and 1*A = A }. Therefore the (!x) portion can simply be removed because it's not significant for evaluating the equation for either value of x. This is the "A + (!A)B = A + B" simplification case.

Step 6: Same simplification as the first three steps, just with 'y' instead of 'x'.

f(w,x,y,z) = x + xyz + (!x)yz + wx + (!w)x + (!x)y
           = x + (!x)yz + wx + (!w)x + (!x)y
           = x + (!x)yz + (!w)x + (!x)y
           = x + (!x)yz + (!x)y
           = x + yz + y
           = x + y
Let me know if you can't figure out why any of the steps is true.

For the other two expressions, I suspect you have typos, and then I cannot trust that I can figure out what they are. Please, check the expressions and post again.

Thanks for the help! Also, I checked the last two equations. They are right. I went ahead and made them a bit easier to read however.

Here's a good resource for some simplifications:

http://www.allaboutcircuits.com/textbook/digital/chpt-7/boolean-rules-for-simplification/

Explanations of Alvaro's steps:

First three steps:

"x + xyz" becomes "x"
"x + wx" becomes "x"
"x + (!w)x" becomes "x"

x OR (x AND anything) = x, because if x is 1, then the right side of the OR doesn't matter. If x is 0, then both sides will be 0. So the result is controlled 'x' alone and therefore can be simplified. This is the "A + AB = A + B" case on the simplification page.


Steps 4 and 5:

"x + (!x)yz" becomes "x + yz"
"x + (!x)y" becomes "x + y"

The reduction here is possible because: { if x is 1, then the other side of the OR doesn't matter. If x is 0, then !x is 1, and 1*A = A }. Therefore the (!x) portion can simply be removed because it's not significant for evaluating the equation for either value of x. This is the "A + (!A)B = A + B" simplification case.

Step 6: Same simplification as the first three steps, just with 'y' instead of 'x'.

Thanks for the explanation!

This topic is closed to new replies.

Advertisement