Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The format command has many options designed specifically for controlling the appearance of numbers. Let’s look at some of the more useful ones.
First, we can use format to display a number using a different base. For instance, we can display a number in hexadecimal (base-16) with the ˜x control sequence: