欣乐

The eagles are coming!

导航

p75 逻辑非运算

//75
program test;
var 
  i,j,k:byte;
begin
  i:=%11111111;
  for j:=0 to 9 do begin
    k:=i xor j;
    writeln( binstr(j,8) );
    writeln( binstr(k,8) ); //可以有选择地取反
    writeln( binstr(not(j),8) ); //全部取反
    writeln;
  end;
end.

 

posted on 2014-09-19 11:38  欣乐  阅读(127)  评论(0编辑  收藏  举报