I have a decimal value that if a digit is 1, I need to set a bit for that digit to use in logic and HMI.
So if D1 is 10,000,001 in decimal, I need to set bits to correspond to the digits that are one, so D2 = 1000 0001 binary.
This is a serial response to queries over StreamIn/Out for custom protocol.