By its very definition, ASCII is a code system used to express English characters in binary or hexadecimal form. What if one sought an Enigma-like system in which alphanumerics and punctuation are signified by other characters? Could ASCII be used for such a purpose? It is helpful first to re-introduce the ASCII table:
For the following mathematical code systems, it is necessary to take note of the decimal representations of the ASCII characters, not often practically employed (e.g., A = 65, d = 100). Indeed, it is much easier and more useful to learn the hexadecimal (and consequently, binary) representations of the ASCII characters. However, since the aforementioned mathematical quirk arising from the “DeMarchis Riddle” is applicable only in base 10, the base-10 ASCII values should be considered.
Recall the necessary steps to realize the anomaly:
- Take any whole number x and subtract it by the sum of its digits [x – digitSum(x)].
- Divide that difference by 9 to yield a whole number quotient [(x – digitSum(x)) / 9].
- Add that quotient to the original number to obtain y [x + (x – digitSum(x)) / 9 = y].
For each value of x, there is a corresponding and unique value of y obtained by the following formula:
y(x) = [10x – digitSum(x)]/9
To encode a particular ASCII character, simply assign the decimal representation of the character to x and rewrite the character as the one corresponding to the decimal value y. For example, the capital A is signified by 65. Inserting 65 into the y(x) function yields 71, which corresponds in ASCII to the capital G. Using this system, I can encode my full first name as:
Gz???{zt{
In attempting to encode the “t,” we encounter a problem. The traditional ASCII table only consists of decimal codes up to 127, and the 116 code signifying the lowercase t is manipulated to 128, which does not appear in the table above. Thus, to encode characters near the end of the table, it is necessary to employ the extended ASCII table, which encodes 128 additional characters with hexadecimal values 80 through FF. Although the extended table is not uniform among the different operating systems, I shall focus on the Apple (Mac OS) version of the table:
In the table above, a character’s hex code is signified by the digit of its column followed by the digit of its row. Thus, the recognizable Apple logo is encoded as F0. One disadvantage is that the table requires a intermediate conversion from hexadecimal to decimal, certainly not a trivial process. With the decimal number 128 equal to the hex value 80, I can now express my complete first name with ASCII and extended ASCII characters:
GzÄ{zt{
What is your name expressed in this new code? Of course, any attempted representations of high-value extended ASCII characters (e.g., the degree symbol) are futile, as there is no additional ASCII table for hex values larger than FF; this would require more than one byte per character. I am currently working on a Python program that will output encoded letters for a given input (e.g., a word). Although this particular code system is not the most secure or most difficult to grasp, it illustrates a working combination of both the ASCII system and the intriguing arithmetical anomaly discovered (to our knowledge) by my grandfather little more than five years ago.
Again, I still have no clue what’s going on here, which will continue to be the common theme.
Unfortunately, I couldn’t see the image for the new code! So I couldn’t figure out how to write my name. I did try the older one though and of course failed lol. Good post!!
All of these programs seem extremely cool. My name is 068 097 118 105 100 in ASCII. I am interested in what I can code my name into next. I also think it is super cool ow you can encode symbols as well as letters.
Interesting how ASCII doesn’t stand for letters but rather numbers. I’m a bit confused this week… I also couldn’t get the photo to load so I wasn’t able to figure out my own name. Interesting post this week, I’m going to look into it on my free time.
I am sorry. All of my comments will be the same thing. I am SOOO awful at math. I cannot wrap my mind around it at all.