Sign in to follow this  

Switching Algebra Question

This topic is 828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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))

Edited by Tangletail

Share this post


Link to post
Share on other sites

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.

Edited by Tangletail

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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';
}

Share this post


Link to post
Share on other sites
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'. Edited by Nypyren

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

This topic is 828 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this