this is for holding javascript data
Michela Ceria edited subsection_Notations_for_bytes_In__.tex
about 6 years ago
Commit id: 3984cf5a804940e1e3ac8904cbca3029b01bf5ab
deletions | additions
diff --git a/subsection_Notations_for_bytes_In__.tex b/subsection_Notations_for_bytes_In__.tex
index 0ebb32a..d39350e 100644
--- a/subsection_Notations_for_bytes_In__.tex
+++ b/subsection_Notations_for_bytes_In__.tex
...
A byte is a vector of $8$ bits, so it is formed by two nibbles. Then, we can represent it with two "hex digits", as we have done in Example \ref{BitHex}.
\\
We can also represent bytes as polynomials: in particular if $a_7a_6a_5a_4a_3a_2a_1a_0$ is the binary vector representing a byte, we have the following representation
$$abcdefgh $$a_7a_6a_5a_4a_3a_2a_1a_0 \rightarrow a_7x^7+a_6x^6+a_5x^5+a_4x^4+a_3x^3+a_2x^2+a_1x+a_0.$$
\begin{Example}\label{PolyHex}
The byte $1010 1011$, corresponding to the hex notation $0xAB$, can also be denoted by the polynomial $x^7+x^5+x^3+x+1$.
\end{Example}
...
\begin{Example}\label{MultBytes2}
Suppose we want to perform the bytes multiplication $88\cdot 88$; this time we have represented bytes in their decimal form. In its binary form, $88$ is
$0101 1000$, whereas its hex form is $0x58$ and it can be represented as the polynomial $f=x^6+x^4+x^3$.
Now,
$f^2=\underline{x^12}+x^8+x^6\,=^{\mathrm{substitution}}\,\underline{x^8+x^7+x^6+x^4}+x^8+x^6=x^7+x^4$, $f^2=\underline{x^{12}}+x^8+x^6\,=^{\mathrm{substitution}}\,\underline{x^8+x^7+x^6+x^4}+x^8+x^6=x^7+x^4$, whose representation in binary form is $1001 0000$, in hex notation is $0x90$ and in decimal form is $144$.
\\
Note that, as decimal numbers $88^2=7744$, which is different from the bytes multiplication $88\cdot 88$.
\end{Example}