By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,870 Members | 2,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,870 IT Pros & Developers. It's quick & easy.

conversion

P: n/a
Is it possible to convert a hex/ascii string to binary?

ie.
Dim s As String
s = "AA"

output = Hex2Bin(s) '10101010

also is there a bin to hex conversion function?
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Try Convert.ToByte(), such as:

Dim s As String

s = "AA"

Dim b As Byte

b = Convert.ToByte(s, 16)

"Aaron" <ku*****@yahoo.com> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
Is it possible to convert a hex/ascii string to binary?

ie.
Dim s As String
s = "AA"

output = Hex2Bin(s) '10101010

also is there a bin to hex conversion function?

Jul 21 '05 #2

P: n/a
The System.Collections.BitArray class takes an array of bytes in its
constructor and gives you the binary representation.

Yves

"Aaron" <ku*****@yahoo.com> schreef in bericht
news:OA**************@TK2MSFTNGP11.phx.gbl...
Is it possible to convert a hex/ascii string to binary?

ie.
Dim s As String
s = "AA"

output = Hex2Bin(s) '10101010

also is there a bin to hex conversion function?

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.