Question: Binary and ternary representations (a) Find the binary representation of 2457. Show your work. (b) If b = b t . . . b 1
Binary and ternary representations
(a) Find the binary representation of 2457. Show your work.
(b) If b = bt . . . b1b0 is the binary representation of a number n, then what is the binary representation of 4n + 2? Explain your answer.
(c) Give a recursive algorithm to compute the ternary (base 3) representation of any non-negative integer n. Adapt the algorithm for binary representation.
(d) Use strong induction to show that your algorithm gives the correct ternary representation for all n 0.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
