Codage Cours Bases
Author
aaron
Last Updated
před 8 lety
License
LaTeX Project Public License 1.3c
Abstract
Cours Latex sur les Bases d'entiers
Cours Latex sur les Bases d'entiers
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\title{Codage}
\maketitle
\section{Codage des entiers positifs:}
\subsection{La base 2:}
\begin{tabular}{ccccccccccccc}
1 & 2 & 4 & 8 & 16 & 32 & 64 & 128 & 256 & 512 & 1024 & 2048 & 4096 \\
$2^0$&$2^1$&$2^2$&$2^3$&$2^4$&$2^5$&$2^6$&$2^7$&$2^8$&$2^9$&$2^{10}$&$2^{11}$&$2^{12}$ \\
\end{tabular}
\paragraph*{Rappels:}
\begin{flushleft}
$20813_{10}$=$2*2^4 + 0*{10}^3 + 8*{10}^2 + 1*{10}^1 + 3*{10}^0$
$1011_{10}$ =$1*2^3 + 0*2^2 + 1*2^1 + 1*2^0$
\end{flushleft}
\subsubsection{Methode lourde:}
\begin{flushleft}
Ecriture de $11_{10}$ en base 2:
$11_{10}$=$1*2^3+3$ =$1*2^3+1*2+1$ =$1011_2$
\end{flushleft}
\paragraph{Division euclidienne:}
\begin{flushleft}
$11=2*5+1$
$5=2*2+1$
$2=2*1+0$
$1=2*0+1$
\end{flushleft}
\newpage
\subsection{La base 16}
\begin{flushleft}
On utilise:
\begin{enumerate}
0 1 2 3 4 5 6 7 8 9 A B C D E F
\end{enumerate}
Avec:
\end{flushleft}
$A_{16}=10$
$B_{16}=11$
$C_{16}=12$
$D_{16}=13$
$E_{16}=14$
$F_{16}=15$
\subsubsection{Exemples:}
\begin{flushleft}
$F8A_{16}=15*16^2 + 12*16^1 + 10*16^0$
$3CB_{16}=3*16^2 + 12^16^1 + 11*16^0$
\end{flushleft}
\end{document}