Hi all, Here i have to know is thr any way to sort the array according to thr Bit Reverse..
for Example:
If we take the Array size of 256,then the Sorting Should be like below.
a[1] = a[256]
a[2] = a[Bit reverse of 2] // bit lenght = Bits required for 256.
.
;
exapmle for Bit Reversing if for 256 9 bits are Needed to store the Value ,
so Bit reversal of 1,
bit rev( 0 0000 0001 ) = 1 0000 0000
Bit Reversal of 2 , Bit rev(0 0000 0010) = 0 1000 0000
like that , i want to Know Whether it is possible for Minimal steps or not
for Example:
If we take the Array size of 256,then the Sorting Should be like below.
a[1] = a[256]
a[2] = a[Bit reverse of 2] // bit lenght = Bits required for 256.
.
;
exapmle for Bit Reversing if for 256 9 bits are Needed to store the Value ,
so Bit reversal of 1,
bit rev( 0 0000 0001 ) = 1 0000 0000
Bit Reversal of 2 , Bit rev(0 0000 0010) = 0 1000 0000
like that , i want to Know Whether it is possible for Minimal steps or not
Comment