Search for a tool
Binary Coded Decimal (BCD)

Tools to code/decode in BCD. BCD (binary coded decimal) is a numeration system used in electronics and computer systems to code decimal numbers on 4 bits (in binary).

Results

Binary Coded Decimal (BCD) -

Tag(s) : Electronics

Share dCode and you

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!

Team dCode likes feedback and relevant comments; to get an answer give an email (not published). It is thanks to you that dCode has the best Binary Coded Decimal (BCD) tool. Thank you.

# Binary Coded Decimal (BCD)

## DBC Encoder/Converter

Tools to code/decode in BCD. BCD (binary coded decimal) is a numeration system used in electronics and computer systems to code decimal numbers on 4 bits (in binary).

### How to encrypt using BCD coding

BCD (binary coded decimal) encoding replaces directly digits 0, 1, 2, ..., 9 by their binary values 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000 and 1001 (all with 4 bits)

Example: To code 123, replace 1 by 0001, 2 by 0010 and 3 by 0011, so 123 is coded 0001 0010 0011 in BCD

### How to decrypt BCD coding

BCD conversion replaces each 4-bit group by its corresponding digit

Example: 0001 0010 0011 is decoded 1,2,3

### How to recognize an BCD ciphertext?

The message has a length multiple of 4 and non of the 4-bits group can contain 1111.

### How to write a negative number?

Some systems uses 1100 for + and 1101 for -

Example: -5 is then written 1101 0101

### How to write a non-integer number?

It is possible to use 1100,1101 or 1110 for the decimal dot, bu more often the position of the decimal dot is fixed a priori.

Example: For example, id the dot is in 2nd position, 123 will be read 1.23.

### What is BCD purpose?

BCD is often used in electronics, for storing or displaying numeric values. Conversion is easy, does not need a processor and is similar to peripherals such as 7-segment displays.

Another example is the storing of Dates in a BIOS of a motherboard, still today in BCD.

### What are BCD values non used in decimal representations?

Unused values are 1010, 1011, 1100, 1101, 1110, 1111

### When BCD have been invented?

The first uses of the BCD date from a period between 1950 and 1960

## Source code

dCode retains ownership of the source code of the script Binary Coded Decimal (BCD) online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be released for free. To download the online Binary Coded Decimal (BCD) script for offline use on PC, iPhone or Android, ask for price quote on contact page !