How would one write the formula to calculate all possible combinations from a pattern with $4$ integers that are either $1$ or $0$.
Example of some possible patterns:
$0001, ~1010, ~0000, ~1111$
At first I was thinking $4 \cdot 4 \cdot 4 \cdot 4$ or $ 4^4 = 256.$ But I am not sure how to check.
Also what branch of mathematics would this fall under? (Example: Arithmetic, Algebra, etc.)