Each logic inpit gives a particular number in 7 segment display ( 1 to 9 ). Also, the current going inside the IC is the binary equivalent for the number shown in the display. For example, if the number is 9, binary is hence 1001. So current flows only in first and last pin of IC. This circuit can be used to study binary/decimal conversion.