VIII Appendixes

Appendix A
Memory Addressing, Binary, and Hexadecimal
You do not have to understand the concepts in this appendix to become well-versed in C. You can master C, however, only if you spend some time learning about the ''behind-the-scenes" roles played by binary numbers. The material presented here is not difficult, but many programmers do not take the time to study it; hence, there are a handful of C masters who learn this material and understand how C works "under the hood," and there are those who will never be as expert in the language as they could be.
You should take the time to learn about addressing, binary numbers, and hexadecimal numbers. These fundamental principles are presented here for you to learn, and although a working knowledge of C is possible without knowing them, they will greatly enhance your C skills (and your skills in every other programming language).
After reading this appendix, you will better understand why different C data types hold different ranges of numbers. You also will see the importance of being able to represent hexadecimal numbers in C, and you will better understand C array and pointer addressing.
Computer Memory
Each memory location inside your computer holds a single character called a byte. A byte is any character, whether it is a letter of the alphabet, a numeric digit, or a special character such as a period, question mark, or even a space (a blank character). If your computer contains 32 megabytes of memory, it can hold a total of approximately 32 million bytes of memory. This means that as soon as you fill your computer's memory with 32 million bytes, there is no room for an additional character unless you overwrite something else.
Before describing the physical layout of your computer's memory, it might be best to take a detour and explain exactly what 32 megabytes, or 32 meg, really means.

 



C by Example
C by Example
ISBN: 0789722399
EAN: 2147483647
Year: 1999
Pages: 43
Authors: Greg Perry

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net