Logic gates to find a number while ascending. This circuit is ment to reset once u reach desired number since higher numbers may trigger a lower number condition. There is no problem if a lower number condition is met but ll be if a higher number turns on before reach it.
Note that 7 and 8 needs 2 logic gates instead one.
0= NOR on A B
1= OR on A C
2= OR on B C
3= AND on A B
4= OR on C D
5= AND on A C
6= AND on B C
7= AND on A B
AND on C Gate
8= NOR on A B
AND on D Gate
9= AND on A D