This chapter covers C constants in detail. The syntax and common use for the decimal, binary, hexadecimal, and octal radix in C is fully explained. Both signed and unsigned constant examples are shown for whole numbers, along with their advantages and disadvantages with a RISC processor.
The reader will learn the uses and implementation of floating-point numbers in C for embedded applications. Fixed-point number formats and their advantages are covered as an alternative to floating point.
Constant characters, constant strings, and the special C method to deal with non-printable characters are all a part of this chapter.
Examples and exercises are for the popular PIC®; microcontroller manufactured by Microchip. ...