# Voting Machine?

Discussion in 'Homework Help' started by DeathEater, Apr 7, 2015.

1. ### DeathEater Thread Starter New Member

Mar 30, 2015
7
0
there is a project in school that requires you to build a "voting machine" circuit board using the least number of gates. The voting machine is based on four people, a president, vice president, secretary, and treasurer. The presidents vote counts twice and the rest once. They need three votes for something to pass (which is the light turning on). So the light is supposed to turn on when three votes are a yes. I have simplified mine down to five gates by doing a K-Map. The original equation is : PV+PS+PT+VST (since the presidents vote counts twice).
I have gotten it to: P (V+T) + S (P+T). Can I simplify anymore?

2. ### MrChips Moderator

Oct 2, 2009
12,636
3,454
Moved to Homework Help.

Jun 29, 2010
2,831
89
4. ### DeathEater Thread Starter New Member

Mar 30, 2015
7
0
I took P (V+S+T) +VST and simplified using boolean algebra

5. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
If the metric is "the least number of gates", then it would seem you are going backward.

You started with this:

P (V+S+T) +VST

How many gates does this use?

I see four:
1 -- 3-input AND gate
1 -- 3-input OR gate
1 -- 2-input AND gate
1 -- 2-input OR gate

You "simplified" it to this:

P (V+T) + S (P+T)

How many gates does this use?

I see five:
3 -- 2-input OR gate
2 -- 2-input AND gate

Whenever you ask about making something, "optimal", "best", "simplest" or anything similar, it is critical that the metrics by which performance is measured be clearly defined.

6. ### DeathEater Thread Starter New Member

Mar 30, 2015
7
0
we only use 2 input gates, so three input isn't an option, making the previous one have many more gates

7. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Okay, but then the problem needs to state that the goal is to use the least number of two-input gates.

Now consider whether your solution is actually correct.

P (V+T) + S (P+T)

Would you agree that this is true if S(P+T) is true?

Would you agree that this is true if S is true and T is true?

Does that mean that the vote carries if S and T are true but P and V are false?