Need Advice on Reading Multiplexer Inputs

shift-and-or would be the way - show us your existing code?