The negative flag N is the simplest status flag: it's a copy of the MSB of the ALU's result. For an n-bit result R, N = Rₙ₋₁. No gates needed, just a wire.
N = 1 means the result is negative if you read it as twos complement. For unsigned results N says nothing about sign; it's just the top bit.
Three things to keep straight:
- N isn't an error. Negative results are normal. Overflow is a separate question, answered by the overflow flag V.
- N can be wrong after overflow. If a signed operation overflowed, the result's sign is flipped, so N misreports the true answer. That's why signed less-than uses rather than N alone (see comparison by subtraction).
- N comes from the ALU output, after the result multiplexer, so it's right for every operation, logic ones included. Taking it from the adder's sum would be wrong whenever the ALU outputs an AND or OR result.
x86 processors call it the sign flag. It's the sign bit of the result, captured.