Re: working with bits

Tech-Archive recommends: Speed Up your PC by fixing your registry



if the manipulation is easy to do there is a converter from decimal to binary

Public Function DecToBin(ByVal DecVal As Double) As String
Dim a As Double
a = DecVal
For b = 1 To Int(Log(DecVal) / Log(2)) + 1
DecToBin = CDbl(a Mod 2) & DecToBin
a = CDbl(Int(a / 2))
Next b
End Function


"s gall" <s@xxxxxxxxxx> wrote in message news:2E100867-0DB0-474C-ABEA-CA734359DEC0@xxxxxxxxxxxxxxxx
Hi all
I have a task to test a checksum algrorithum. This requires changing a string of 12 chr's to a stream of 96 bits and then manipulating these. Currently I work in vb (vb2008). Would it be better for me to use another language (say vc++) and build a DLL to do the bit manipulating or does vb.net have some way of working with bits.

Stephen

.



Relevant Pages

  • Re: working with bits
    ... VB supports the standard bitwise operations Or, And, Not and XOr as well as ... One thing to be aware of, there is no type character for byte, so for constants you have to write CByteor similar. ... This requires changing a string of 12 chr's to a stream of 96 bits and then manipulating these. ... Would it be better for me to use another language and build a DLL to do the bit manipulating or does vb.net have some way of working with bits. ...
    (microsoft.public.dotnet.languages.vb)
  • String Manipulation Functions - Crosswalk to FoxPro/xBase function
    ... manipulating text strings? ... of ACCESS SQL functions that correspond to the string (and ... of text string within text string. ... that would be nice to find would be the equivalent of the xBase function ...
    (microsoft.public.access.modulesdaovba)
  • Re: DateSerial Problem
    ... The problem could be due to String() being a function name. ... Could use use CDate() instead of parsing and manipulating with DateSerial, ...
    (microsoft.public.access.queries)
  • Re: ca65 and macros
    ... manipulating the high bit: ... ..macro asc Arg ... Define an ASCII string with the inverse attribute ...
    (comp.sys.apple2.programmer)
  • Waiting for Frames to be Ready in an InternetExplorer object
    ... I am manipulating an InternetExplorer object programmatically with the ... Dim IE As InternetExplorer ... Dim oDoc1 As MSHTML.HTMLDocument 'for Document objects ... Set MyWindow = oFrameC1.Item ...
    (microsoft.public.vb.general.discussion)