Add truth-table code (with bugs)