procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin i := 0; ShowMessage(IntToStr(i)); //0 i := not i; ShowMessage(IntToStr(i)); //-1 i := not i; ShowMessage(IntToStr(i)); //0 end;