Number System




The data stored in the computer may be of different kinds, as follows—

·  Numeric data (0, 1, 2, …, 9)

·   Alphabetic data (A, B, C, …, Z)

·   Alphanumeric data—Combination of any of the symbols—(A, B, C… Z), (0, 1… 9), or special           characters (+,−, Blank), etc.

All kinds of data, be it alphabets, numbers, symbols, sound data or video data, is represented in terms of 0s and 1s, in the computer. Each symbol is represented as a unique combination of 0s and 1s.

 NUMBER SYSTEM
A number system in base r or radix r uses unique symbols for r digits. One or more digits are combined to get a number. The base of the number decides the valid digits that are used to make a number. In a number, the position of digit starts from the right-hand side of the number. The rightmost digit has position 0, the next digit on its left has position 1, and so on. The digits of a number have two kinds of values—
·         Face value, and
·         Position value.

The face value of a digit is the digit located at that position. For example, in decimal
number 52, face value at position 0 is 2 and face value at position 1 is 5.

The position value of a digit is (baseposition). For example, in decimal number 52, the

position value of digit 2 is 100 and the position value of digit 5 is 101. Decimal numbers

have a base of 10.

The number is calculated as the sum of, face value * baseposition, of each of the digits.

For decimal number 52, the number is 5*101 + 2*100 = 50 + 2 = 52

In computers, we are concerned with four kinds of number systems, as follows—

·         Decimal Number System —Base 10
·         Binary Number System —Base 2
·         Octal Number System —Base 8
·         Hexadecimal Number System—Base 16

The numbers given as input to computer and the numbers given as output from the computer, are generally in decimal number system, and are most easily understood by humans. However, computer understands the binary number system, i.e., numbers in terms of 0s and 1s. The binary data is also represented, internally, as octal numbers and hexadecimal numbers due to their ease of use.

A number in a particular base is written as (number)base of number For example, (23)10 



means that the number 23 is a decimal number, and (345)8 shows that 345 is an octal 




number.

               Decimal Number System

·         It consists of 10 digits—0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
·         All numbers in this number system are represented as combination of digits 0-9.                For example, 34, 5965 and 867321.
·         The position value and quantity of a digit at different positions in a number        are as follows—



            

             Binary Number System

·         The binary number system consists of two digits—0 and 1.
·         All binary numbers are formed using combination of 0 and 1. For example,              1001, 11000011 and 10110101.
·         The position value and quantity of a digit at different positions in a number           are as follows—




                  

      

     Octal Number System 

·     The octal number system consists of eight digits—0 to 7.
·     All octal numbers are represented using these eight digits. For example, 273, 103,                   2375, etc.
·    The position value and quantity of a digit at different positions in a number are as          follows—






               


                Hexadecimal Number System

·         The hexadecimal number system consists of sixteen digits—0 to 9, A, B, C, D,         E, F, where (A is for 10, B is for 11, C-12, D-13, E-14, F-15).
·         All hexadecimal numbers are represented using these 16 digits. For example, 3FA,                     87B, 113, etc.
·         The position value and quantity of a digit at different positions in a number         are as follows—



Table1 summarizes the base, digits and largest digit for the above discussed number systems. Table2  shows the binary, octal and hexadecimal equivalents of the decimal numbers 0–16.


Table 1: Summary of number system


Table 2: Decimal, binary, octal and hexadecimal equivalents




Comments

Popular posts from this blog

Chapter 2 Windows

Fundamentals of computer

Functions of CPU, Memory and Input /Output Devices