Digital & Computing

### Become an OU student

Crossing the boundary: analogue universe, digital worlds

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

# 4.2.1 Reducing and processing text

You are familiar with the idea of a word processor. Although I grew up long before the era of word processing, it's now difficult for me to imagine how I ever lived without one. Word processors enable us to enter text into the computer, edit and fiddle about with it, store it and then print it out when we are satisfied with the result. That's exactly what's happening as I write this course. But, if the text spends time inside the computer before being returned to print, that must mean it exists there in the form of numbers. It's inside the boundary. How can text be made into numbers?

Let's use the following famous line from Shakespeare as an example:

Rough winds do shake the darling buds of May

(Sonnet 18)

This presents no problem to the human eye. We read it straight off. Actually the process by which we read, recognise, understand, combine and understand textual symbols is complex and not fully understood – but that's another course.

## Exercise 8

How do you think this line could be transformed into numbers?

### Discussion

You may have been thinking along the following lines. Pick one number to represent each letter – 1 for ‘a’, 2 for ‘b’, …, – and then simply substitute the number for that letter in the line.

I did say earlier that the computer world is a simple world, and transforming text into numbers is as straightforward as that. First, we assign a unique number to each letter in the alphabet. Each letter in the text now becomes a number inside the computer. I'm going to make the following choices:

letter   a   b   c   d   e   f   g   h   i   j   k   l   m
number979899100101102103104105106107108109
letter   n   o   P   q   r   s   t   u   V   w   X   y   z
number110111112113114115116117118119120121122

These choices probably seem fairly arbitrary, but let's stick with them for the moment. Now if I simply substitute each letter with the number I've chosen for it, our line for will look like this inside the computer (the breaks to a new row have no significance):

 114 111 117 103 104 119 105 110 100 115 100 111 115 104 97 107 101 116 104 101 100 97 114 108 105 110 103 98 117 100 115 111 102 109 97 121

It looks as if the problem of converting text into numbers has been solved.

## SAQ 6

Before going on, do you think the above table is a complete representation of the line of poetry?