Text as Number

 

I wrote a simple Processing sketch that returns binary values of characters from a split file (one letter per line), with an appended “0.” in front – this essentially makes this a single very complex number that holds all the information of the text.  Above is Shakespeare’s 51st sonnet stored as a number.

Based on a thought in Gary William Flake’s “The Computational Beauty of Nature” (pg 21).  As Flake describes it, “Now take a long number and put a zero and a decimal point in front of it.  We’ve just translated one huge number into a rational number between 0 and 1.  By placing this single point at exactly the right spot on the number line, we can store an unlimited amount of information.”

I think especially interesting is the idea that rather than the sonnet be translated to a number between 0 and a giant number (say 100 trillion, etc), the number is only between 0-1 but occupies a very specific point on the number line.  The resulting number is unique and no other text has that exact value.

Source code: