It is fairly difficult to do with the gates.I would use a 8pdip avr and program it for that.
I want it to see 4.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16