BlackBerry interview question

write a function that will reverse swap bits (MST to LSB) & (LSB to MSB)