The methods for doing the same are described as below.

Textual information like a file or a document comprises of a collection of numbers, characters and special characters for example punctuation marks and symbols. A computer uses the following procedures for the conversion of Text to binary

Decimal numbers are the numbers whose base is 10 i.e. it uses ten digits (0 to 9) to represent the values, while binary is the number system whose base is two, it uses 0's and 1's to represent the numbers.

Each binary bit has a position assigned to it. The zeroeth position is assigned to the least significant position on the right most side. The 0 or 1 at the respective position is then multiplied by the corresponding power of two to obtain its decimal equivalent i.e. A digit at Kth position is multiplied by 2 ^(k-1). For example

Real numbers may be put into binary scientific notation: a x 2^b .The number to the right of decimal part must be multiplied by negative powers two of the corresponding position .The number to the left hand side must be multiplied by the positive powers of two. Mantissa and exponent are then stored .For example

Each and every character, symbol or punctuation mark is mapped to a corresponding decimal number .For example letter K is mapped to number 75, the number is then encoded by using ASCII code to a string of Binary numbers. ...