journal:spring2020:cdevlen:week9

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision | |||

journal:spring2020:cdevlen:week9 [2020/03/25 18:26] cdevlen [MONTH Day, YEAR] |
journal:spring2020:cdevlen:week9 [2020/03/25 21:27] (current) cdevlen [March 25, 2020] |
||
---|---|---|---|

Line 3: | Line 3: | ||

====March 25, 2020==== | ====March 25, 2020==== | ||

- | This week I learned how to do basic math on a base 8 numeric scale, which is interesting. In the pct9 project, the math was all base 8, and so the numbers that had to be found were 0-7 instead of 0-10. The other trick to solving problems in this manner is that when borrows occur, you have to add 8 instead of 10. The trick I learned last week where you find some rules and then plug and chug values in order to narrow possibilities worked great with this project. I was able to find the solution with about the same amount of effort as the base 10 puzzles, which was great. There was a quirk once I found the solution though; every subtraction in the check worked, but when plugged into a calculator, the math didn't work. After an email, I realized the reason that was happening is because by default, a calculator uses a base 10 number system, and so the solution would be different. When the numbers are plugged into a base 8 calculator, the solutions match. As for sam0, this week I figured out the math for looping Aa to Zz, which is dividing the key using % by 26, so there's no rmainder, and once that key is added to byte[count], subtracting 'A' or 'a' respectively, in order to accomplish a loop. However, I have run into several issues with the code now, including not encoding all of the message, not applying my mathematical changes, and getting seg-fault errors when my code is run usimg a key from the command line. | + | This week I learned how to do basic math on a base 8 numeric scale, which is interesting. In the pct9 project, the math was all base 8, and so the numbers that had to be found were 0-7 instead of 0-10. The other trick to solving problems in this manner is that when borrows occur, you have to add 8 instead of 10. The trick I learned last week where you find some rules and then plug and chug values in order to narrow possibilities worked great with this project. I was able to find the solution with about the same amount of effort as the base 10 puzzles, which was great. There was a quirk once I found the solution though; every subtraction in the check worked, but when plugged into a calculator, the math didn't work. After an email, I realized the reason that was happening is because by default, a calculator uses a base 10 number system, and so the solution would be different. When the numbers are plugged into a base 8 calculator, the solutions match. As for sam0, this week I figured out the math for looping Aa to Zz, which is dividing the key using % by 26, so there's no remainder, and once that key is added to byte[count], subtracting 'A' or 'a' respectively, in order to accomplish a loop. However, I have run into several issues with the code now, including not encoding all of the message, not applying my mathematical changes, and getting seg-fault errors when my code is run using a key from the command line. |

journal/spring2020/cdevlen/week9.txt · Last modified: 2020/03/25 21:27 by cdevlen

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International