Menu

#149 Bug in XNOR truth table

open
nobody
XNOR (1) bug (1)
5
2022-09-13
2021-02-17
No

Hey!

I've found a bug in the truth table of the 3 and 4 input XNOR gate (pictures attached) in version 2.7.1

XNOR(true,true,true) should be false, but the output is true
XNOR(true,true,true,false) should be false, but the output is true

Sincerely,
Tshongor

2 Attachments

Discussion

  • Tshongor Kmerentsi

    I traced back the issue. In the XnorGate.java in the computeOutput function in case the code runs to the else branch, it calls computeExactlyOne function, which is nonsense. The if statement should be replaced with a simple call to the computeOddParity function

     
    • Roelens

      Roelens - 2022-09-13

      No bug, xnor is thru for an odd number of thru. This is why xnor is useful for parity test..

       
      • Tshongor Kmerentsi

        Post awaiting moderation.

Log in to post a comment.

MongoDB Logo MongoDB