C Language Q & A #2
How would a programmer decide which number system to use ?
- Most of the time, you would stay with decimal numbers, since input and output from the program is likely to be used by people. For some types of programming, such as interfacing with hardware devices (or in assembly language programming - class four) you could use hexadecimal or binary. These number systems are good for device drivers and low-level manipulations. You can also use hex numbers when working with “bit fields” or “bit masks”, which is a way to very compactly represent a number of YES/NO options for a variable.