A lookup table, this was suggested by FvM in an older post about FPGA I think but it applies to mcu too.
The fastest way would be to use 8bit lookup table but you need 256 bytes of data.
I have used a 4bit lookup table that makes the conversion in two steps with just 16bytes for the lookup table, it is the best compromise I think.
hello there,i would like to ask you guys opinion on how to create the simplest c code to reverse a binary number example 00001111 --> 11110000. i did mine but i think its quite long and i hope you guys could share your idea with me. thanks^^