logic gates substitutions confirmed