Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

How To Create A Program That Converts Text To Binary In Visual Basic 2008

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
35,818
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 15, 2009

Visual Basic 2008 - Text To Binary And Binary To Text Application. I was bored, so i made a tutorial on a converter that converts text to those 0's and 1's and convert those 0's and 1's to text, and it is not encryption software, a computer runs on 0's and 1's

Text To Binary:
Dim Val As String = Nothing
Dim Result As New System.Text.StringBuilder
For Each Character As Byte In System.Text.ASCIIEncoding.ASCII.GetBytes(TextBox1.Text)
Result.Append(Convert.ToString(Character, 2).PadLeft(8, "0"))
Result.Append(" ")
Next
Val = Result.ToString.Substring(0, Result.ToString.Length - 1)
TextBox2.Text = Val

Binary To Text:
Dim Val As String = Nothing
Dim Characters As String = System.Text.RegularExpressions.Regex.Replace(TextBox1.Text, "[^01]", "")
Dim ByteArray((Characters.Length / 8) - 1) As Byte
For Index As Integer = 0 To ByteArray.Length - 1
ByteArray(Index) = Convert.ToByte(Characters.Substring(Index * 8, 8), 2)
Next
Val = System.Text.ASCIIEncoding.ASCII.GetString(ByteArray)
TextBox2.Text = Val

Thanks for watching, and thanks to AeonHack for help.

  • likes, 5 dislikes

Link to this comment:

Share to:

Top Comments

  • Just remove the ' - ' at the codes to get it work

  • 01110111 01101000 01101111 00100000 01100101 01110110 01100101 01110010 00100000 01110010 01100101 01100001 01100100 01110011 00100000 01110100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100110 01110101 01100011 01101011 01100101 01100100 00100000 01110101 01110000 00100001 00100001 00100001

see all

All Comments (331)

Sign In or Sign Up now to post a comment!
  • 01001011 01101001 01110100

    

  • @yousmelllykpiss 01101100 01101111 01101100 00100000 01110011 01100001 01101101 01100101 00100000 01101000 01100101 01110010 01100101

  • 01110100 01101000 01100001 01101110 01101011 01111001 01101111 01110101 00100000 01100011 01101111 01110101 01101100 01100100 01101001 01101110 01110100 00100000 01101000 01100001 01110110 01100101 00100000 01100100 01101111 01101110 01100101 00100000 01101001 01110100 00100000 01110111 01101001 01110100 01101000 01101111 01110101 01110100 00100000 01111001 01101111 01110101

  • 01000110 01101001 01101110 01100001 01101100 01101100 01111001 00100000 01001001 01110100 00100000 01010111 01101111 01110010 01101011 01110011 00101100 01100100 01101111 01101110 01110100 00100000 01110100 01100001 01101011 01100101 00100000 01101111 01110101 01110100 00100000 00100010 00101101 00100010

  • Val = Result.ToString.Substring(0, Result.ToString.Length - 1)

    wtf.. << not working cause "Cannot type more than 1 digit"

  • 01110100 01101000 01100001 01101110 01101011 01110011 00100000 01100110 01101111 01110010 00100000 01110100 01101000 01101001 01110011 00100000 01100111 01110010 01100101 01100001 01110100 00100000 01110100 01110101 01110100 01101111 01110010 01101001 01100001 01101100

  • Where can you download the program? I found this on a page so I don't have the program.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more