This code used here functions same as a NAND logic gate. I am using different projects for each logic gate not in scratch. You can copy the code for your own project. NOR Gate: https://scratch.mit.edu/projects/916195080/ XNOR Gate: https://scratch.mit.edu/projects/916208653/ XOR Gate: https://scratch.mit.edu/projects/916205458/