//Keil51单片机P0口按位异或运算结果显示源码

#include  

void main() 
{ 
  unsigned char a, b, result; 
  a = 0x55; //01010101
  b = 0xAA; //10101010
  result = a ^ b; //异或运算 
  P0 = result; //结果输出到P0口
  while(1); //程序停留在此处 
}