Shift Register / Encoder

this is much closer to what im looking for. but its got so many things inside. when we studied PLA's and ROMS it seemed that they were simply made of many AND's and NOT's to encode and decode input. maybe these gadgets are a more efficient solution. thanks all!