Results 1 to 3 of 3
  1. #1
    Olive is offline Member
    Join Date
    Sep 2014
    Posts
    2
    Rep Power
    0

    Default converting binary to integer

    I am new to java and programming in general. I figured out how to convert an integer input to binary however I am having issues doing the opposite of converting a user input binary number to a decimal.

    I need to do this with basic math (or string depending on how I represent the binary) and no functions.

    I know how to convert binary to integer on paper but I am having a hard time working it out in java.

    Any help would be greatly appreciated!

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

    Default Re: converting binary to integer

    Are you trying to convert a String of binary digits to a String of decimal digits? or to an int?
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Olive is offline Member
    Join Date
    Sep 2014
    Posts
    2
    Rep Power
    0

    Default Re: converting binary to integer

    It is sort of up to me how I want to represent the binary part of it, however I did end up figuring out how to get it worked. I converted a string of binary digits to an int of decimal digits.

    Thanks!

Similar Threads

  1. Converting Binary
    By Wizard0860 in forum New To Java
    Replies: 2
    Last Post: 03-20-2013, 11:04 PM
  2. Converting string to integer
    By Thibisan in forum New To Java
    Replies: 5
    Last Post: 05-18-2012, 11:10 AM
  3. Converting J001 to integer
    By jaylimix in forum New To Java
    Replies: 4
    Last Post: 12-15-2011, 11:08 PM
  4. Replies: 1
    Last Post: 11-01-2011, 05:35 PM
  5. Converting an integer into a BigInteger
    By mzjazzygirl in forum New To Java
    Replies: 27
    Last Post: 09-23-2010, 06:37 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
  •