Skip to main content\(\newcommand{\im}{{\mathrm{im}}}
\newcommand{\given}{{\, :\,}}
\newcommand{\hanoi}{\mathrm{hanoi}}
\newcommand{\lcm}{{\mathrm{lcm}}}
\newcommand{\ID}{{\mathrm{ID}}}
\newcommand{\chr}{{\mathtt{chr}}}
\newcommand{\ord}{{\mathtt{ord}}}
\newcommand{\set}[1]{\left\lbrace #1 \right\rbrace}
\newcommand{\seq}[2]{( #1 )_{#2}}
\newcommand{\gr}[1]{\left( #1 \right)}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\size}[1]{\# #1}
\newcommand{\id}[1]{\mathrm{id}_{#1}}
\newcommand{\ip}[1]{\left\langle #1 \right\rangle}
\newcommand{\floor}[1]{\left\lfloor #1\right\rfloor}
\newcommand{\ceiling}[1]{\left\lceil #1\right\rceil}
\newcommand{\indemph}[1]{{\textbf{\emph{#1}}\index{#1}}}
\renewcommand{\implies}{\to}
\renewcommand{\iff}{\leftrightarrow}
\newcommand{\lxor}{\oplus}
\newcommand{\cP}{\wp}
\newcommand{\pset}{\cP}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\barr}[1]{\overline{#1}}
\newcommand{\sage}{\textsc{Sage}}
\newcommand{\magma}{\textsc{Magma}}
\newcommand{\bob}{\text{Bob}}
\newcommand{\true}{\text{T}}
\newcommand{\false}{\text{F}}
\newcommand{\ahat}{\hat{a}}
\newcommand{\ah}{\ahat}
\newcommand{\bhat}{\hat{b}}
\newcommand{\abar}{\bar{a}}
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cW}{\mathcal{W}}
\newcommand{\todo}[1]{{\color{red} TODO: #1}}
\renewcommand{\div}{\operatorname{div}}
\newcommand{\gexp}[3]{#1^{#2 #3}}
\newcommand{\gexpp}[3]{\displaystyle\left(#1\right)^{#2 #3}}
\newcommand{\glog}[3]{\log_{#1}^{#3}#2}
\def\dbend{{!!!}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Exercises 5.2.6 Exercises
1.
Give the definition for these terms. Be sure to set up any notation that is required.
-
-
-
-
2.
Compute the base
\(5\) expansion of
\(253\text{.}\)
3.
Watch the following videos
and learn to count in binary on your hands.
4.
Compute the integer representing the ASCII encoding of these messages.
-
-
-
-
5.
These integers represent messages encoded in ASCII as described in
SubsectionΒ 5.2.2. Decode these messages.
-
\(\displaystyle 6582119\)
-
\(\displaystyle 280991720293\)
-
\(\displaystyle 311107740793\)
-
\(\displaystyle 22107779118197813113556726561\)
-
The following is an integer that is too long to fit in a line.
\begin{gather*}
1971486178880874921204775823582727213754122745\\
127854714387549425398830
\end{gather*}
6.
Compute \(12^{321} \bmod{456}\text{.}\) Follow the steps below if you get stuck.
-
Compute the base
\(2\) expansion of
\(321\text{.}\)
-
Check that you got
\(321 = (101000001)_2\text{.}\)
-
Compute the successive powers
\(p_i\text{,}\) remembering to reduce mod
\(456\text{.}\) Did you notice anything that helps this computation go faster?
-
Multiply the correct terms together to compute
\(12^{321} \bmod{456}\text{.}\)
7.
Compute
\(7^{447} \bmod{645}\) using fast exponentiation. Show your work.
8.
Compute
\(3^{447} \bmod{645}\) using fast exponentiation. Show your work.
9.
Convert the decimal expansion of each of these integers to a binary expansion. that is , Convert base \(10\) to base \(2\text{.}\)
-
-
-
-
-
10.
Convert the decimal expansion of each of these integers to a hexadecimal expansion. that is , Convert base \(10\) to base \(16\text{.}\)
-
-
-
-
-
11.
Convert the binary expansion of each of these integers to a decimal expansion. that is , Convert base \(2\) to base \(10\text{.}\)
-
\(\displaystyle (10011)_2\)
-
\(\displaystyle (111)_2\)
-
\(\displaystyle (101010)_2\)
-
\(\displaystyle (111000)_2\)
-
\(\displaystyle (1011011)_2\)
12.
Convert the hexadecimal expansion of each of these integers to a decimal expansion. that is , Convert base \(16\) to base \(10\text{.}\)
-
\(\displaystyle (A123B)_{16}\)
-
\(\displaystyle (81C)_{16}\)
-
\(\displaystyle (ABBA)_{16}\)
-
\(\displaystyle (DA3)_{16}\)
-
\(\displaystyle (253)_{16}\)
13.
Prove that a positive integer is divisible by
\(5\) if and only if the last digit is divisible by
\(5\text{.}\)
14.
Prove that a positive integer is divisible by
\(3\) if and only if the sum of its decimal digits is divisible by
\(3\text{.}\)
15.
Prove that a positive integer is divisible by
\(11\) if and only if the alternating sum of its decimal digits is divisible by
\(11\text{.}\)