Solve Exercise 2-3: Hex to integer converter

This exercise was fun, and I learned a simpler way to convert them.