Specifications

Appendix B - Numeric Systems
As you can see, converting a binary number into a decimal number is done by calculating the
expression on the left side. Depending on the position in a binary number, digits carry different
values which are multiplied by themselves, and by adding them we get a decimal number we can
understand. Let's further suppose that there are few marbles in each of the drawers: 2 in the first
one, 4 in the second drawer, 7 in the third and 3 in the fourth drawer. Let's also say to the one
who's opening the drawers to use binary representation in answer. Under these conditions,
question would be as follows: "How many marbles are there in 01?", and the answer would be:
"There are 100 marbles in 01." It should be noted that both question and the answer are very
clear even though we did not use the standard terms. It should further be noted that for decimal
numbers from 0 to 3 it is enough to have two binary digits, and that for all values above that we
must add new binary digits. So, for numbers from 0 to 7 it is enough to have three digits, for
numbers from 0 to 15, four, etc. Simply said, the biggest number that can be represented by a
binary digit is the one obtained when basis 2 is graded onto a number of binary digits in a binary
number and thus obtained number is decremented by one.
Example:
This means that it is possible to represent decimal numbers from 0 to 15 with 4 binary digits,
including numbers '0' and '15', or 16 different values.
Operations which exist in decimal numeric system also exist in a binary system. For reasons of
clarity and legibility, we will review addition and subtraction only in this chapter.
Basic rules that apply to binary addition are:
Addition is done so that digits in the same numeric positions are added, similar to the decimal
numeric system. If both digits being added are zero, their sum remains zero, and if they are '0'
and '1', result is '1'. The sum of two ones gives two, in binary representation it will be a zero, but
with transferring '1' to a higher position that is added to digits from that position.
Example:
http://www.mikroelektronika.co.yu/english/product/books/PICbook/B_Dodatak.htm (3 of 6) [4/2/2003 16:19:30]