Книга: Introduction to Microprocessors and Microcontrollers

Complementary numbers

Complementary numbers

This has two significant advantages:

1 It allows the full number of bits to be used for a number so an 8-bit word can count from 0 to 111111112 or 255.

2 It is easy to implement with addition and subtraction using substantially the same circuitry.

So, how do we manage to use all eight bits for numbers yet still be able to designate a number positive or negative?

That’s clever. We will start by looking at positive numbers first because it is so easy. All positive numbers from 0 to 255 are the same as we get by simply converting denary to binary numbers. So that’s done.

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


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