This question is derived from my previous SO question’s commends.
I am confused with PLC’s interpretation of BCD and decimal.
In a PLC documentation, it somehow implies BCD = decimal:

The instruction reads the content of D300, 0100, as BCD. Referring to Cyber Slueth Omega’s answer and online BCD-Hex converter, 0100 (BCD) = 4 (Decimal) = 4 (Hex), but the documentation indicates 0100 (BCD) = 100 (Decimal).
Why?
The only difference is in how you decide to interpret the numbers. Some PLC instructions will take a piece of word memory and will tell you that “I, the TIM instruction, promise to treat the raw data in D300 as BCD data”. It is still HEX data, but it interprets it differently.
If D300 = [x2486] –> the timer (as example) will wait 248.6 seconds. This even though HEX 2486 = 9350 decimal. You can treat hex data as anything. If you treat hex data as encoded BCD you get one answer. If you treat it as a plain unsigned binary number you get another, etc.
If D300 = [x1A3D] –> TIM will throw an error flag because D300 contains non-BCD hex digits
Further, the above example is showing HEX digits – not BINARY digits. It is confusing because they chose [x0100] as their example – only zeroes and ones. When you are plugging this into your online converter you are doing it wrong – you are converting binary 0100 to decimal 4. Hexadecimal is not binary – hex is a base16 representation of binary.
Anatomy of a D-memory location is this
A D-memory location can store values from x0000 -> xFFFF (decimal 0-65535). A D-memory location which is used to store BCD values, however, can only use decimal digits. A->F are not allowed. This reduces the range of a 16-bit memory location to 0000->9999.
Counting up you would go :
Going the other way, if you wish to pass a decimal value to a memory location and have it stored as pure hex (not BCD hex!) you use the ‘&’ symbol.
For example ->
[MOV #123 D300]This moves HEX value x0123 to memory location D300. If you use D300 in a future operation which interprets this as a hexadecimal number then it will have a decimal value of 291. If you use it in an instruction which interprets it as a BCD value then it will have a decimal value of 123.
If instead you do
[MOV &123 D300]This moves the decimal value 123 to D300 and stores it as a hexadecimal number -> [x007B]! If you use D300 now in a future operation which interprets this as a hexadecimal number it will have a decimal value of 123. If you try to use it in an instruction which interprets it as a BCD value you will get an ERROR because [x007B] contains the hex digit ‘B’ which is not a valid BCD digit.