What would the boolean logic expression be given this condition:

Discussion in 'General Electronics Chat' started by Sebastian Lee, Aug 14, 2016.

  1. Sebastian Lee

    Thread Starter New Member

    Jul 19, 2016
    2
    0
    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
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,140
    1,789
    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
     
  3. WBahn

    Moderator

    Mar 31, 2012
    17,737
    4,789
    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.
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    @WBahn
    When it is exact two, it could be an even parity circuit, as it has only 3 bits.

    Bertus
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,737
    4,789
    So what is the output of an even-parity circuit when all of the inputs are zero?
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    Ai, I see. with all zeros it will also be 1.

    Bertus
     
  7. knowone

    New Member

    Aug 24, 2009
    3
    0
    And a bunch of nots. Screenshot.png
     
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,533
    1,251
    #7 is the winner.

    ak
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,737
    4,789
    That's IF the TS meant exactly two of the three. There's no way to be sure unless the TS clarifies what the spec is.
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,533
    1,251
    I think "exactly" = "only."

    ak
     
Loading...