Next State Logic With One Hot Encoding