What is the N flag used for?
In an assembly language, N flag stands for
Negative flag.
This flag is set if the result after supervising the operation is
negative.
The Flag simply inspect the most significant bit of the result
after any operation . In several architecture we use a flag called
as Overflow ,which is used to check if the most significant bit of
the result has been changed.
In a computer system, the negative flag or N flag is an individual
bit in an operation (flag) register used to demonstrate whether the
outcome of the last mathematical method attained a value in which
the largely significant bit is set.
for example:
MVI A 40(load 40H in register A)
MVI B 50(load 50H in register B)
SUB B
These instructions will set the sign flag to 0 as the result is a
negative number.
I hope this answer will help you , in case you face any problem,
please let me know in the comment section
Get Answers For Free
Most questions answered within 1 hours.