Skip to content

Instantly share code, notes, and snippets.

@Alkimisti
Created March 1, 2021 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alkimisti/ec6c2bc282445842f13575b6aae7f0cf to your computer and use it in GitHub Desktop.
Save Alkimisti/ec6c2bc282445842f13575b6aae7f0cf to your computer and use it in GitHub Desktop.
public class Binary2Decimal {
public static void main(String[] args) {
String bin = "10101110";
int dec = Integer.parseInt(bin, 2);
System.out.println(dec);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment