Re: working with bits
- From: "Bill McCarthy" <Bill@xxxxxxxxxxxxx>
- Date: Mon, 18 Aug 2008 01:19:05 +1000
Hi Stephen,
VB supports the standard bitwise operations Or, And, Not and XOr as well as bit shifting >> for right shift, and << for left shift.
One thing to be aware of, there is no type character for byte, so for constants you have to write CByte(&HFF) or similar.
You can get the string into an array of bytes like so:
Dim b(0 To 7) As Byte
For i As Int32 = 0 To 7
b(i) = CByte(Asc(keyString(i)) And &H80)
Next
"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
.
- References:
- working with bits
- From: s gall
- working with bits
- Prev by Date: Re: Command Line Arguments like VB6 IDE
- Next by Date: Re: char[4] data type in c for storing IPs - VB.NET equivalence
- Previous by thread: Re: working with bits
- Next by thread: From C to VB.NET (Part III) (Background image in TextBox)
- Index(es):
Relevant Pages
|