in reply to Negating a number

It's just terminology. There is a difference between negation and making a number negative.

Your first example makes $n negative of $p, in a number sense.

Your second example negates all bits of $p, in a boolean sense, complementing/flipping the bits 1 -> 0 and 0 -> 1.