# Java Binary Number Multipllier Online   In Java How to convert from Binary to Decimal? At the same time, How to convert from Decimal to Binary?

Well, this is another most common interview questions you may hear during interview process.

In this tutorial we will go over steps on how to convert number from Binary to Decimal and vice versa.

### What is Binary number?

Have you seen movie Matrix?

Well, you must have remembered a screen with . Well, Binary number is a representation of decimal number in the form of 0 and 1. ### What is Decimal number?

Decimal number is also called .

Also, we used it in our everyday life. and all other numbers are based on these 10 numbers.

### Let’s write Java program to convert number from and

Here is a logic:

1. Create java class CrunchifyBinaryDecimal.java.
2. Create 3 different crunchifyGenerateBinaryNumbers() and convertBinaryToDecimal().

Name explains the purpose of both methods.

3. From main() – we will call method () to start process.

## Java Program to Multiply Binary Numbers

1. This method will start for loop with number 10
2. We will convert first 10 decimal numbers to Binary
3. Immediately after that program will call () to convert number back from Binary to Decimal
4. We will print result on Eclipse console during this process.

### Here is a Eclipse console result

As you see below in Eclipse console result, we have first converted Decimal to Binary and then Binary to Decimal.

Hope you get complete idea on how to convert numbers from Binary to Decimal and Decimal to Binary.

Let me know if you have any questions.

#### Join the Discussion 