Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The Input of http://pastebin.com/F9ZDQZYC is: "THE EYES ARE USELESS WHEN THE MIND IS BLIND".
- Code #3 is like Code #1 but you're now able to use multiple instances of the same letter and its output varies.
- Our input will be: "HELLO WORLD" and we'll encode one word at a time.
- HELLO is 5 characters long, meaning we need to make a 5x5 square & fill in the alphabet.
- 1 2 3 4 5
- 1 A B C D E
- 2 F G H I J
- 3 K L M N O
- 4 P Q R S T
- 5 U V W X Y
- Since we've filled the whole 5x5 square with most of the alphabet(A-Y), the "Z" will be apart of the next group(A) of 5x5 squares.
- ------------1st GROUP has no Group letter------------
- 1 2 3 4 5
- 1 A B C D E
- 2 F G H I J
- 3 K L M N O
- 4 P Q R S T
- 5 U V W X Y
- ------------2nd Group will be defined by "A"------------
- 1 2 3 4 5
- 1 Z _ _ _ _
- 2 _ _ _ _ _
- 3 _ _ _ _ _
- 4 _ _ _ _ _
- 5 _ _ _ _ _
- Our output will now have a padding of "X"'s, and it will be as long as how many spots are in the group (in this case, 5x5=25)
- XXXXXXXXXXXXXXXXXXXXXXXXX
- Just like Code #1, Knowing the number form of letters, A=1,B=2,C=3...Z=26, We now place the order letter in the position of the letter's number.
- (H)ELLO XXXXXXX1XXXXXXXXXXXXXXXXX
- If our first letter happened to be "Z", then we would know that "Z" is apart of GROUP A, BUT is in the 1st postion in the 5x5 grid, meaning:
- Our Z, (1st character being encoded: Order number = 1), would be in the 1st postion of our output:
- (Z)ello (X)XXXXXXXXXXXXXXXXXXXXXXXX
- (Z)ello (1)XXXXXXXXXXXXXXXXXXXXXXXX
- Since "Z" is in Group A, we need to show that in your output by adding ".A" after the "1":
- (Z)ello (1.A)XXXXXXXXXXXXXXXXXXXXXXXX
- and it would look like this:
- (Z)ello 1.AXXXXXXXXXXXXXXXXXXXXXXXX
- Now back to our actual input: H(E)LLO
- H(E)LLO XXXX2XX1XXXXXXXXXXXXXXXXX
- HE(L)LO XXXX2XX1XXX3XXXXXXXXXXXXX
- Now we have a 2nd instance of the same letter (two L's), All we do to show that multple letters are apart of that position is add a "|" between them:
- HEL(L)O XXXX2XX1XXX3|4XXXXXXXXXXXXX
- HELL(O) XXXX2XX1XXX3|4XX5XXXXXXXXXX
- and if we had to encode a letter from a different group, same rules apply.
- If you find it a bit hard to understand when trying to decode, space out the columns:
- Final:
- HELLO = XXXX2XX1XXX3|4XX5XXXXXXXXXX
- Final with 25 columns spaced out:
- HELLO = X X X X 2 X X 1 X X X 3|4 X X 5 X X X X X X X X X X
- To save time, Here is how the rest of the input would look:
- HELLO WORLD:
- XXXX2XX1XXX3|4XX5XXXXXXXXXX
- XXX5XXXXXXX4XX2XX3XXXX1XXX
- Essentially, you can also do the same thing as Code #1 and repeat the numbers if you wanted to:
- HELLO WORLD:
- 222221113333|45552222222222
- 55554444444422233311111555
- That's all there is to this code. :D
- Thanks for participating for Code #1! :D
- - DWC
Advertisement
Add Comment
Please, Sign In to add comment