Not sure if I've understood your problem but how about a fixed array of 32bit numbers, each a constant with 1 bit shifted left. Use n to index into the array.
So the array would be initialised as 1,2,4,8,16,32,64 etc etc
Code would look like Answer=Array[n]
I guess you could do it as a table in code memory if you can find a way to index it.
George




Bookmarks