[ Home ] [ Disclaimer ] [ About ]
Online Binary-Decimal Converter
This converter allows you to convert numbers from decimal format to binary format and from binary format to decimal format. It supports the main variable data types used in most programming languages. It also floating point numbers (single and double precision) according to the standard IEEE754. Supported types are shown in the following table:
Unsigned char 8 0 255 Integer
Signed char 8 -128 127 Integer
Unsigned short 16 0 65535 Integer
Signed short 16 -32768 32767 Integer
Unsigned int 32 0 4294967295 Integer
Signed int 32 -2147483648 2147483647 Integer
Float (IEEE754) 32 -3.4028E+38 3.4028E+38 Real number
Double (IEEE754) 64 -1.7977E+308 1.7977E+308 Real number
How to convert from decimal to binary?
Enter the number in decimal form in the corresponding field. For floating-point numbers, the following formats are valid:

Click on the convert to binary button or press enter. This button is made available when focus leaves the decimal field.
The result is shown on the next page both in hexadecimal and in binary. Each bits is represented by a square (green = 1, gray = 0). The closest decimal value that can be represented by this binary expression is also shown in the field "Most accurate representation".
How to convert from binary to decimal?
Enter the number in hexadecimal form or in binary form in the corresponding field.
Each square corresponds to a bit in the binary representation of the number.
A bit can be toggled by clicking on the corresponding square.
Click on the convert to decimal button or press enter twice (the first enter will only refresh the other fields if changes were made). This button is made available when focus leaves the binary or hexadecimal fields (or if enter was pressed once).
The decimal value is shown. For display purpose, the number of figures is limited to 30. However, all computations are performed with full precision without any rounding.

Copyright © 2009- François Grondin. All Rights Reserved.