mirror a decimal variable to a binary value
lfreeze
Posts: 174
After a lot of trial and error, I can't solve this simple problem.
I have a program which produces variables that look like binary number. they range between· 00000000 and 11111111 and can be any combination of
ones and zeros. I want to mirror the decimal variable into a binary value.
Here are a few examples of what I am trying to accomplish
decimal variable= 10101010----binary number=%10101010
decimal variable= 10110110----binary number=%10110110
I looked at format.spin and numbers.spin, and they want to convert
the variable not mirror it. Can anyone suggest a solution to this problem?
Thanks in advance.
Larry
I have a program which produces variables that look like binary number. they range between· 00000000 and 11111111 and can be any combination of
ones and zeros. I want to mirror the decimal variable into a binary value.
Here are a few examples of what I am trying to accomplish
decimal variable= 10101010----binary number=%10101010
decimal variable= 10110110----binary number=%10110110
I looked at format.spin and numbers.spin, and they want to convert
the variable not mirror it. Can anyone suggest a solution to this problem?
Thanks in advance.
Larry
Comments
Larry
As usual your math is amazing. The solution worked perfectly. I will now
spend some time with the manual, and try to understand how you did it.
Larry