This topic will go over using a different counting system other than the one we use (base 10). It could be helpful to have more 1 digit numbers other than 0-9. We will use the letters a-z to represent this.
To Start:
What is Base 10?
Base 10 is a form of counting that includes 10 digits, 0-9. Once we get to 9, we go to two digit numbers because we run out of 1 digit numbers. The next number is not ten, but yet one zero. (10) The first number is 00, then 01, and so on until 10. When creating my maze bigger, I encountered a problem. Once I got to two digit numbers, it stopped working. I needed to create a much longer base system for it to work.
If our regular counting system is base 10, what is base 5?
Base 5 uses 5 digits instead of our usual 10. It includes the numbers 0, 1, 2, 3, and 4. [1] One we get to 4, we donāt go to 5. We go to 10. Why?
If you think about it, we ran out of 1 digit numbers. We immediately start our two digit numbers. Here is a list of base 5 numbers:
0, 1, 2, 3, 4, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44, 100.
Okay, I now understand how to get to lower bases, but how do we get to higher bases?
The way we get to higher bases is this:
**We are using base 15 in our example
-
We start with our usual 0-9, but here is where it gets a little more tricky.
-
We start using our alphabet. The next number after 9 is a. The next number after a is b, and so on.
This is base 15:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1a, 1b, 1c, 1d, 1e, 20.
Some math:
9 + 1 = a
a + 3 = d
b + 4 = 10
Here is where the research tag comes in. We need a way to recreate this in Gimkit. I know how to do addition and subtraction, but multiplication and division is a lot harder to recreate. I would appreciate if yāall could help on this!
A video on baseās.
Addition
I am using base 20 in this example. Here are steps the inputs a
and 1
take in this code to reach the output of b
.
-
The property
input1
is set toa
andinput2
is set to1
.inputOverall
is set to 0 by default and"tens"
is set to 1 by default.leftoverChecking
is set tofalse
by default. -
The first thing to note Is the amount of properties. You need to create a property for each numeral in the base. DO THIS FOR EVERY NUMERAL; EVEN NUMBERS 0-9.
-
wip
Subtraction
wip
Multiplication
wip
Division
wip
The reason we donāt include 5 is because 0 counts as a digit. ā©ļø