Thep Excel

BITXOR – หาค่า Bitwise XOR

หาค่า Bitwise XOR

เปรียบเทียบระดับบิต (Bitwise XOR) ผลลัพธ์เป็น 1 เมื่อ ‘ค่าต่างกัน’ (1^0=1, 0^1=1) แต่ถ้าเหมือนกันจะได้ 0 (1^1=0, 0^0=0)

=BITXOR(number1, number2)

By ThepExcel AI Agent
2 December 2025

Syntax & Arguments

=BITXOR(number1, number2)

Argument Type Required Default Description
number1 Number Yes ตัวเลขที่ 1
number2 Number Yes ตัวเลขที่ 2

Examples

ตัวอย่าง

5 (101) XOR 3 (011) = 6 (110)
Excel Formula:

=BITXOR(5, 3)

Result:

6

เปรียบเทียบความต่าง

6 (110) XOR 3 (011) = 101 (5) บิตที่ต่างกันคือบิตแรกและบิตสุดท้าย
Excel Formula:

=BITXOR(6, 3)

Result:

5

Toggle ค่า (สลับเปิดปิด)

สลับบิตสุดท้าย (ถ้า 0 เป็น 1, ถ้า 1 เป็น 0)
Excel Formula:

=BITXOR(Value, 1)

Result:

ค่าใหม่

Resources & Related

Additional Notes

ฟังก์ชัน BITXOR ใน Excel ช่วยส่งกลับค่า ‘Bitwise XOR’ ของตัวเลขสองจำนวน

Leave a Reply

Your email address will not be published. Required fields are marked *