BitStringConverter Class
Description
The BitStringConverter class contains shared functions that allow you to convert some of the value types to or from a String of 0s and 1s representing the bits.
Example
GetBits(value As SByte)
GetBits(value As Byte)
GetBits(value As Short)
GetBits(value As UShort)
GetBits(value As Integer)
GetBits(value As UInteger)
GetBits(value As Long)
GetBits(value As ULong)
GetBits(value As Double)
GetBits(value As Single)
GetBits(value As Char)
GetBits(value As Boolean)
BitsToSByte(bits As String)
BitsToByte(bits As String)
BitsToShort(bits As String)
BitsToUShort(bits As String)
BitsToInteger(bits As String)
BitsToUInteger(bits As String)
BitsToLong(bits As String)
BitsToULong(bits As String)
BitsToDouble(bits As String)
BitsToSingle(bits As String)
BitsToChar(bits As String)
BitsToBoolean(bits As String)
Properties & Methods
Converting to a Bit String
GetBits(value As SByte)
GetBits(value As Byte)
GetBits(value As Short)
GetBits(value As UShort)
GetBits(value As Integer)
GetBits(value As UInteger)
GetBits(value As Long)
GetBits(value As ULong)
GetBits(value As Double)
GetBits(value As Single)
GetBits(value As Char)
GetBits(value As Boolean)
Converting from a Bit String
BitsToSByte(bits As String)
BitsToByte(bits As String)
BitsToShort(bits As String)
BitsToUShort(bits As String)
BitsToInteger(bits As String)
BitsToUInteger(bits As String)
BitsToLong(bits As String)
BitsToULong(bits As String)
BitsToDouble(bits As String)
BitsToSingle(bits As String)
BitsToChar(bits As String)
BitsToBoolean(bits As String)
Source Code
BitStringConverter.vb:

Remarks
Although not the most useful or complex class in the world, BitStringConverter may sometimes be useful when writing code that involves hardware communication or an encryption algorithm (I don't normally write either of those types of code, so I could be wrong), but either way, it never hurts to have a few more utilities available.