Results 1 to 3 of 3
  1. #1
    Krooger is offline Member
    Join Date
    Nov 2008
    Posts
    43
    Rep Power
    0

    Question Char to Bit String

    Hello, I cannot figure out how to do the following in java...

    Lets say I have a char 'z'
    I need to know its bit pattern and be able to check the value of any bit
    I haven't been able to find a way to do this in java even though it seem simple.

    So 'z' is 01111010
    I need to find this preferably as a string then I will be able to easily check any bit I want.

    Any Ideas? Thank You

  2. #2
    collin389 is offline Senior Member
    Join Date
    Nov 2009
    Posts
    235
    Rep Power
    6

    Default

    String z = Integer.toBinaryString((int)'z');

  3. #3
    Krooger is offline Member
    Join Date
    Nov 2008
    Posts
    43
    Rep Power
    0

Similar Threads

  1. Replacing char in string help
    By jimmy-lin in forum New To Java
    Replies: 3
    Last Post: 10-12-2009, 07:01 AM
  2. char to string
    By kian_hong2000 in forum New To Java
    Replies: 2
    Last Post: 08-25-2008, 02:51 PM
  3. Assigning a string value to a char
    By coffeebean in forum New To Java
    Replies: 4
    Last Post: 06-15-2008, 07:30 AM
  4. Char to String in java
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 02:42 PM
  5. Help with, String, Char
    By lenny in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 03:58 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
  •