Chapter 4: Q19E (page 244)
Find a formula for the integer with smallest absolute value that is congruent to an integer a modulo m, where m is a positive integer.
Short Answer
a-m(a/m) if a-m(a/m) \( \le \)(m/2)
a-m(a/m) – m if a-m(a/m) > (m/2)
Chapter 4: Q19E (page 244)
Find a formula for the integer with smallest absolute value that is congruent to an integer a modulo m, where m is a positive integer.
a-m(a/m) if a-m(a/m) \( \le \)(m/2)
a-m(a/m) – m if a-m(a/m) > (m/2)
All the tools & learning materials you need for study success - in one app.
Get started for freea) Explain why ndiv 7 equals the number of complete weeks in days.
b) Explain why n div 24 equals the number of complete days inn hours.
Use Algorithm 5 to find
Show that the octal expansion of a positive integer can be obtained from its binary expansion by grouping together blocks of three binary digits, adding initial zeros if necessary, and translating each block of three binary digits into a single octal digit.
Convert the hexadecimal expansion of each of these in- tigersto a binary expansion.
a) (80E)16 b) (135AB)16
c) (ABBA)16 d) (DEFACED)1
Show that the binary expansion of a positive integer can be obtained from its octal expansion by translating each octal digit into a block of three binary digits.
What do you think about this solution?
We value your feedback to improve our textbook solutions.