# A brief Introduction of Data Representation in Computer Science

**Introduction**: Data is usually combination of numbers, characters and special. This data has to be worked upon by the computer as well as it has to be ported from place to place, i.e. data has to flow from place to place within the computer hardware. As the computer is s electronic device and it works with electronic pulses, this data or information should be in the form which is machine readable and understandable, for this reason, data has to be represented in the form of electronic pulses.

This data has to be converted into electronic pulses and each pulse should be identified with a code. For these reasons, the data is converted into numeric format first, by using worldwide standard called ASCII i.e. **American standard code for information interchange**, where each and every character, special character and keystrokes have numerical equivalent. Thus using this equivalent, the data can be interchanged into numeric format. For this numeric conversion we use number systems, each number systems has a radix or base, which conversion we user number of digits in that number system. A quick look at number system, gives us the following number systems:

**Decimal Number System**

This number system probably has taken its birth when mankind started counting using his fingers, which has a count of 10, i.e. this number system is based on the concept as 10 or the radix of this number system is 10. The digits of this number system are 0-9. If these numbers are to be used to represent data in a computer, there is a requirement operations complicated.

In this system the value of a digit depends on the position or “weights” they occupy. These positions are in the multiples of 10, i.e. the radix of the system.

**For example**:

Position 5th 4th 3rd 2nd 1st

Weight 10-4 10-3 10-2 10-1 10-0

To represent a number i.e. 1234 we can say,

1234=1*10-3+2*10-2+3*10-1+4*10-0

=1000+200+30+4

= (1234)10 (10-4 =denotes raise to power)

To distinguish the numbers belonging to different number systems we use. The radix of that number system as subscript e.g. (1234)10 means the number 1234 belongs to the number system with radix 10 i.e. decimal number system.

To overcome the problem of using 10 different pulses for represented 10 digits of the decimal number system, and to make things simpler for computers, Binary number system is used, where into deals with only two digits thereby reducing the complexity. Numbers from one number system can be inter conversion to other number systems.

**Binary number system:** It is the number system which represents only two digits and has a radix of two (2). The numbers of this system are 0 & 1. The advantage of this numbers system is that, as there are only two distinct digits one can use only two electronic pulses to represent system i.e. 0 and 1 are :

a) Absence of pulses (current) for 0 and

b) Presence of pulse (current) for 1.

Thus the total task of representing data becomes easier. All the data can be coded as combination of these digits. The data from one number system can be converted to binary number system and various combinations of 0’s and 1’s can be used to represent the data.

### The major advantage of using this number system are:

The cost of the circuit used in computers decrease to a great extent, as it has to handle only two pulses, which simplifies its design. As the circuit is simple, its reliability increases. All the operations which can be done in decimal system can also be done binary system. Computers identify digital (pulses) which represented either high voltage or low voltage.