if n equals 1, return V set R = right most n/2 bits of V set L = left most n/2 bits of V R = reversen(R,n/2) L = reversen(L,n/2) set RL = n bit value whose left most n/2 bits equals R and whose right most n/2 bits equals L return RL
Example 1: Pseudocode for reversen (V,n), which uses recursion to reverse the right most n bits of V.