Converting characters to decimal to binary
As you can see from the title I need to convert whatever text is put in to decimal ascii, and then convert it to binary. I figured out how to convert the text to ascii but I'm not sure how to then convert the ascii to binary. I'm fairly new so I'm not really looking for anything too complicated. Any help is appreciated though.
So putting in asdf would output 97 115 100 102.
Scanner input = new Scanner(System.in);
String textString = "";
System.out.println("Enter an alpha-numeric string: ");
textString = input.nextLine();
for(int i = 0; i < textString.length(); i++)
I was told I should use another for loop inside the first one or something like that to convert the ascii but I don't really know how to go about actually converting the ascii.