I don't really know how to formulate my question but I give it a try.
Suppose I want to write a function where the domain is a binary number and the range is either $0$ or $1$: $$ f:\{0,1\}^2\rightarrow \{0,1\} \tag 1 $$
My problem: I think $(1)$ is wrong because of the following:
I want the domain to be a binary number $x_1 x_0$, where $x_i\in \{0,1\}$. So $x_1 x_0$ can assign the values: \begin{align} x_1 x_0 &= 00 \tag 2\\ x_1 x_0 &= 01 \tag 3\\ x_1 x_0 &= 10 \tag 4\\ x_1 x_0 &= 11 \tag 5 \end{align} So for $f(x_1x_0)$ I have, for instance, $f(00)=0$, $f(01)=0$, $f(11)=1$ etc, etc.
But in $(1)$ I have the Cartesian product which by definition is: \begin{align} \{0,1\}^2 = \{0,1\} \times \{0,1\} = \{(0,0),(0,1),(1,0),(1,1)\} \tag 6 \end{align} I.e. between each component there is a COMMA, but in $(2)-(5)$ where are no commas.
So isn't $(1)$ wrong? However, the following doesn't look right either: $$ f:\{x_1x_0\}^2\rightarrow \{0,1\}\qquad \tag 7 $$
What is the correct notation?
At Wikipedia I found boolean functions, but they use commas between the components (in the domain) which isn't a binary number $x_1x_0$.
Thanks in advance!
Well you can identify cartesian product with a string. Probably the concept that you are looking is for the free monoid with the operation of concatenation. In particular, using the alphabet $\Sigma =\{0,1\}$ you can form all finite strings of an alphabet in the set $$\Sigma ^*=\bigcup _{i=0}^{\infty} \Sigma ^i,$$ where $\Sigma ^i$ means all of the strings of length $i$ and the star corresponds to the operation of kleene star. You can make this precise by defining the function $$|\cdot |:\Sigma ^*\longrightarrow \mathbb{Z}$$ that describes the length of a string(using a recursive definition given by the definition of concatenation). So, in particular you would like to construct the set $$\{0,1\} ^2=\{x\in \{0,1\}^*:|x|=2\}.$$