A VLSI structure for X(mod m) operation