Problem 11: Binary Representation
Heuristics to highlight
Use numbers, Consider a simpler problem (smaller numbers), Look for patterns.
The base 2 (binary) representation of a positive integer n is the sequence
akak-1ak-2…a1a0,
where
n = ak2k + ak-12k-1
+ ak-22k-2
+ … + a121 + a020,
ak = 1, and ai = 0 or 1 for i =
0, 1, …, k-1.
Write down the binary representations of the day today and of the day of the month
in which you were born.