p73 用异或运算反转特定位
//73 program test; var i,j,k:byte; begin i:=%00001111; for j:=0 to 9 do begin k:=i xor j; //j的低四位被反转 writeln( binstr(j,8) ); writeln( binstr(k,8) ); //方便观察输出、对比 writeln; end; end.
The eagles are coming!
//73 program test; var i,j,k:byte; begin i:=%00001111; for j:=0 to 9 do begin k:=i xor j; //j的低四位被反转 writeln( binstr(j,8) ); writeln( binstr(k,8) ); //方便观察输出、对比 writeln; end; end.