JCL Help:BitsNeeded@Byte

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the number of Bits needed to represent a given positive integer.


Pascal

 function BitsNeeded(const X: Byte): Integer; overload;
function BitsNeeded(const X: Word): Integer; overload;
function BitsNeeded(const X: Integer): Integer; overload;
function BitsNeeded(const X: Int64): Integer; overload;


Parameters

Parameters Description
const X: Byte The value for which you want to now how many bits are needed to represent it.


Return Value

The number of bits needed to represent the value.


Description

Returns the number of Bits needed to represent a given positive integer.


See Also

Digits


About

Unit

JclLogic


Donator

ESB Consultancy


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