1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
0.00000000010011110000000001100110000000000010000000000000011011010000000001111001000000000010000 0000000000110010000000000011101010000000001101100000000000110110000000000001000000000000001100010 0000000001100101000000000110000100000000011100100000000001100101000000000111001000000000001000000 0000000011101110000000001101000000000000110010100000000011011100000000000100000000000000110011000 0000000111001000000000011011110000000001101101000000000010000000000000011101000000000001101000000 0000001100101000000000110010100000000001000000000000001001001000000000010000000000000011100110000 0000011100000000000001100101000000000110010100000000011001000000000000111010000000000101010000000 0000110100100000000011011000000000001101100000000000010000000000000010010010000000000100000000000 0001110010000000000110010100000000011101000000000001110101000000000111001000000000011011100000000 0001011000000000000100000000000000110111100000000011001100000000000100000000000000111000000000000 0110111100000000011100110000000001110100000000000110100100000000011011100000000001100111000000000 0100000000000000110100100000000011100110000000000100000000000000110111000000000011011110000000000 1000000000000001101110000000000110010100000000011001010000000001100100000000000010111000000000010 1011100000000011010000000000001100101000000000110111000000000001000000000000001110011000000000111 0111000000000110100100000000011001100000000001110100000000000010000000000000011001010000000001111 0000000000001110100000000000111001000000000011001010000000001101101000000000110100100000000011101 0000000000011110010000000000100000000000000110001100000000011000010000000001101110000000000010000 0000000000111001100000000011001010000000001100101000000000110110100000000001000000000000001100010 0000000001110101000000000111010000000000001000000000000001110011000000000110110000000000011011110 0000000011101110000000000111111000000000100100100000000011011100000000000100000000000000111011100 0000000110100100000000011011100000000001100111000000000110010100000000011001000000000000100000000 0000001110011000000000111000000000000011001010000000001100101000000000110010000000000001000000000 0000011011100000000001101111000000000010000000000000011011010000000001101111000000000111010000000 0000110100100000000011011110000000001101110000000000010000000000000011100110000000001101000000000 0001100001000000000110110000000000011011000000000000100000000000000100100100000000001000000000000 0011010110000000001101110000000000110111100000000011101110000000000101100000000000101010000000000 0110100000000000011001010000000001110010000000000110010100000000011001100000000001101111000000000 1110010000000000110010100000000001000000000000001100100000000000110010100000000011100110000000001 1010010000000001110010000000000110010100000000001011000000000000100000000000000010100000000000011 0111100000000011001100000000000100000000000000111000000000000011001010000000001110010000000000110 0110000000000110010100000000011000110000000001110100000000000010011100000000011100110000000001110 1000000000000100000000000000110110000000000011011110000000001110110000000000110010100000000001000 0000000000011000100000000001100101000000000110100100000000011011100000000001100111000000000010000 0000000000110110100000000011000010000000001100100000000000110010100000000001010010000000001000010 0000000001110101000000000111010000000000001000000000000001101100000000000110111100000000011101100 0000000011001010000000000101100000000000010000000000000011001100000000001101111000000000111001000 0000000010000000000000011011000000000001101111000000000111011000000000011001010000000000101100000 0000000100000000000000111010000000000011010000000000001110101000000000111001100000000001000000000 0000011100110000000001101000000000000110000100000000011011000000000001101100000000000010000000000 0000110010100000000011110000000000001100011000000000111010100000000011100110000000001100101000000 0000100000000000000110110100000000011110010000000000100000000000000110101000000000011000010000000 0011001000000000001100101000000000010110100000000001000000000000000100000000000000010000000000000 0101010000000000011011110000000001110111000000000110000100000000011100100000000001100100000000000 1110011000000000010000000000000011101000000000001101000000000000110010100000000011001010000000000 1000000000000001001001000000000010011100000000011011000000000001101100000000000010000000000000011 1001000000000011101010000000001101110000000000010110000000000001000000000000001100001000000000110 1110000000000110010000000000001000000000000001100111000000000110100100000000011101100000000001100 1010000000000100000000000000110100000000000011010010000000001101101000000000010000000000000011011 0000000000011001010000000001100001000000000111011000000000011001010000000000100000000000000111010 000000000011011110000000000100000000000000110011100000000011011110000000000101110 |
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
BufferedReader reader; String tempLine; char c; int numLines = 0; PrintWriter writer; void setup() { try { reader=createReader("Sonnet51_Split.txt"); writer = createWriter("TextAsData.txt"); writer.print("0."); while ((tempLine = reader.readLine ()) != null) { c = tempLine.charAt(0); writer.print(binary(c)); } writer.flush(); writer.close(); } catch (IOException e) { println("Error reading file!"); println(e); } exit(); } |