Results 1 to 4 of 4
  1. #1
    jasmeet is offline Member
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default How to convert Binary

    Quote Originally Posted by Eranga View Post
    Yeah, step down your problem first of all and solve them step by step. I think you get enough comments on conversion you want. If you go through them carefully it's possible to find the solution. So give a try from the first step and let us know if you stuck with any. Your effort make a real change lol.
    Hi, I would just like to add another query in this thread.
    What would be the algorithm to convert Base 2 values without a space to their actual characters?
    Example: Input Base 2(ascii) : 01001001001000000110110001101001011010110110010100 10000001001010010000010101011001000001
    Output : I like JAVA

    How it would take 8 bits (or 16 bits) at a time and convert it to corresponding character?

    Thanks!

    What would be the algorithm to convert Base 2 to their actual characters?
    Example: Input Base 2 : 01001001001000000110110001101001011010110110010100 10000001001010010000010101011001000001
    Output : I like JAVA

    How it would take 8 bits (or 16 bits) at a time and convert it to corresponding character?

    Thanks!
    Last edited by Norm; 11-18-2013 at 12:19 AM. Reason: Duplicate post

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: decode binary to characters

    How it would take 8 bits (or 16 bits) at a time
    Is the input a String of "0" and "1" characters representing bits? The substring() method can get the characters in any sized String that you want. Then the Integer class has methods for converting Strings to numbers.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    jasmeet is offline Member
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default How to convert Binary to Character

    What would be the algorithm to convert Base 2 to their actual characters?
    Example: Input Base 2 : 01001001001000000110110001101001011010110110010100 10000001001010010000010101011001000001
    Output : I like JAVA

    How it would take 8 bits (or 16 bits) at a time and convert it to corresponding character?

    Thanks!

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: decode binary to characters

    Why post the this 3 times?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 10
    Last Post: 10-03-2013, 11:51 AM
  2. Converting characters to decimal to binary
    By Majeh in forum New To Java
    Replies: 4
    Last Post: 02-04-2011, 11:06 PM
  3. Decode Binary Packet via TCP Socket
    By maxice in forum Networking
    Replies: 1
    Last Post: 11-09-2010, 02:54 PM
  4. decode binary to characters
    By greg677 in forum New To Java
    Replies: 11
    Last Post: 04-17-2010, 03:48 PM
  5. allowable characters from URLDecoder.decode(String
    By Nicholas Jordan in forum Networking
    Replies: 4
    Last Post: 10-18-2008, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •