unit Unit1;
interface
uses
type
var
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
begin
end;
procedure TForm1.Button2Click(Sender: TObject);
var
//
a, b: Integer;
begin
//无符号:
// byte :
一个字节
8位
2的8次方
0-255 (2的8次方-1)
// word :
两个字节 16位
2的16次方
0-256*256 (65535)
// longword:
四个字节 32
2的32次方
0-65536*65536 (4294967295)
//
//有符号:(拿出一位做符号位,表示正负)
//shortint
一个字节 8位
2的8次方
-127-127 (256/2)
//smallint
两个字节 16位
2的16次方
-32767-32767 (256*256/2)
//longint(Ingetger) 四个字节32位
2的32次方
-2147483647-2147483647 (4294967295/2)
end;
//not
//1 -> 0 , 0 -> 1
procedure TForm1.Button3Click(Sender: TObject);
var
begin
end;
//and
//都是1才1
procedure TForm1.Button4Click(Sender: TObject);
var
begin
end;
//or
//位 有1则1
procedure TForm1.Button5Click(Sender: TObject);
var
begin
end;
//xor
//位不相同1
procedure TForm1.Button6Click(Sender: TObject);
var
begin
end;
//shl
//说明:左移 右边补0 (超出忽略)
procedure TForm1.Button7Click(Sender: TObject);
var
begin
end;
//shr
//说明:右移
左边补0 (超出忽略)
procedure TForm1.Button8Click(Sender: TObject);
var
begin
end;
end.