Decimal to Binary Converter Online Tool

Decimal Number10

Binary Number2

Hex Number16

Octal Number8

About Decimal to Binary Converter Online Tool:

This online decimal to binary converter tool helps you to convert one input decimal number (base 10) into a binary number (base 2).

Decimal Numeral System:

Decimal numeral system (also called Hindu-Arabic, or Arabic) has 10 digits, include (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), it's the most used number system in our daily life. Decimal numeral system is also one of the most ancient number system, it's inspired by 10 fingers of human.

Binary Numeral System:

Binary numeral system has 2 digits, include (0, 1). Four binary digits can be represented by 1 hexadecimal digits, and three binary digits can be represented by one octal digits. Binary is the numeral system that most close to electronic circuit hardware.

comic decimal to binary

How to convert from decimal to binary?

  1. Step 1: Divide the decimal number by 2, get the integer quotient and the remainder.

  2. Step 2: Convert the remainder to the binary digit in that position.

  3. Step 3: Using the integer quotient to repeat the steps until the integer quotient equals to 0.

Example: Convert decimal number "13" to binary (result is "1101"):

Repeat Division Integer Quotient Remainder (decimal) Remainder (binary) Digit Position
13/2 6 1 1 0
6/2 3 0 0 1
3/2 1 1 1 2
1/2 0 1 1 3

Decimal to Binary conversion table:

Decimal Binary Decimal Binary
1 1 21 10101
2 10 22 10110
11 3 23 10111
4 100 24 11000
5 101 25 11001
6 110 26 11010
7 111 27 11011
8 1000 28 11100
9 1001 29 11101
10 1010 30 11110
11 1011 31 11111
12 1100 32 100000
13 1101 33 100001
14 1110 34 100010
15 1111 35 100011
16 10000 36 100100
17 10001 37 100101
18 10010 38 100110
19 10011 39 100111
20 10100 40 101000

More information:

Wikipedia (Binary): https://en.wikipedia.org/wiki/Binary_number

Wikipedia (Decimal): https://en.wikipedia.org/wiki/Decimal

Convert Decimal to Binary with Python:

def decimal_to_binary(decimal_str):
    decimal_number = int(decimal_str, 10)
    binary_number = bin(decimal_number)
    return binary_number


decimal_input = '2014'
binary_output = decimal_to_binary(decimal_input)
print('binary result is:{0}'.format(binary_output))

-------------------
binary result is:0b11111011110

Convert Decimal to Binary with Java:

public class NumberConvertManager {
    public static String decimal_to_binary(String decimal_str) {
        return Integer.toBinaryString(Integer.parseInt(decimal_str));
    }

    public static void main(String[] args) {
        String decimal_input = "2014";
        String binary_output = decimal_to_binary(decimal_input);
        System.out.println("binary result is:" + binary_output);
    }
}

-------------------
binary result is:11111011110