I want to implement a logical operation that works as efficient as possible. I need this truth table:
p q p → q T T T T F F F T T F
You can read up on deriving boolean expressions from truth Tables (also see canonical form), on how you can express any truth table as a combination of boolean primitives or functions.