NAND NOR
NAND 게이트의 조합만으로 모든 게이트를 만들 수 있다. 아래는 NAND 게이트의 퍼셉트론만으로 모든 게이트를 구현한 python 코드이다. def NAND(x1, x2): a0 = -0.5 * (x1 + x2) + 0.7 if a0 > 0: return 1 else: return 0 def NOT(x): return NAND(x, x) def AND(x1, x2): return NOT(NAND(x1, x2)) def OR(x1, x2): return NAND(NOT(x1), NOT(x2)) def NOR(x1, x2): return NOT(OR(x1, x2)) def XOR(x1, x2): return AND(NAND(x1, x2), OR(x1, x2)) def XNOR(x1, x2): return ..
2021. 8. 9.