Answers to Exercises

  1. Hexadecimal arithmetic

    1. 48

      You probably won't be surprised to hear that Susan didn't care much for this answer originally. Here's the discussion on that topic:

      Susan: Problem 1a. My answer is 38. Why? My own personal way of thinking: If a = 10 right? and if e = 14 and if 1 * 10= 10 and if 2 * 14 = 28 then if you add 10 + 28 you get 38. So please inform me how you arrived at 48? I didn't bother with the rest of the problems. If I couldn't get the first one right, then what was the point?

      Steve: Here's how you do this problem:

      Carry the 1 from the low digit to the high digit of the answer, to produce:

      4(4 * 16) + 8(8 * 1), or 48 hex, ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.