Potentially. Depends on the type of "m.motionbit". If it were a boolean, for instance, then your first statement would compare it's inverse to invalid
Nope - it does not depend at all on the value.
Operations are performed in order of precedence, as provided in TFM. In the case of if not m.motionbit = invalid then ...
, dot-operator has highest priority and goes first, followed by , followed by comparison operator, and NOT is last. In other words, it is the same as this (which by the way works too):
if (not ( ( (m.motionbit)[x] ) = invalid) ) then ...
The order/precedence of the operations has been done in such a way to minimize need for parenthesis in day-to-day coding.