Cryptography Reference
In-Depth Information
set a binary digit of a
LINT
object to 1
Function:
const LINT&
LINT::setbit (unsigned int pos);
Syntax:
implicit argument
a
position
pos
of the bit to be set (counted from 0)
Input:
pointer to
a
with the set bit at position
pos
Return:
a.setbit (512);
Example:
test a binary digit of a
LINT
object
Function:
int
LINT::testbit (unsigned int pos);
Syntax:
Input:
implicit argument
a
position
pos
of the bit to be tested (counted from 0)
1ifthebitatposition
pos
is set, 0 otherwise
Return:
if(a.testbit (512)) //
...
Example:
set a binary digit of a
LINT
object to 0
Function:
const LINT&
LINT::clearbit (unsigned int pos);
Syntax:
implicit argument
a
position
pos
of the bit to be cleared (counted from 0)
Input:
pointer to
a
with the cleared bit at position
pos
Return:
a.clearbit (512);
Example: