Книга: Introduction to Microprocessors and Microcontrollers

Confusion and the cure

Confusion and the cure

Here is a number: 1000. But what number is it? Is it a thousand in denary or is it eight written in binary?

I don’t know. I could take a guess but the difference between flying an aircraft at eight feet and a thousand feet is a serious matter. The only way to be certain is to say so at the time. This is done by showing the base of the number system being used to make the meaning quite clear. The base of the number system is shown as a subscript after the number.

If the 1000 were a binary number, it is written as 10002 and if it were a denary number it would be shown as 100010.

It would be easy to advise that the base of the number system in use is always shown against every number but this would be totally unrealistic. No one is going to write a base after their telephone number or a price in a shop. Use a base when it would be useful to avoid confusion, such as by writing statements like 1000 = 8 (a thousand = eight???). Write it as 10002 = 810 and make life a little easier.

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


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