منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
مساعدة في تعامل مع xor - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : مساعدة في تعامل مع xor (/showthread.php?tid=30732)



مساعدة في تعامل مع xor - fouadhdfouad - 05-08-19

السلام عليكم ورحمة الله وبركاته



0B3D9589FD15AC05 Xor 030EB87EDF3F249D

كيف يمكن استخراج  هذا الناتج

يساوي 08332DF7222A8898





RE: مساعدة في تعامل مع xor - ابراهيم ايبو - 05-08-19

السلام عليكم اخي الكريم
لم اجد طريقة انقل لك كبف هي ال XOR الا هذا الكود

نفذ هذا الكود علك تفهم عملها


كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       '(A and not B) or (not A and B)
       Dim A As Integer = 10
       Dim B As Integer = 4
       Dim result As Integer = A Xor B
       MsgBox(result)

       '========================
       '(A and B) or (not A and not B)
       Dim AA As Boolean
       Dim BB As Boolean
       '=======
       AA = True
       BB = True
       Dim result1 As Boolean = AA Xor BB
       MsgBox(result1)

       AA = False
       BB = True
       Dim result2 As Boolean = AA Xor BB
       MsgBox(result2)

       AA = True
       BB = False
       Dim result3 As Boolean = AA Xor BB
       MsgBox(result3)

       AA = False
       BB = False
       Dim result4 As Boolean = AA Xor BB
       MsgBox(result4)

   End Sub



RE: مساعدة في تعامل مع xor - fouadhdfouad - 06-08-19

(05-08-19, 11:58 PM)ابراهيم ايبو كتب :
السلام عليكم اخي الكريم
لم اجد طريقة انقل لك كبف هي ال XOR الا هذا الكود

نفذ هذا الكود علك تفهم عملها


كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       '(A and not B) or (not A and B)
       Dim A As Integer = 10
       Dim B As Integer = 4
       Dim result As Integer = A Xor B
       MsgBox(result)

       '========================
       '(A and B) or (not A and not B)
       Dim AA As Boolean
       Dim BB As Boolean
       '=======
       AA = True
       BB = True
       Dim result1 As Boolean = AA Xor BB
       MsgBox(result1)

       AA = False
       BB = True
       Dim result2 As Boolean = AA Xor BB
       MsgBox(result2)

       AA = True
       BB = False
       Dim result3 As Boolean = AA Xor BB
       MsgBox(result3)

       AA = False
       BB = False
       Dim result4 As Boolean = AA Xor BB
       MsgBox(result4)

   End Sub
شكرا لك اخي ابراهيم على الرد انا اعلم هذه الطريقة

ولكن لاحض القيمة المقترحة في الموضوع وهي قيمة بالهيكس 0B3D9589FD15AC05 Xor 030EB87EDF3F249D


RE: مساعدة في تعامل مع xor - ابراهيم ايبو - 06-08-19

اخي الكريم 
والله اعلم ان ارقامك فيها خطأ (رغم اني لااجيد قراءة هذه الارقام)
بعد تغيير بسيط  في ارقامك اليك الاكواد
كود :
Dim Value1 As Integer = &HF8F
       Dim Value2 As Integer = &HFB8E
       Dim result5 As Integer = Value1 Xor Value2
       MsgBox(result5)

       Dim Value3 As Decimal = &HB3D9589FD15AC05
       Dim Value4 As Decimal = &H30EB87EDF3F249D
       Dim result6 As Decimal = Value3 Xor Value4
       MsgBox(result6)