Find the number of different magmas that have $A$ as its underlying set I have a problem involving algebraic structures. Any help I can get here would be amazing.
Problem: We have a set $A$, $\text{card} A = n$, $n \in \Bbb N$. 
Find the number of different magmas that have $A$ as the underlying set. 
(I hope I translated this correctly. Feel free to point out if something is wrong or not clear.)
My idea:
Following the definition, any operation I make needs to have the results within that set. So, for example, I imagined a table where we have some operation * and numbers $0$ and $1$ from set $\{0,1\}$:
$$
\begin{array}{c|lcr}
* & \text{0} & \text{1} &  \\
\hline
0 & 0 & 1 \\
1 & 1 & 0 \ \end{array}
$$
That would be one operation with those two numbers. It depends how I define my operation, thus I can make more. I could make:
$
\begin{array}{c|lcr}
*_1 & \text{0} & \text{1} &  \\
\hline
0 & 0 & 0 \\
1 & 0 & 0 \ \end{array}
$ or $
\begin{array}{c|lcr}
*_2 & \text{0} & \text{1} &  \\
\hline
0 & 1 & 0 \\
1 & 0 & 1 \ \end{array}
$
or $
\begin{array}{c|lcr}
*_3 & \text{0} & \text{1} &  \\
\hline
0 & 1 & 1 \\
1 & 1 & 1 \ \end{array}
 $
So, if I take $n$ numbers and place into this table, I could make $n$ operations. Would results be $n^{2^n}$=$n^{2n}$ ? 
Thank you.
Edit: added more explanation.
 A: The operation $*\colon A \times A \to A$ maps each (ordered) pair $(a, b)$ of elements of $A$ to some element $a * b \in A$. There are no restrictions at all on the operation, so that each pair $(a, b)$ has $|A| = n$ "options" for its image (independent of what the image of any other pair might be). The operation $*$ (and hence the magma on $A$) is completely determined by this mapping, and therefore, the number of possible magmas on $A$ is
\begin{equation*}
|A|^{|A \times A|} = n^{n^2}.
\end{equation*}

Alternatively, we can divide the reasoning into two parts in a more obvious manner.


*

*The number of mappings from a finite set $X$ to a finite set $Y$, i.e., the number of functions of of the form $f \colon X \to Y$ is $|Y|^{|X|}$ (where $|X|$ and $|Y|$ denote the number of elements of $X$ and $Y$ respectively). Why? Each element $x \in X$ has $|Y|$ possible elements of $Y$ out of which one can be its image $f(x)$. This is independent of the what the image of any other element of $X$ is. To define the function $f$, it is necessary and sufficient to "assign" to each $x \in X$, and image $f(x) \in Y$, and this can be done in
\begin{equation*}
\underbrace{|Y| \times |Y| \times \cdots \times |Y|}_{|X|\ \text{times}} = |Y|^{|X|}
\end{equation*}

*Given any set finite $A$ of cardinality $n$, a magma on $A$ is fully determined by defining an binary operation on $A$, or in other words, an function $*\colon A \times A \to A$. Using the previous result, this can be done in $|A|^{|A \times A|} = n^{n^2}$ number of ways. This is the number of different (labelled) magmas on $A$.

