Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Twos-complement/Delphi/twos-complement.delphi
Normal file
11
Task/Twos-complement/Delphi/twos-complement.delphi
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
procedure TwosCompliment(Memo: TMemo);
|
||||
var N: integer;
|
||||
begin
|
||||
N:=123456789;
|
||||
Memo.Lines.Add(Format('N=%10d $%0.8x',[N,N]));
|
||||
Memo.Lines.Add('');
|
||||
Memo.Lines.Add('N:=(N xor $FFFFFFFF)+1');
|
||||
N:=(N xor $FFFFFFFF)+1;
|
||||
Memo.Lines.Add('');
|
||||
Memo.Lines.Add(Format('N=%10d $%0.8x',[N,N]));
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue