Adding logic circuits