a brief description:

the encoder has 10 inputs and each represents the decimal number 0 to 9 ~ if a '1' is input at the decimal 0 input then the output will be "0000", if it's at decimal 1 input the output will be "0001" and so on...

a "Clear" input is included if it's a '1' at this input then the results will be cleared/reset or becomes "0000"

1st input will be the first digit output... second input the second digit output... until the fourth