References from last night’s meeting

24 views
Skip to first unread message

Tom Stuart

unread,
Nov 5, 2014, 6:04:54 AM11/5/14
to Computation Club mailing list
Photos: https://www.flickr.com/photos/tomstuart/sets/72157649134569472/

Ruby code:

def NAND(a, b)
  !(a && b)
end

def NOT(a)
  NAND(a, a)
end

def AND(a, b)
  NOT(NAND(a, b))
end

def OR(a, b)
  NAND(NOT(a), NOT(b))
end

def XOR(a, b)
  AND(OR(a, b), NAND(a, b))
end

def MUX(a, b, sel)
  OR(AND(NOT(sel), a), AND(sel, b))
end

Wikipedia pages:


Cheers,
-Tom
Reply all
Reply to author
Forward
0 new messages