What would the boolean logic expression be given this condition:

Thread Starter

Sebastian Lee

Joined Jul 19, 2016
2
Output will be '1' if only two out of three inputs are '1'.

Moderators note: reduced font and removed bold, as it would be like shouting
 

Papabravo

Joined Feb 24, 2006
22,082
Use three 2-input AND gates to detect each input pair being both 1. Use a 3-input OR gate to see if the output of any of the AND gates is 1. If the three inputs are A, B, C, then the Boolean expression is

AB + AC + BC, which will be 1 if any pair of inputs is 1
 

WBahn

Joined Mar 31, 2012
32,823
Use three 2-input AND gates to detect each input pair being both 1. Use a 3-input OR gate to see if the output of any of the AND gates is 1. If the three inputs are A, B, C, then the Boolean expression is

AB + AC + BC, which will be 1 if any pair of inputs is 1
But it will also be 1 if all three inputs are 1, which contradicts the stated goal of having the output be 1 if only two out of three inputs are a 1. But this could be just a case of sloppiness on the TS's part, particularly since it would probably be better stated as wanting a 1 only if two of the three inputs are a 1.

@Sebastian Lee: Did you mean exactly two of three, or at least two of three?

If the latter, the circuit is called a "majority detector" or sometimes a "voting circuit".

If you meant the former, then it is almost an even parity detector (which would be a 1 if either exactly zero inputs were 1 or if exactly two inputs are 1. It could be implemented pretty easily starting with either a majority detector or an even parity detector.
 
Top