Class Module
30 Members
Bitwise Class
Entisoft Tools 2.0 Object Library · Bitwise · 24 Functions · 0 Properties · 5 Subroutines
Declarations
Declarations
Bitwise operations. Copyright 1998 Entisoft
Section
AndValues
And Values
Perform the logical "And" operation on the corresponding bits from two values.
Function
ArithmeticShiftRight
Arithmetic Shift Right
Perform the arithmetic shift right (ASR) operation on any type of value.
Function
BinaryStringFmString
Binary String Fm String
"Binary String From String" or "String To Binary String" Create a string in which each character represents one of the bits of the characters in String vValue. Turns a string such as Chr$(3) + Chr$(12) into something like "0000110000000011" Order of incoming BYTES determined by vFromLSBFirst argument. Order of outgoing BITS determined by vToLSBFirst. The inverse of this function is BinaryStringToString .
Function
BinaryStringFmVariant
Binary String Fm Variant
"Binary String From Variant" or "Variant To Binary String" Create a String in which each character represents one of the bits of the String or numeric value vValue. Turns a string such as Chr$(3) + Chr$(12) into something like "0000110000000011" Order of outgoing BITS determined by vToLSBFirst. The inverse of this function is BinaryStringToVariant .
Function
BinaryStringToString
Binary String To String
"Binary String To String" or "String From Binary String" Uses each character from one string to form one bit of another string. Turns a string such as "0000001100001100" into something Chr$(3) + Chr$(12). Order of incoming BITS determined by vFromLSBFirst argument. Order of outgoing BYTES determined by vToLSBFirst. The inverse of this function is BinaryStringFmString .
Function
BinaryStringToVariant
Binary String To Variant
"Binary String To Variant" or "Variant From Binary String" Converts a binary string such as "0000001100001100" back into the type of value specified by vVarType. Order of incoming BITS determined by vFromLSBFirst argument. The inverse of this function is BinaryStringFmVariant .
Function
EqvValues
Eqv Values
"Binary Equivalence" or "Binary Not Exclusive Or (XNOR)" Perform the logical "Eqv" (equivalence) operation on the corresponding bits from two values.
Function
FixUpBitwiseArguments
Fix Up Bitwise Arguments
Fix up the arguments to String values suitable for use with the bitwise functions that require two operands, and also determine the type of value that should be returned by the calling function.
Function
FlipBit
Flip Bit
Perform the logical "Not" operation on one of the bits within a value. Function uses the GetBit and SetBit functions; see them for details.
Function
GetBit
Get Bit
Get a bit from any type of value. Return True if the specified bit is on, or False if it is off. Bits range from 1 (one is the least-significant-bit) to the number of bits in the value.
Function
GetBitInStringFast
Get Bit In String Fast
Get a bit from a binary string. Bits range from 1 (one is the least-significant-bit) to the number of bits in the value.
Function
ImpValues
Imp Values
"Binary Implication" Perform the logical "Imp" (implication) operation on the corresponding bits from two values.
Function
NandValues
Nand Values
"Binary Not And" Perform the logical "Nand" ("Not And") operation on the corresponding bits from two values.
Function
NorValues
Nor Values
"Binary Not Or" Perform the logical "Nor" ("Not Or") operation on the corresponding bits from two values.
Function
NotValue
Not Value
Perform the logical "Not" operation on the corresponding bits of a value. Can be used for simple encoding and decoding of Strings.
Function
OrValues
Or Values
Perform the logical "Or" operation on the corresponding bits from two values.
Function
RotateLeft
Rotate Left
Rotate the bits to the left within any type of value, moving those bits in the most-significant-positions to the least-significant-positions.
Function
RotateRight
Rotate Right
Rotate the bits to the right within any type of value, moving those bits in the least-significant-positions to the most-significant-positions.
Function
SetBit
Set Bit
Set a bit within any type of value. Returns the argument unchanged if the bit to be set is not within range. Bits range from 1 (one is the least-significant-bit) to the number of bits in the value.
Function
SetBitInStringFast
Set Bit In String Fast
Set a bit within a binary string. Bits range from 1 (one is the least-significant-bit) to the number of bits in the value.
Function
ShiftLeft
Shift Left
Shift the bits to the left within any type of value, losing those bits in the most-significant-positions and filling the least-significant-bits with 0 (zero).
Function
ShiftRight
Shift Right
Shift the bits to the right within any type of value, losing those bits in the least-significant-positions and filling the most-significant-bits with 0 (zero).
Function
XorValues
Xor Values
"Binary Exclusive Or" Perform the logical "Xor" ("Exclusive Or") operation on the corresponding bits from two values.
Function
XorValuesAlt
Xor Values Alt
"Binary Exclusive Or Alternate" Perform the logical "Xor" ("Exclusive Or") operation on the corresponding bits from two values. Similar to the XorValues function except that this one performs the Xor operation four bytes at a time.
Function
BinaryStringToStringTest
Binary String To String Test
View VB6 signature, parameters, and usage notes.
Sub
BitwiseBenchmark
Bitwise Benchmark
View VB6 signature, parameters, and usage notes.
Sub
BitwiseMinAndMaxValuesVerify
Bitwise Min And Max Values Verify
View VB6 signature, parameters, and usage notes.
Sub
BitwiseTest
Bitwise Test
View VB6 signature, parameters, and usage notes.
Sub
XorValuesBenchmark
Xor Values Benchmark
View VB6 signature, parameters, and usage notes.
Sub