Exercises

Here are some exercises that you can use to check your understanding of the binary and hexadecimal number systems.

Consider the two types of numeric variables we've encountered so far, short and unsigned short. Let's suppose that x is a short, and y is an unsigned short, both of them currently holding the value 32767, or 7fff in hex.

1.What is the result of adding 1 to y, in both decimal and hex?
2.What is the result of adding 1 to x, in both decimal and hex?

Answers to exercises can be found at the end of the chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset