Chapter 2

Constants

Abstract

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. ...

Get Embedded C Programming 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.