Shl
From Free Pascal wiki
Jump to navigationJump to searchShift left (shl) performs a left bit-shift operation (opposite than shr).
E.g
Command is: 00000100 shl 2 Action is: 00000100 <- 00 Result is: 00010000
Toggle a bit
<delphi> function ToggleBit(const AValue,ABitNumber:integer):integer; begin
result := AValue xor 1 shl ABitNumber;
end; </delphi>
If you call ToggleBit(11,0) then get 10. If you call ToggleBit(10,2) then get 14.