Pages

January 20, 2013

Number System



number system and their binary inter conversions




NUMBER SYSTEM

 Number Systems, in computers, various notational systems that have been or are being used to represent the abstract quantities called numbers. A number system is defined by the base it uses, the base being the number of different symbols required by the system to represent any of the infinite series of numbers. Thus, the decimal system in universal use today (except for computer application) requires ten different symbols, or digits, to represent numbers and is therefore a base-10 system.

Throughout history, many different number systems have been used; in fact, any whole number greater than 1 can be used as a base. Some cultures have used systems based on the numbers 3, 4, or 5. The Babylonians used the sexagesimal system, based on the number 60, and the Romans used (for some purposes) the duodecimal system, based on the number 12. The Mayas used the vigesimal system, based on the number 20. The binary system, based on the number 2, was used by some tribes and, together with the system based on 8, is used today in computer systems.



PLACE VALUES


Except for computer work, the universally adopted system of mathematical notation today is the decimal system, which, as stated, is a base-10 system. As in other number systems, the position of a symbol in a base-10 number denotes the value of that symbol in terms of exponential values of the base. That is, in the decimal system, the quantity represented by any of the ten symbols used—0, 1, 2, 3, 4, 5, 6, 7, 8, and 9—depends on its position in the number. 
Thus, the number 3,098,323 is an abbreviation for (3 × 106) + (0 × 105) + (9 × 104) + (8 × 103) + (3 × 102) + (2 × 101) + (3 × 100, or 3 × 1). 
The first “3” (reading from right to left) represents 3 units; the second “3,” 300 units and the third “3,” 3 million units. In this system the zero plays a double role, it represents naught, and it also serves to indicate the multiples of the base 10: 100, 1000, 10,000, and so on. It is also used to indicate fractions of integers: 1/10 is written as 0.1, 1/100 as 0.01, 1/1000 as 0.001, and so on.

Two digits—0, 1—suffice to represent a number in the binary system, 6 digits—0, 1, 2, 3, 4, 5—are needed to represent a number in the sexagesimal system and 12 digits—0, 1, 2, 3, 4, 5, 6, 7, 8, 9, t (ten), e (eleven)—are needed to represent a number in the duodecimal system. 

The number 30155 in the sexagesimal system is the number (3 × 64) + (0 × 63) + (1 × 62) + (5 × 61) + (5 × 60) = 3959 in the decimal system; the number 2et in the duodecimal system is the number (2 × 122) + (11 × 121) + (10 × 120) = 430 in the decimal system

To write a given base (redix)-10 number n as a base-b number, divide (in the decimal system) n by b, divide the quotient by b, the new quotient by b, and so on until the quotient 0 is obtained. The successive remainders are the digits in the base-b expression for n. For example, to express 3959 (base 10) in the base 6, one writes 

                          6  )       3959       
                              )         659        5
                              )         109        5
                              )          18         1 
                              )            3         0  
                              )            0         3

from which, as above, (3959)10 = (30155)6. (The base is frequently written in this way as a subscript of the number.) The larger the base, the more symbols are required, but fewer digits are needed to express a given number. The number 12 is convenient as a base because it is exactly divisible by 2, 3, 4, and 6; for this reason, some mathematicians have advocated adoption of base 12 in place of the base 10.


BINARY NUMBER SYSTEM:  when base is 2. (0 and 1)
DECIMAL NUMBER SYSTEM:  when base is 10. (0,1,2,3,4,5,6,7,8,9)
OCTAL NUMBER SYSTEM:  when base is 8. (0,1,2,3,4,5,6,7)
HEX-DECIMAL NUMBER SYSTEM:  when base is 16. (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
Where A is 10, B is 11, C is 12, D is 13, E is 14, F is 15.

Some of the following conversions from decimal number system are:
1. Decimal to binary number system:
    (25)10 = (11001)2

2. Decimal to octal number system:
    (4706)10 = (11142)8

3. Decimal to hex-decimal number system:
    (2655)10 = (A5F)16







BINARY SYSTEM

The binary system plays an important role in computer technology. The first 20 numbers in the binary notation are 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100. The zero here also has the role of place marker, as in the decimal system. Any decimal number can be expressed in the binary system by the sum of different powers of two. For example, starting from the right, 10101101 represents (1 × 20) + (0 × 21) + (1 × 22) + (1 × 23) + (0 × 24) + (1 × 25) + (0 × 26) + (1 × 27) = 173. This example can be used for the conversion of binary numbers into decimal numbers.
 For the conversion of decimal numbers to binary numbers, the same principle can be used, but the other way around. Thus, to convert, the highest power of two that does not exceed the given number is sought first, and a 1 is placed in the corresponding position in the binary number. 
For example, the highest power of two in the decimal number 519 is 29 = 512. Thus, a 1 can be inserted as the 10th digit, counted from the right: 1000000000. In the remainder, 519 - 512 = 7, the highest power of 2 is 22 = 4, so the third zero from the right can be replaced by a 1: 1000000100. The next remainder, 3, consists of the sum of two powers of 2: 21 + 20, so the first and second zeros from the right are replaced by 1: 51910 = 10000001112.

Arithmetic operations in the binary system are extremely simple.
 The basic rules are: 1 + 1 = 10, and 1 × 1 = 1.
 Zero plays its usual role: 1 × 0 = 0 and 1 + 0 = 1.
 Addition, subtraction, and multiplication are done in a fashion similar to that of the decimal system: 
number system operations (add, subtract and multiplication)

1 comment: