For wireless communication you need Manchester coding. Manchester code provides simple encoding with no long period without a level transition. This helps clock recovery.
Here ‘s is a simple sample for a transmitter and receiver written in Bascom-avr.
1 will be coded as 01
0 will be coded as 10
00 and 11 are invalid
For the receiving part in VB6 check here .

Declare Function Make_manchester(byval Temp As Byte) As Word
Declare Function Decode_manchester(byval Tempw As Word ) As Byte



'== Demo prog ==
Dim Lus As Byte
Do
For Lus = 0 To 255
   Tempword = Make_manchester(lus)
   Print Decode_manchester(tempword)
Next Lus
Loop
End

 

'Subroutines
Sub Make_manchester(byval Temp As Byte) As Word
Local Bit_number As Byte
Local Manchester As Word
Bit_number = 8
Do
Shift Manchester , Left , 2
Decr Bit_number
If Temp.bit_number = 1 Then
Manchester = Manchester + 1                                 '01
Else
Manchester = Manchester + 2                                 '10
End If
Loop Until Bit_number = 0
Make_manchester = Manchester
End Sub


Sub Decode_manchester(byval Tempw As Word ) As Byte
Local Bit_number As Byte
Local Manchester As Word
Bit_number = 8
Do
Shift Manchester , Left , 1
Decr Bit_number
Temp_1 = Tempw And &B1100_0000_0000_0000
If Temp_1 = &B0100_0000_0000_0000 Then Incr Manchester      '01
If Temp_1 = &B1100_0000_0000_0000 Or Temp_1 = 0 Then Set Data_error       '11 or 00
Shift Tempw , Left , 2
Loop Until Bit_number = 0
If Data_error = 0 Then
   Decode_manchester = Manchester
Else
   Decode_manchester = 0
End If
Reset Data_error
End Sub