# Formula to get result as $0$ for a variable assigned as $1$.

I actually want to perform bitwise not operating in normal calculation mode in my Casio fx-991 ex.

I want a formula which consists of one variable, which can be assigned with either $$0$$ or $$1$$. The formula's result should be $$0$$ if the variable is assigned with $$1$$ and should result in $$1$$ if the variable is assigned with $$0$$.

• $f(x)=1-x$ works. This doesn't have much to do with bitwise not, though. – saulspatz Nov 10 '18 at 16:55
• woah that was so simple...! thanks a lot. put that as answer. – Shaikh Amaan FM Nov 10 '18 at 17:12

$$f(x)=1−x$$ works. This doesn't have much to do with bitwise not, though.