Truth table and basic logic gate