DATA FORMATS · TOD & FRD

PLC BCD to Decimal, Hex & Binary Converter

Simulate PLC FRD (From BCD) and TOD (To BCD) instructions across 16-bit INT and 32-bit DINT words with per-nibble fault checking.

FRD Source (BCD Register Hex)

Enter the raw hex pattern stored in your BCD thumbwheel input word (e.g., 2489 or test invalid 2A89)

Decoded Decimal Integer (FRD Destination)
2,489
Raw Binary Register Integer (without FRD): 9353 signed / 9353 unsigned
4-Bit BCD Nibble Breakdown (MSB → LSB)
Digit 3 (10^3)
2
0010
Digit 2 (10^2)
4
0100
Digit 1 (10^1)
8
1000
Digit 0 (10^0)
9
1001

Valid 4-Bit BCD Nibble Table (0–9)

0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001

Frequently Asked Questions

How does Binary-Coded Decimal (BCD) differ from standard hexadecimal or binary?+

In standard binary, a 16-bit unsigned word represents 0–65535 using all nibble combinations 0–F. In 16-bit BCD, each 4-bit nibble represents strictly one decimal digit (0–9, binary 0000–1001), giving a range of 0000 to 9999.

What happens if a PLC FRD (From BCD) instruction encounters hex digits A through F?+

In Allen-Bradley RSLogix 500 and Studio 5000, bit patterns 1010 (A) through 1111 (F) are illegal in BCD. Executing FRD on a word containing A–F triggers an arithmetic overflow / minor fault unless masked out first with an MVM instruction.

Why are MVM and FRD almost always paired together on BCD thumbwheel inputs?+

A 3-digit BCD thumbwheel uses only 12 bits (bits 0–11) of a 16-bit discrete input card, while bits 12–15 might wire to pushbuttons. Engineers execute MVM with mask 0FFFh first to isolate the 3 thumbwheel nibbles, then pass the clean word into FRD.

Where else is BCD still common in industrial PLCs?+

Beyond panel thumbwheels and 7-segment LED displays, Siemens S7 legacy S5TIME presets, Omron C-series timers/counters, and Koyo/AutomationDirect DirectLOGIC math instructions rely heavily on 4-digit and 8-digit BCD registers.

12 Free Browser-Based Engineering Utilities

Complete PLC & Industrial Automation Calculator Suite