Cove - A Practical Quantum Computer Programming Framework
GetPlaceInMask Method (BitMask, TestBit)
NamespacesCove.LocalSimulationQuantumRegisterGetPlaceInMask(Int64, Int32)
Get the place (0 based) in the mask that the current TestBit is at. Example, if bit mask is 0x0A and test bit is 3 then return 1. This is because 0x0A = 0000 1010 and bit 3 (0x08) is set to true and is in place 1 (0 based).
Declaration Syntax
C#Visual BasicVisual C++
protected internal int GetPlaceInMask(
	long BitMask,
	int TestBit
)
Protected Friend Function GetPlaceInMask ( _
	BitMask As Long, _
	TestBit As Integer _
) As Integer
protected public:
int GetPlaceInMask(
	long long BitMask, 
	int TestBit
)
Parameters
BitMask (Int64)
Bit mask to look in.
TestBit (Int32)
Test bit (0 based)
Return Value
0th based place of the bit.
Exceptions
ExceptionCondition
ImplementationExceptionThrown if the TestBit is not 1 in the BitMask.

Assembly: Cove.LocalSimulation (Module: Cove.LocalSimulation) Version: 1.0.0.0 (1.0.0.0)