Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Introduction: World of Microcontrollers
Comparative table below contains the values of numbers 0-255 in three different numbering systems.
Marking Numbers
The hexadecimal numbering system is along with binary and decimal number systems considered to be
the most important for us. It is easy to make conversion of any hexadecimal number to binary and it is
also easy to remember it. However, these conversions may cause confusion. For example, what does
the statement “It is necessary to count up 110 products on assembly line” actually mean? Depending
on whether it is about binary, decimal or hexadecimal, the result could be 6, 110 or 272 products,
respectively! Accordingly, in order to avoid misunderstanding, different prefixes and suffixes are
directly added to the numbers. The prefix $ or 0x as well as the suffix h marks the numbers in
hexadecimal system. For example, hexadecimal number 10AF may look as follows $10AF, 0x10AF or
10AFh. Similarly, binary numbers usually get the suffix % or 0b, whereas decimal numbers get the
suffix D.
Bit
Theory says a bit is the basic unit of information... Let’s forget this dry explanation for a moment and take a look at what it is in practice. The
answer is nothing special a bit is a binary digit. Similar to decimal number system in which digits in a number do not have the same value ( for
example digits in the number 444 are the same, but have different values), the “significance” of the bit depends on the position it has in the
binary number. Therefore, there is no point talking about units, tens etc. Instead, here it is about the zero bit (rightmost bit), first bit (second
from the right) etc. In addition, since the binary system uses two digits only (0 and 1), the value of one bit can be 0 or 1.
Don’t be confused if you find some bit has value 4, 16 or 64. It means that bit’s values are represented in decimal system. Simply, we have got so
much accustomed to the usage of decimal numbers that these expressions became common. It would be correct to say for example, “the value of
sixth bit in binary number is equivalent to decimal number 64”. But we are human and habits die hard... Besides, how would it sound “number:
one-onezero- one-zero...”
Byte
A byte or a program word consists of eight bits grouped together. If a bit is a digit, it is logical that bytes represent numbers. All mathematical
operations can be performed upon them, like upon common decimal numbers. As is the case with digits of any other number, byte digits do not
have the same significance. The largest value has the leftmost bit called the most significant bit (MSB). The rightmost bit has the least value and
http://www.mikroe.com/en/books/picmcubook/ch0/ (8 of 30)5/3/2009 11:28:39 AM