Suppose we have a memory element, i.e., a Flip Flop ($FF$).
A $FF$ can have a current value of binary $0$ or $1$, i.e., $FF \in \{0, 1\}$.
Is there any formal way to represent three types of $FF$s:
if the current $FF$ state is $0$ then it transitions to $1$ but if the current $FF$ state is $1$ then it stays at $1$.
if the current $FF$ state is $1$ then it transitions to $0$ but if the current $FF$ state is $0$ then it stays at $0$.
if the current $FF$ state is $1$ then it transitions to $0$ and if the current $FF$ state is $0$ then it tranistions to $1$.
I was thinking I could use bar like $\overline{FF_1} = 0 \rightarrow 1$ , $1 \rightarrow 1$
And to represent the opposite: $\underline{FF_2} = 1 \rightarrow 0$ , $0 \rightarrow 0$
And to represent the last type: ${FF_2|} = 1 \rightarrow 0$ , $0 \rightarrow 1$
However, I am sure this does not look formal and right.
Please help.
It seems as if you are looking for the boolean operators AND, OR, and NOT, where the first, second, and third types are $FF +1$, $FF \cdot 0$, and $\overline{FF}$.
The reason why the first type is $FF + 1$ is because, regardless of the value of $FF$, $FF + 1$ returns $1$. Similar to this is the second type where, regardless of the value of $FF$, $FF \cdot 0$ returns $0$. For the third type, we just used the NOT operator.
The AND boolean operator returns a $1$ if and only if all inputs are $1$, otherwise it returns $0$. The OR boolean operator returns a $0$ if and only if all inputs are $0$, otherwise it returns a $1$. Finally, the NOT boolean operator returns a $0$ if the input is $1$ and returns a $1$ if the input is $0$.