A VLSI algorithm for direct and reverse conversion from Weighted Binary Number System to Residue Number System