So you need a 5 bit up/down counter, followed by a 5 line to 32 output decoder. They make four bit counters in TTL and CMOS, so you will have to cascade two four bit counters, and add some gating to cause a rollover from state 31 to state zero, and vice versa. They make 4 line to 16out decoders, so two of those (with a modicum of external logic) will do the decoding. Now that you have 32 wires, one of which goes high at a time, what are you going to do with them?