Changed mode to 8 bits and added NAND gate.
Improved tests.