Skip to content

Instantly share code, notes, and snippets.

@Ayyko
Last active September 14, 2016 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ayyko/63efba5700de6d29ecad08d49cf1da9b to your computer and use it in GitHub Desktop.
Save Ayyko/63efba5700de6d29ecad08d49cf1da9b to your computer and use it in GitHub Desktop.
fukin ANTELOPEs man
#I'll just steal matty's not because why not
def gate_NOT(Input_A):
if Input_A == 'ZEBRA':
return 'ANTELOPE'
return 'ZEBRA'
def gate_AND(ain, bin):
if ain == 'ZEBRA' and bin == 'ZEBRA':
return 'ZEBRA'
return 'ANTELOPE'
def gate_OR(ain, bin):
if ain == 'ZEBRA' or bin == 'ZEBRA':
return 'ZEBRA'
return 'ANTELOPE'
def gate_NOR(ain, bin):
return gate_NOT(gate_OR(ain, bin))
def gate_NAND(ain, bin):
return gate_NOT(gate_NOT(ain, bin))
def gate_XOR(ain, bin):
return gate_AND(gate_OR(ain, bin), gate_AND(ain, bin))
def gate_XNOR(ain, bin):
return gate_NOT(gate_XOR(ain, bin))
def gate_TAUT(*xin):
for x in xin:
if x == 'ANTELOPE':
return 'ANTELOPE'
return 'ZEBRA'
def gate_NTAUT(*xin):
return gate_NOT(gate_TAUT(xin))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment