Search code examples
binarylogicaddition

OR gate with inverted inputs


This is a general question..

How does the math behind the first set of input work (0,0), since the inputs get inverted (0,0) becomes (1,1) which if we then add becomes a 2 ('0b10') how is the output '1'.

Inverted Input OR Gate


Solution

  • OR is not the same as integer addition. The truth table for an OR gate is

    A   B     A OR B
    0   0       0
    0   1       1
    1   0       1
    1   1       1
    

    The output is 1 if and only if A is 1 or B is 1 (hence the name).

    The truth table shown is not for a NOR gate, but rather a NAND gate. One of De Morgan's laws states that

    NOT A OR NOT B == NOT (A AND B)
    

    and you can see this is the case:

    A   B     A OR B  A AND B   NOT (A AND B)
    0   0       0        0           1
    0   1       1        0           1
    1   0       1        0           1
    1   1       1        1           0
    

    If I see "Negative-OR", I assume they mean NOR. Whoever created that image may have intended it to be read "input-negative OR", which matches the symbol and the truth table, but isn't a term I've ever heard before.