So if MSB of the result is 1 then the sign flag=1 or else sign flag=0. Am i right?
You're right about the sign flag reflecting the most significant bit of the result, but in your addition add ax, bx
you're adding 2 words and that's what makes all the difference.
Consider adding bytes:
mov al, 20h
mov bl, 80h
add al, bl ; -> AL = 20h + 80h = A0h
The result in AL
has the most significant bit (bit 7) set and so the SF=1
Consider adding words:
mov ax, 0020h
mov bx, 0080h
add ax, bx ; -> AX = 0020h + 0080h = 00A0h
The result in AX
has the most significant bit (bit 15) cleared and so the SF=0
Tip
It might help to write hexadecimal numbers with as much digits as the register involved can hold.
Write mov ax, 0020h
instead of mov ax, 20h
.