First value · other representations
Numbers & representations
How it works
These are different representations. Gray code changes one bit between adjacent nonnegative integers. BCD stores each decimal digit in four bits. Negabinary uses powers of −2 and can represent negative values without a minus sign.
What you can do
Choose source and target formats and convert one value per line. Spaces between Gray, BCD and negabinary bits are allowed. The first result also shows related representations for comparison.
How to use it
- Choose the source and target codes. For decimal 12 to BCD 0001 0010, select Decimal and 8421 BCD.
- Paste one value per line or open a UTF-8 text file.
- Select Convert, inspect the result, then copy or download TXT. Changes clear old results. Undo restores your previous input and settings.
Errors and limits
Gray and BCD encode nonnegative values only. BCD must contain complete four-bit groups from 0000 to 1001. Negabinary accepts only 0 and 1. Ordinary binary uses signed magnitude for negative numbers, not a fixed-width word.
Limits: 200,000 input characters, 500 values and 1,000,000 output characters. The entire batch stops on an invalid line.
Each numeric input accepts at most 1,000 digits. Intermediate integer arithmetic is bounded to 16,384 bits.
Frequently asked questions
Is BCD the same as binary?
No. Decimal 12 is binary 1100, but BCD 0001 0010 because 1 and 2 are encoded separately. A BCD group 1010 is invalid even though it is a valid binary integer.
Are my values uploaded?
No. Processing and file reading happen in this browser tab. Values are not placed into URLs or sent to a conversion service. Downloaded files remain under your control.