Книга: Advanced PIC Microcontroller Projects in C
1.5.2 Binary Number System
1.5.2 Binary Number System
The binary number system consists of two numbers: 0 and 1. A subscript 2 indicates that a number is in binary format. For example, the binary number 1011 would be 10112. In general, a binary number is represented as follows:
an ? 2n + an–1 ? 2n–1 + an–2 ? 2n–2 + ……… + a0 ? 20
For example, binary number 11102 can be shown as:
11102 = 1 ? 23 + 1 ? 22 + 1 ? 21 + 0 ? 20
Similarly, binary number 100011102 can be shown as:
100011102 = 1 ? 27 + 0 ? 26 + 0 ? 25 + 0 ? 24 + 1 ? 23 + 1 ? 22 + 1 ? 21 + 0 ? 20
Похожие страницы
- 13.5. Binary Utilities
- 13.6. Miscellaneous Binary Utilities
- 1.5 Number Systems
- 1.6 Converting Binary Numbers into Decimal
- 1.7 Converting Decimal Numbers into Binary
- 1.8 Converting Binary Numbers into Hexadecimal
- 1.9 Converting Hexadecimal Numbers into Binary
- 1.10 Converting Hexadecimal Numbers into Decimal
- 1.11 Converting Decimal Numbers into Hexadecimal
- 1.12 Converting Octal Numbers into Decimal
- 1.13 Converting Decimal Numbers into Octal
- 1.14 Converting Octal Numbers into Binary