Ads 120 X 160px

Sabtu, 29 Mei 2010

NUMBER SYSTEMS

NUMBER SYSTEMS

The use of the microprocessor requires a working knowledge of binary , decimal, and hexadecimal numbering systems. This section of the next provides a background for those who are unfamiliar with these numbering systems. Conversions between decimal and binery, decimal and hexadecimal, and binary and hexadecimal are described.

Digits

Before number are converted from one number base to another, the digits of a number system must be understood. Early in our education, we learned that a decimal (base 10) number is constructed with 10 digits. Note that a base 10 number does contain a 10 digit, just as a base 8 number does not contain an 8 digit.

Positional Notation

Once the digits of a number system are understood, larger numbers are constructed by using propositional nation. In grade school, we learned that the position to the left of the units position is the tens position, the position to the left of the tens position is the hundreds position, and forth. What we probably did not learn was the exponential value of each position : the units position has a weight of 10, or 1; the tens position has a weight of 10; and the hundred position has a weight of 10 or 100. The position to the left of the radix (number base) point, called a decimal point only in the decimal system, is always the units position in any number system. For example, the position to the left of the binary point is always 2, or 1; the position the left of the octal point is 8, or 1.

True position to the left of the units position is always the number base raised to the first power, in a decimal system, this is 10 or 10. The decimal number is composed of 1 ten plus 1 unit, and has a value 11 units; the binary number 11 is composed of 1 two plus 1 unit, for a value of 3 decimal units. The 11 octal has a value of 9 decimal units.

In the decimal system, positions to the right of the decimal point have negative powers. The first digit to the right of the decimal point has a value of 10-1, or 0,1. In the binary system the first digit to the right of the binary point has a value of 2-1, or 0,5. In general, the principles that apply to the decimal numbers also apply to the numbers in any other number system.

Conversion to Decimal

The prior examples have shown that to convert from any number base to decimal, determine the weights or values of each position of the number, and then sum the weights to from the decimal equivalent. Suppose that 125.78 octal is converted to decimal. To accomplish this conversion, first write down the weight of each position of the number.

Conversion from Decimal

Conversions from decimal to other number systems are more difficult to accomplish than conversion to decimal. To convert the whole number portion of a number portion of a number to a decimal, divide by the radix. To convert the fractional portion, multiply by the radix.

0 komentar:

Posting Komentar