Книга: Advanced PIC Microcontroller Projects in C

1.5.1 Decimal Number System

1.5.1 Decimal Number System

The numbers in the decimal number system, of course, are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The subscript 10 indicates that a number is in decimal format. For example, the decimal number 235 is shown as 23510.

In general, a decimal number is represented as follows:

an ? 10n + an–1 ? 10n–1 + an-2 ? 10n-2 + ……… + a0 ? 100

For example, decimal number 82510 can be shown as:

82510 = 8 ? 102 + 2 ? 101 + 5 ? 100

Similarly, decimal number 2610 can be shown as:

2610 = 2 ? 101 + 6 ? 100

or

335910 = 3 ? 103 + 3 ? 102 + 5 ? 101 + 9 ? 100

Оглавление книги


Генерация: 0.555. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз