TAOCP 4.4: Radix Conversion
Section 4.4 exercises: 19/19 solved.
Section 4.4. Radix Conversion
Exercises from TAOCP Volume 2 Section 4.4: 19/19 solved.
| # | Rating | Category | Status | Time |
|---|---|---|---|---|
| 1 | ▶ [**] | verified | 2m43s | |
| 2 | [**] | verified | 1m15s | |
| 3 | ▶ [**] | verified | 3m29s | |
| 4 | [M21] | math-medium | verified | 2m49s |
| 5 | [M30] | math-hard | solved | 10m49s |
| 6 | [30] | hard | verified | 5m29s |
| 7 | [M18] | math-medium | verified | 4m52s |
| 8 | [24] | medium | verified | 4m05s |
| 9 | ▶ [M29] | math-hard | solved | 8m55s |
| 10 | [22] | medium | verified | 2m39s |
| 11 | [16] | medium | verified | 1m16s |
| 12 | ▶ [22] | medium | verified | 4m16s |
| 13 | ▶ [25] | medium | solved | 7m41s |
| 14 | [M27] | math-hard | solved | 10m17s |
| 15 | [M47] | math-research | verified | 7m13s |
| 16 | [41] | project | verified | 5m09s |
| 17 | [M40] | math-project | solved | 8m01s |
| 18 | [HM35] | hm-hard | verified | 1m17s |
| 19 | ▶ [M23] | math-medium | solved | 11m06s |
TAOCP 4.4 Exercise 1
Let u=a_m b_{m-1}\cdots b_1 b_0+\cdots+a_1 b_0+a_0, where $0\le a_j<b_j$, and suppose we wish to express the same quantity in the mixed-radix system
TAOCP 4.4 Exercise 2
Method 1a extends to mixed radices by repeated division with changing divisors.
TAOCP 4.4 Exercise 3
We generalize Method 2a by introducing a stopping criterion based on the desired precision $\epsilon$.
TAOCP 4.4 Exercise 4
Let $x$ be a real number with a terminating binary representation.
TAOCP 4.4 Exercise 5
**5.
TAOCP 4.4 Exercise 6
Methods 1a, 1b, 2a, and 2b are defined for conversion between positional systems of radix $b$ and radix $B$.
TAOCP 4.4 Exercise 7
We are given a real number $r$ and integers $u$ and $w$ such that 0 < \alpha \le r \le \alpha + \frac{1}{w}, \quad 0 \le u \le w.
TAOCP 4.4 Exercise 8
We are asked to write a MIX program analogous to program (1) that computes the decimal digits of a nonnegative integer $u$ using **formula (5)** and contains **no division instructions**.
TAOCP 4.4 Exercise 9
We are asked to find, for each nonnegative integer $k$, the smallest nonnegative integer $u$ such that \left\lfloor \frac{v_k(u)}{16} \right\rfloor \ne \left\lfloor \frac{u}{10} \right\rfloor, where
TAOCP 4.4 Exercise 10
Let a binary-coded decimal (BCD) number be represented as u = \cdots u_3\,u_2\,u_1\,u_0, where each 4-bit group $u_3 u_2 u_1 u_0$ encodes a decimal digit $d$ with $0 \le d \le 9$.
TAOCP 4.4 Exercise 11
We are asked to convert $(5772)_{10}$ to decimal.
TAOCP 4.4 Exercise 12
We are asked to devise a **rapid pencil-and-paper method** for converting integers from ternary $(0,1,2)_3$ to decimal $(0,1,\dots,9)_{10}$ and to illustrate the method on the number $(12120112120210)...
TAOCP 4.4 Exercise 13
Let x=(.
TAOCP 4.4 Exercise 14
Let $(d_0 d_1 \dots d_{n-1})_{10}$ be an $n$-digit decimal integer.
TAOCP 4.4 Exercise 15
Let $C(n)$ denote the time required to convert an $n$-digit decimal integer to binary notation, or conversely.
TAOCP 4.4 Exercise 16
Section 4.
TAOCP 4.4 Exercise 17
Let \mathcal D(p)=\{\pm (0.
TAOCP 4.4 Exercise 18
Let $b$ and $B$ be two integer bases, and let $u$ be a $p$-digit floating point number in base $b$, with representation $u = (d_0.d_1 d_2 \ldots d_{p-1})_b \times b^e,$ where $0 \le d_i < b$ for $0 \l...