Книга: 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 ? 2+ 1 ? 22 + 1 ? 21 + 0 ? 20

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


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