Bitwise Class

Entisoft Tools 2.0 Object Library
Version 2.0.6 Released 1999/11/14 03:27
<-- Previous || Index || Main || Topics || Next -->

Declarations Section, FixUpBitwiseArguments Function, BinaryStringFmString Function, BinaryStringFmVariant Function, BinaryStringToString Function, BinaryStringToStringTest Sub, BinaryStringToVariant Function, GetBit Function, GetBitInStringFast Function, SetBit Function, SetBitInStringFast Function, FlipBit Function, AndValues Function, EqvValues Function, ImpValues Function, NandValues Function, NorValues Function, NotValue Function, OrValues Function, XorValues Function, XorValuesBenchmark Sub, XorValuesAlt Function, ArithmeticShiftRight Function, RotateLeft Function, RotateRight Function, ShiftLeft Function, ShiftRight Function, BitwiseBenchmark Sub, BitwiseMinAndMaxValuesVerify Sub, BitwiseTest Sub

Declarations Section
Fix Up Bitwise Arguments Function
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.
Binary String Fm String Function
"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.
Binary String Fm Variant Function
"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.
Binary String To String Function
"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.
Binary String To String Test Sub
Test of the BinaryStringToString function.
Binary String To Variant Function
"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.
Get Bit Function
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.
Get Bit In String Fast Function
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.
Set Bit Function
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.
Set Bit In String Fast Function
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.
Flip Bit Function
Perform the logical "Not" operation on one of the bits within a value. Function uses the GetBit and SetBit functions; see them for details.
And Values Function
Perform the logical "And" operation on the corresponding bits from two values.
Eqv Values Function
"Binary Equivalence" or "Binary Not Exclusive Or (XNOR)" Perform the logical "Eqv" (equivalence) operation on the corresponding bits from two values.
Imp Values Function
"Binary Implication" Perform the logical "Imp" (implication) operation on the corresponding bits from two values.
Nand Values Function
"Binary Not And" Perform the logical "Nand" ("Not And") operation on the corresponding bits from two values.
Nor Values Function
"Binary Not Or" Perform the logical "Nor" ("Not Or") operation on the corresponding bits from two values.
Not Value Function
Perform the logical "Not" operation on the corresponding bits of a value. Can be used for simple encoding and decoding of Strings.
Or Values Function
Perform the logical "Or" operation on the corresponding bits from two values.
Xor Values Function
"Binary Exclusive Or" Perform the logical "Xor" ("Exclusive Or") operation on the corresponding bits from two values.
Xor Values Benchmark Sub
Benchmark of the XorValues function.
Xor Values Alt Function
"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.
Arithmetic Shift Right Function
Perform the arithmetic shift right (ASR) operation on any type of value.
Rotate Left Function
Rotate the bits to the left within any type of value, moving those bits in the most-significant-positions to the least-significant-positions.
Rotate Right Function
Rotate the bits to the right within any type of value, moving those bits in the least-significant-positions to the most-significant-positions.
Shift Left Function
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).
Shift Right Function
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).
Bitwise Benchmark Sub
Perform a benchmark of the bitwise binary functions.
Bitwise Min And Max Values Verify Sub
"Binary Minimum And Maximum Values Verify" Determines the min. and max. values returned by the built-in bitwise operators when given operands in the range 0, 1, ..., 255.
Bitwise Test Sub
Perform a simple test of some of the bitwise binary functions.

This Windows-based ActiveX DLL provides many useful routines through its function-bearing and data structure classes. Consult the Help file for more information, or call us at 1-310-472-3736. For the latest news and files, visit our home page on the World Wide Web: http://www.entisoft.com

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.