Option Explicit
'--------------------------------------------------------------------
'http://khoiriyyah.blogspot.com
'--------------------------------------------------------------------
Private Function XOR_(A, B) As Boolean
XOR_ = Not (Not (A And Not (A And B)) And Not (B And Not (A And B)))
End Function
Private Sub Command1_Click()
MsgBox XOR_(True, True) 'True + True = False 1 + 1 = 0
MsgBox XOR_(True, False) 'True + False = True 1 + 0 = 1
MsgBox XOR_(False, True) 'False + True = True 0 + 1 = 1
MsgBox XOR_(False, False) 'False + False = False 0 + 0 = 0
End Sub
Dari sini maka:
XOR EAX, EAX ;maka hasilnya nilai EAX pasti 0
XOR AX, AX ;maka hasilnya nilai AX pasti 0