A fast VLSI conversion between binary and residue systems