Sunday , December 11 2016
Home / Blue J / Java program for binary to decimal conversion

Java program for binary to decimal conversion

This is a java program to convert a binary number to decimal number:
Where the concept is quite simple to do so-
Step 1: extract digits from last   (using number%10) and then making number = number/10;
Step 2: Digit * 2place value of digit
Multiplying the digits from last with the 2 to the power of position of the digit (place value):
Step 3: As seen above adding the each multiplication of Digit * 2place value of digit
Example:  1101 = 2 * 1 + 21 * 0 + 22 * 1 + 23 * 1 = 13.

ALSO CHECK: c program for binary to decimal conversion

OUTPUT:

Java program for binary to decimal conversion
Output: Program for binary to decimal

Below is the video tutorial for java program to convert binary to decimal

For any of the doubts related to this program leave the comment below we will help you to get the exact solution of it.

Tags: Java program for binary to decimal conversion.

Also See:   Static keyword in java

Check Also

Program for Matrix Multiplication in JAVA

Matrix Multiplication:– Here is given a Java Program for Matrix Multiplication also call matrix product. In ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.