Ciao!!
Nel namespace System.Text, c'è la classe ASCIIEncoding e una proprietà ASCII.
La proprietà ASCII contiene il metodo GetBytes(), che, prende una stringa come parametro e restituisce i rispettivi bytes.
Poi c'è il metodo che GetString(), che fa il contrario prende come parametro un array di bytes e l'equivalente ASCII sotto forma di string.
Ha scritto binario. Forse intende in notazione binaria. Potresti quindi usare questa funzione che converte un numero byte in binario:
Function ToBin(B As Byte) As String
Dim S As String
For I As Int16 = 7 To 0 Step -1
If B >= (2 ^ I) Then
B -= 2 ^ I
S += "1"
Else
S += "0"
End If
Next
End Function
Function ToByte(Bin As String) As Byte
Dim B As Byte
For I As Byte = 0 To 7
B += Val(Bin.Chars(I)) * 2 ^ (7 - I)
Next
End Function