In this exercise we are required to implement 7 basic 'unsigned integer' arithmetic functions in base-63:
- to63(x) - converts an integer from base-10 to base-63.
- to10(x) - converts an integer from base-63 to base-10.
- add(x,y) - adds two base-63 integers.
- sub(x,y) - subtracts two base-63 integers.
- mul(x,y) - multiplies two base-63 integers.
- div(x,y) - performs integer division between two base-63 integers.
- mod(x,y) - returns the remainder of division between two base-63 integers.
NOTES:
- All outputs shall be char-string format.
- Except for the function 'to63' (which may input numbers), all inputs shall be in char-string format.
- Use the numerals '0' to '9' for digits 0 to 9, capital letters 'A' to 'Z' for digits 10 to 35, lower case letters 'a' to 'z' for digits 36 to 61 and the symbol '_' (underscore) for digit 62.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers5
Suggested Problems
-
Recurring Cycle Length (Inspired by Project Euler Problem 26)
168 Solvers
-
Integer Sequence - II : New Fibonacci
703 Solvers
-
compress sequence into intervals
100 Solvers
-
3674 Solvers
-
Create block matrix of integers (j+k-1) - Part II
102 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
As far as I can tell, the template solution is useless to even frame the answer. After I figured out how to frame the solution, I found this which might help (MATLAB Staff solution, not Xiangrui Xi's solution).
https://www.mathworks.com/matlabcentral/answers/100539-how-can-i-access-subfunctions-from-outside-the-main-function-in-matlab