The chip represent a BCD number in relation to what the inputs are, in order of their priority A8 has the highest prority. EG: if there is an input (active low, remember) at A2, then the BCD will display a three (in BCD) on the outputs. If there is an input on A2 and A5, A5 has priority (it is the one that will be displayed) because it is higher up.
Just a note.. I have never used this chip before, in fact, I hadnt even HEARD of it before now! But.. This is what I am guessing. If I were you, go buy the chip (if you can even find them.. Dec 1990!!) and whck it into your breadbord and see how it works. If you need more of an explanation, ask, and I shall attemp to help.