Logic switch