Type
TposRange = 0..32;
TSTATERESULT = 0..1;
Function GetBitsate (Source: Integer; POS: TPOSRANGE): TSTATERESULT
Begin
Result: = ((Source and (1 shl POS)) SHR POS);
END;