pythonlogicboolean-algebranor

Construction of an AND Gate from NOR Gates


One of the alternate to getting the same output as an AND Gate, is to put together NOR gates. The operator for NOT gates is (A+B)', However there is a problem, I can't get the same output an AND gate would.

This image is from https://en.wikipedia.org/wiki/NOR_logic

So for example if we take:

A = 1 B = 0, I would expect 0 as a result, but that does not seem to be the case here since,

= (1 NOR 0) NOR (1 NOR 0)
= (0) NOR (0)
= 1

What am I doing wrong?


Solution

  • There is indeed an error in your expression.

    The key here is to see that the first two ports each take a pair of values that are duplicates. So we have

    (A NOR A)
    (B NOR B) 
    

    image

    This evaluates a NOT operation, so we get:

    (NOT A)
    (NOT B)
    

    These two are then the operands of the final NOR, giving the desired result.

    For your example with A = 1 B = 0:

    (1 NOR 1) == 0
    (0 NOR 0) == 1
    

    And

    0 NOR 1 == 0
    

    All possibilities

    A B A NOR A B NOR B (A NOR A) NOR (B NOR B)
    0 0 1 1 0
    0 1 1 0 0
    1 0 0 1 0
    1 1 0 0 1