function Reverse_Bits(Bits: Longword): Longword; var i: longword; begin i:=Bits;
i := ((i and $55555555) shl 1) or ((i shr 1) and $55555555); i := ((i and $33333333) shl 2) or ((i shr 2) and $33333333); i := ((i and $0F0F0F0F) shl 4) or ((i shr 4) and $0F0F0F0F); i := ((i and $00FF00FF) shl 8) or ((i shr 8) and $00FF00FF); i := i shr 16 or i shl 16;
result:=i; end;
procedure TForm2.Button1Click(Sender: TObject); var i: longword; begin i:=$F0F0FFFF;