uhmmm... Why don't you just loop through all the bits in the value shifting it over, then checking it with a logic AND(mask 1). Add "1" to it if it's true, else "0".
Simple?
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
Offline 1,270 posts
since Nov 2008