Number System in computer

"A set of values used to represent different quantities is known as Number System". For example, a number system can be used to represent the number of students in a class or number of viewers watching a certain TV program etc. The digital computer represents all kinds of data and information in binary numbers. It includes audio, graphics, video, text and numbers. The total number of digits used in a number system is called its base or radix. The base is written after the number as subscript such as 51210.
Some important number systems are as follows.
  • Decimal number system
  • Binary number system
  • Octal number system
  • Hexadecimal number system
The decimal number system is used in general. However, the computers use binary number system. The octal and hexadecimal number systems are used in the computer.

Decimal number System

       See Also: Convert decimal numbers to binary numbers
The Decimal Number System consists of ten digits from 0 to 9. These digits can be used to represent any numeric value. The base of decimal number system is 10. It is the most widely used number system. The value represented by individual digit depends on weight and position of the digit.
Each number in this system consists of digits which are located at different positions. The position of first digit towards left side of the decimal point is 0. The position of second digit towards left side of the decimal point is 1. Similarly, the position of first digit towards right side of decimal point is -1. The position of second digit towards right side of decimal point is -2 and so on.
The value of the number is determined by multiplying the digits with the weight of their position and adding the results. This method is known as expansion method. The rightmost digit of number has the lowest weight. This digit is called Least Significant Digit (LSD). The leftmost digit of a number has the highest weight. This digit is called Most Significant Digit (MSD). The digit 7 in the number 724 is most significant digit and 4 is the least significant digit.
            See Also: Number Bases
 Example:
The weights and positions of each digit of the number 453 are as follows:
Position
2
1
0
Weights
102
101
100
Face value
4
5
3
 The above table indicates that:
The value of digit 4     =          4x102   =          400
The value of digit 4     =          5x10    =          50       
The value of digit 3     =          3x10    =          3
The actual number can be found by adding the values obtained by the digits as follows:
400 + 50 + 3    =45310

Example:

The weights and positions of each digit of the number 139.78 are as follows.
Position
2
1
0

-1
-2
Weights
102
101
100
.
10-1
10-2
Face Value
1
3
9

7
8
The above table indicates that:
The value of digit 1     =          1x102   =          100
The value of digit 3     =          3x101   =          30       
The value of digit 9     =          9x100   =          9
The value of digit 7     =          7x10-1  =          0.7      
The value of digit 8     =          8x10-2   =         0.08
The actual number can be found by adding the values obtained by the digits as follows:
100 + 30 + 9 + 0.7 + 0.8          =          139.78

Binary Number System

Digital computer represents all kinds of data and information in the binary system. Binary Number System consists of two digits 0 and 1. Its base is 2. Each digit or bit in binary number system can be 0 or 1. A combination of binary numbers may be used to represent different quantities like 1001. The positional value of each digit in binary number is twice the place value or face value of the digit of its right side. The weight of each position is a power of 2.
The place value of the digits according to position and weight is as follows:
Position
3
2
1
0
Weights
23
22
21
20

Example: Convert 101112 decimal number

Position
2
1
0
-1
-2
Weights
102
101
100
10-1
10-2
Face Value
1
3
9
7
8
 101112             =          1 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + 1 x 20
                        =          1 x 16 + 0 + 1 x 4 + 1 x 2 + 1 x 1
                        =          16 + 0 + 4 2 + 1
                        =          2310

Example: Convert 101.1012

Position
2
1
0

-1
-2
-3
Face Value
1
0
1
.
1
0
1
Weight
24
21
20

2-1
2-2
2-3
 101.1012                    =          1 x 22 + 0x21 + 1 x 20 + 1x 2-1 + 0 x 2-2 + 1 x 2-3
                                 =          1 x 4 + 0 + 1 x 1 + ½ + 0 + 1/8
                                 =          4 + 0 + 1 + 0.5 + 0.125
                                 =          5.62510

Octal Number System

Octal Number System consists of eight digits from 0 to 7. The base of octal system is 8. Each digit position in this system represents a power of 8. Any digit in this system is always less than 8. Octal number system is used as a shorthand representation of long binary numbers. The number 6418 is not valid in this number system as 8 is not a valid digit.
The place value of each digit according to position and weight is as follows.
Position
4
3
2
1
0
Weight
84
83
82
81
80

Example: convert 458 to decimal number

458       =          4 x 81 + 5 x 80
            =          4 x 8 + 5 x 1
            =          32 + 5
            =          3710     

Hexadecimal number system

The Hexadecimal Number System consists of 16 digits from 0 to 9 and A to F. The alphabets A to F represent decimal numbers from 10 to 15. The base of this number system is 16. Each digit position in hexadecimal system represents a power of 16. The number 76416 is valid hexadecimal number. It is different from 76410 which is seven hundred and sixty four. This number system provides shortcut method to represent long binary numbers.
The place value of each digit according to position and weight is as follows:
Position
4
3
2
1
0
Weights
164
163
162
161
160

Example: Convert 3A16 to decimal number

3A16     =          3 x 161 + A x 160                                               
            =          3 x 16 + 10 x 1
            =          48 + 10
            =          5810

0 Response to "Number System in computer"

Posting Komentar