Morse Code Extended 4A5L
Transforming Messages to/from Upper Case Letters.
©2013, Bob Beeman
Updated 2013-07-27 @ 17:59 EDT (UT-4)
Read More
Important Notice

Antique ciphering machines such as the Enigma only work with the 26 Upper Case English letters. Thus spaces between words are lost, numbers must be spelled out, sentence endings must be replaced with "STOP", and many special symbols used in ordinary Morse Code cannot be used because they cannot be encoded by these machines. The 4A5L code allows any of the characters in the list below to be represented by mapping a block of 4 base 58 characters (shown below) to a new block of 5 base-26 letters. The last 4-character block is padded with trailing spaces, if necessary.
ASCII
Add Pad
Letters


Read More
The code 4A5L is so named because it encodes a block of 4 US-ASCII characters from the subset shown below, into 5 UPPER CASE US-ASCII letters. Essentially, it does a base-conversion operation between base 58 (ASCII) and base 26 (Letters). Push the "Decode" Button to demonstrate decoding of 5-letter blocks to the less restrictive character set defined below. "[sp]" signifies the ASCII "space" (decimal 32, Hex 20) character, and "[cr]" signifies the ASCII "newLine" character appropriate to your operating system.

[sp]abcdefghijklmnopqrstuvwxyz0123456789.,?'!/()&:;=+-_"$@*%[CR]

The restricted subset of ascii input characters is defined in the variable chars4A5L and presently consist of the characters shown above. These are all of the 54 defined morse code letters, numbers, punctuation in the table near the bottom of the Wikipedia Morse Code article plus the characters {space}, "%", "*", and {CR}. These were added to explicitly encode "* and "%", spaces between words, and carriage returns, allowing paragraphs to be separated. The software on this page converts everything to lower case and eliminates characters that can't be encoded before encoding the items in the top box and placing the encoded text in the bottom box. The button associated with each box fills the other box with the encoded/decoded information.

There are only 11,316,496 numbers (0 - 11,316,495) represented by 4 characters in base 58 whereas there are 11,881,376 numbers represented by 5 characters in base 26. For this reason there are 564,880 numbers (from 11,316,496 through 11,881,375) in base 26 that don't represent anything in base 58. These base26 that have no base58 equivalent run from "YTWJW" to "ZZZZZ". If this is the input to a code, having a gap in the cyphertext this large is not a good thing, as it can serve as a kind of "frequency table" crib.

If this code is used as the input to a cypher, this could be eliminated as a problem if during encoding of each block a (pseudo) random number between 0 and 11,881,375 is generated. If this number is larger than 10,751,615, then a block of 5 UPPER CASE characters is inserted into the ciphertext with an encoded value equal to the random number. These would be inserted upon encoding and ignored on decoding.


This page is copyrighted "freeware"
©2013, Bob Beeman
www.bee-man.us
That means that although it is copyrighted, it is intended for you to use for your education or entertainment. Use for any other purpose is a violation of the copyright. You may use it yourself, copy and redistribute it, or even put it on your own website. I ask only that you not make any changes, and that you credit me as the source and reproduce this Notice unaltered and in its entirety. If you reuse any of the code, make sure to list me as one of your sources.

My only reward for writing this is the 15 milliseconds of fame I receive from having my name here. Don't deprive me of that.

You can copy this page by simply doing a "Save As" in your browser and putting it somewhere on your hard drive (or your web site). If you stop there the background will be gone. To preserve the background, copy the following file into this same folder, without changing its name, by again using your browser's "Save As". The next time you refresh the page, the background should be restored:

www_bee-man_us_background.gif

This page is for entertainment purposes only.

I make NO guarantee of any kind.
This page may contain serious errors.
Use this page entirely at your own risk!

I am not an accountant, doctor, financial advisor, or lawyer.
Nothing on this page or anywhere on this site should be construed as
financial, investing, legal, or medical advice.