function [K] = IBR (J,NU) % This function is used by Fast Fourier Transform (Algorithm 8.3) % to perform bit reversal. J1 = J; K = 0; for JJ = 1 : NU J2 = floor(J1/2); K = 2*K+J1-2*J2; J1 = J2; end;