And
From Free Pascal wiki
Jump to navigationJump to searchAnd produces a value of true if and only if both of its operands are true.
Bitwise operation
Bitwise and sets a bit to 1 if and only if all of the corresponding bits in its operands are 1.
Clear a bit
<delphi> function ClearBit(const AValue, ABitNumber:integer):integer; begin
result := AValue and not(1 shl ABitNumber);
end; </delphi> If you call ClearBit(%1111,1) then get %1101 (%1111 = 15 and %1101 = 13). If you call ClearBit(13,2) then get 9 (9 = %1001) .