JCL Help:CountBitsCleared@Byte
From Project JEDI Wiki
Jump to navigationJump to searchJCL Help: CountBitsCleared Function
[+] JclLogic.pas Functions
Search in JCL Help
Search in all projects
Summary
Returns the number of cleared bits in the supplied value.
Pascal
function CountBitsCleared(X: Byte): Integer; overload;
function CountBitsCleared(X: Shortint): Integer; overload;
function CountBitsCleared(X: Smallint): Integer; overload;
function CountBitsCleared(X: Word): Integer; overload;
function CountBitsCleared(X: Integer): Integer; overload;
function CountBitsCleared(X: Cardinal): Integer; overload;
function CountBitsCleared(X: Int64): Integer; overload;
function CountBitsCleared(P: Pointer; Count: Cardinal): Cardinal; overload;
Parameters
Parameters | Description |
X: Byte | The value for which to determine the number of bits that are cleared. This can be an Integer, Cardinal, Byte, Word or Int64. |
Return Value
The number of cleared bits or 0 if no bits are cleared.
Description
CountBitsCleared returns the number of bits that are cleared (value 0) in the binary representation of the supplied Value. Note that signed integers are stored in two's complement form and therefore, for example, CountBitsCleared(Integer(-1)) will return 0!
See Also
About
Unit
Donator
Robert Marquardt
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page