How to count to 25 cents with coins of 5, 10 and 25 cents. The circuit is constructed using FFs and OR, AND gates.
\documentclass[border=3mm]{standalone}% Tikz\usepackage{tikz}\usetikzlibrary{arrows,shapes.gates.logic.US,shapes.gates.logic.IEC,calc}% Notation\usepackage{amsmath, siunitx}% Tikz Library\usetikzlibrary{calc}\tikzset{every picture/.style={line width=0.3mm}}% Circuitikz\usepackage[european,straightvoltages,americanresistor]{circuitikz}\ctikzset{logic ports=ieee}% Custom\tikzset{sr-ff/.style={flipflop, flipflop def={t1=S, t3=R, t6=Q}}}\begin{document}\tikzstyle{branch}=[fill, shape=circle, minimum size=3pt, inner sep=0pt]\begin{circuitikz}[line cap=round, line join =round]% First State\node[sr-ff] (q0) at (0,0) {};% Cents\node[circle, draw, shift={(0,10)}] (5cents) at (q0) {5 cents};\draw[red] (5cents) -- ++(0,-7.8) coordinate (5cents_line) to[short,-*] +(44.7,0);\node[circle, draw, shift={(2,0)}] (10cents) at (5cents) {10 cents};\draw[blue] (10cents) -- ++(0,-5.2) coordinate (10cents_line) to[short,-*] +(42.7,0);\node[circle, draw, shift={(2,0)}] (25cents) at (10cents) {25 cents};\draw[orange] (25cents) -- ++(0,-3.6) coordinate (25cents_line) to[short,-*] +(40.7,0);% Q0 State\draw (q0.pin 1) -- +(-1,0) node [left] {\texttt{1}}