input, output and AND are all working. Wire is broken, code could be
more generalised and compact.