Digit reversal reverses a numeral's digit string in a specified radix and width. If has exactly displayed digits, allowing leading zeros, define
It is an involution on the width- strings: reversing twice restores every digit to its original position.
In four-bit binary representation, reverses to , so the numbers three and twelve are paired at that width. With canonical decimal numerals, reverses to the displayed string , whose numerical value is . Reversing the canonical numeral then gives , so dropping width and leading zeros destroys the involution property.
The distinction between a digit string and its integer value is essential in bit-reversal permutations used to reorder indexed data. It also distinguishes numeric digit reversal from reversing a negative numeral's separate sign.
The bit-reversal permutation of writes each index using exactly binary digits, reverses those digits, and interprets the result as another index. Leading zeros matter. Reversing twice restores the original index, so this permutation is an involution.
For , the index order becomes : for example, maps to . It occurs naturally in radix-two Fast Fourier transform implementations. Repeatedly separating even from odd indices consumes the low-order bits first; traversing the resulting recursion tree reverses the order in which the index bits are read. Some implementations permute inputs, others permute outputs, and other layouts avoid an explicit reversal. The discrete Fourier transform itself is independent of this storage choice.[ref]

Articles by others on the same topic (0)

There are currently no matching articles.