Appendix B

Solutions to Exercises

CHAPTER 1

1. (a) 1000 equals 8;(b) 10101 equals 21.

2. (a) 64 equals 1000000;(b) 127 equals 1111111.

3. (a) (b)

4. (a) 14;(b) 42.

5. Decimal-10 is hex-A; decimal-15 is hex-F.

6. (a) 2F = 47;(b) E5 is 229.

7. (a) 127 is 7F;(b) 255 is FF.

8. American Standard Code for Information Interchange (ASCII) represents a character in 1 byte (8 bits) allowing for 255 separate characters including the so-called extended set from character 128 to 255. Unicode uses 2 bytes, which allows for 64K separate character representations ...

Get Introducing Data Structures with Java 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.