Tool to make binary conversions. Binary code is a numeric system using base 2 used in informatics/computers code.
Binary Code - dCode
Tag(s) : Arithmetics, Character Encoding
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The binary is often used to encode text in ASCII, use the dedicated page to translate binary into text (and vice versa):
The binary system is a base-2 positional notation system, meaning it's a way of writing numbers using only two digits.
These digits are called bits (for binary digit) and take only the values 0 and 1.
To convert a number $ N $ to binary (format with zeros and ones) consists in an arithmetic base conversion from base 10 (decimal base noted $ N_{(10)} $) to base 2 (natural binary code noted $ N_{(2)} $).
Example: $ 5_{(10)} = 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 101_{(2)} $
The method consists in making successive divisions by $ 2 $ and noting the remainder ($ 0 $ or $ 1 $) in the reverse order.
Example: With the number 6: $ 6/2 = 3 $ remains $ 0 $, then $ 3/2 = 1 $ remains $ 1 $, then $ 1/2 = 0 $ remains $ 1 $. The successive remainders are $ 0,1,1 $ so $ 6_{(10)} $ is written $ 110_{(2)} $ in binary.
NB: A number in binary is a sequence of bits in a sequence, where each position has a value which is a power of 2.
Converting text to binary involves associating each character with a number according to a coding table, such as A1Z26 or ASCII. Each number is then converted into binary.
Example: AZ is 65,90 (ASCII code) so 1000001,1011010 in binary
To perform the reverse operation, convert each sequence of bits into a number, then associate that number with the corresponding character in the chosen encoding table.
Converting a binary number involves changing the base from base 2 to base 10. Each bit is multiplied by the power of 2 corresponding to its position.
Example: $ 111_{(2)} = 1 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 7_{(10)} $
Binary allows us to represent all numbers. By defining a lookup table between objects (letters, symbols, colors, sounds) and numbers, it becomes possible to encode any information in binary.
The most common encoding in computing is ASCII, where A=65, B=66, etc.
Other encodings exist, such as A1Z26 (A=1, Z=26).
Every digital encoding has a binary representation.
The term binary language is inaccurate. There is no language or formal language called binary language. In computer science, programming languages are translated into machine language, which consists of numerical instructions. These numbers can be represented in binary, which explains the common use of this expression.
A bit (short for binary digit) is the smallest unit of information in computing with two values: 0 or 1.
In computing, memory is finite. Numbers are stored in fixed-size locations, defined by a number of $ N $ bits.
This choice limits the representable values and influences performance and memory consumption.
The number of bits needed depends on the maximum value to be represented. With $ n $ bits, it is possible to encode numbers from $ 0 $ to $ 2^n - 1 $.
Here are the min-max intervals:
| 0-1 | 1 |
| 2-3 | 2 |
| 4-7 | 3 |
| 8-15 | 4 |
| 16-31 | 5 |
| 32-63 | 6 |
| 64-127 | 7 |
| 128-255 | 8 |
| 256-511 | 9 |
| 512-1023 | 10 |
| 1024-2047 | 11 |
| 2048-4095 | 12 |
| 2^(n-1) - (2^n)-1 | n |
For a number written in the form bbbb.bbb, each bit after the decimal point represents a negative power of 2 ($ 2^{-1}, 2^{-2}, \dots $), so use the dCode base-N conversion tool.
For numbers stored according to the IEEE 754 standard, refer to the specific format structure (sign, exponent, mantissa).
There are 10 kinds of people in the world, those that understand binary, and those that don't!
10 in binary equals 2 in decimal.
dCode retains ownership of the "Binary Code" source code. Any algorithm for the "Binary Code" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Binary Code" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Binary Code" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Binary Code" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Binary Code on dCode.fr [online website], retrieved on 2026-02-05,