Quaternary is pretty underrated
1: What is Quaternary?
You know how we count numbers? 1, 2, 3, 4, 5..., 10, 11.
Quaternary is like that, but instead of stopping new digits at 10, it stops at 4. This is how it counts:
1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 100...
More specifically, each digit in a number is only 4 times bigger than the one to the right, as opposed to 10.
For example, 1 * 4² + 2 * 4¹ + 3 * 4⁰ (so the quaternary number 123) = 2 * 10¹ + 7 * 10⁰ (so the decimal number 27).
This might seem confusing, but I can assure you, you will get used to it over time as you see more and more quaternary numbers.
2: Why Quaternary?
There are several things that make a base (counting system, like quaternary or decimal) good or bad. Here are a few:
- Size
- Factors
- Divisibility tests
- Adjacent numbers
- Ease of arithmetic
- How fractions are written
Let's examine them in the context of base 4, then compare to other bases.
2.A: Size
Size matters in determining the number of digits a number has in the base, ease of learnability, and ease of arithmetic.
Four is a pretty small number. In fact, there are only 2 numbers smaller than it that can even be bases at all. In this regard, 4 is considered too small, but it's really not as bad as it might seem, especially for smaller numbers.
For example: a hundred is 1210 in quaternary, a thousand is 33220, and ten thousand is 2,130100.
2.B: Factors
4 is once again pretty bad here, only having 2.
Now so far, base 4 seems pretty bad, but it very much makes up for it in the later items.
2.C: Divisibility Tests
This is where quaternary shines. Here's every divisibility test up to 12.
2: Is the last digit 0 or 2 (is it even)?
3: Is the sum of all the digits a multiple of 3?
4: Is the last digit 0?
5: Find the difference between the sum of the digits at the odd places and the sum of the digits at the even places. Is it 0 or a multiple of 5?
6: Is it even and is the sum of the digits a multiple of 3?
7: Multiply the last digit by 2 and add it to the rest of the number (so excluding the last digit). Is the number divisible by 7? (This can be repeated down to 7 itself)
8: Is the number without the last digit even and the last digit 0?
9: Multiply the last digit by 2 and subtract it from the rest of the number. (Same rules apply as for the 7 one)
Note: I just lucked upon this one after looking for analogous tests in decimal. It may not be correct for all numbers.
10: Is it even and divisible by 5?
11: Same as 7 but multiply the last digit by 3 instead.
2.D: Adjacent Numbers
This is important because the numbers next to a base are easier to deal with. And for quaternary, the numbers next door are 3 and 5, which means that by definition 1/3 = 0.111... and 1/5 = 0.030303... This makes it easier to do arithmetic with them.
Similarly, the same concept applies to powers of that number, but it becomes less important as the power increases. For example, the fact that 7 divides 1001 doesn't really matter.
In base 4, 4² + 1 being seventeen helps deal with seventeen, 4³ - 1 being 9 * 7 helps with seven, and 4³ + 1 being 13 * 5 helps deal with thirteen.
2.E: Ease of Arithmetic
Addition and subtraction are about the same as in decimal, with the only difference being that overflowing happens at 4 and not 10.
On the other hand, quaternary makes multiplication and division very easy. To get started with multiplication, all you have to know is that 1 * anything = anything, 0 * anything = 0, 2 * 2 = 10, 2 * 3 = 12, 3 * 3 = 21 and that switching numbers around gives the same result.
That's it. No multiplication table needed. The same thing about overflowing goes here too.
Division isn't too different, except there are now only 4 numbers you can even guess at all, as opposed to decimal's 10.
2.F: Fractions
And lastly, how fractions are written.
1/2 = 0.2
1/3 = 0.1... (r1)
1/10(4) = 0.1
1/11(5) = 0.030303... (r03)
1/12(6) = 0.020202... (r02)
1/13(7) = 0.212121... (r21)
1/20(8) = 0.02
1/21(9) = 0.013013013... (r013)
1/22(10) = 0.0121212... (0r12)
1/23(11) = 0.011310113101131... (r01131)
1/30(12) = 0.0111... (0r1)
1/31(13) = 0.010320103201032... (r01032)
1/32(14) = 0.01212121... (01r21)
1/33(15) = 0.010101... (r01)
1/100(16) = 0.01
I know, there are a lot of non-terminating ones, but if you remember the repeating part (see the parentheses) then they are quite easy to remember, especially compared to seximal's 1/11 and 1/13 or dozenal's 1/5 and 1/7 or basically all of octal's fractions honestly.
3: Oh Yeah, The Comparisons
By the way, I do recommend that if you aren't really that informed about bases, go do some research and watch some videos on it before reading this. (Jan Misali has seximal.net and some videos on his channel that I would recommend.)
Binary
It has some fun mathematical properties and even a SQUARE ROOT Algorithm, but numbers just have way too many digits to handle. Sorry! (Yes, I did watch that video, but I still find binary impractical, since human brains aren't living in mathland and so binary is needlessly simple in arithmetic and such, which causes it to become hellish if you're doing anything that depends on the number of digits to do well.)
A.
Balanced Ternary
It's still ternary, so it's not really that good, but it's unique, I guess.
C+.
Quaternary
Seximal
The rest of the site may have made it seem like quaternary is my favorite, but this is. Quaternary is just ignored way too much and it is a solid second of mine, and definitely the best power of two base. I will give my reasons for not liking octal and hexadecimal in their respective segments. But seximal is just way more practical than this, although I will point out that seximal is worse at 11's and 13's thank you very much
A+.
Octal
It is terrible at 3's (0.252525..., seriously?) AND 5's (0.14631 repeating, why?) AND 11's (not really that important).
I don't even tolerate this. It is a scourge upon mankind and while it is not the worst base in theory, the fact that people like it so much makes it my least favorite.
Ultra-F.
Decimal
Honestly, it's actually really good for being selected entirely by coincidence. If you are someone who works with fives a lot, it may be even better than dozenal.
B.
Dozenal
Absolutely abysmal performance with fives (0.2497 repeating), but every other aspect is pretty good.
B+.
Hexadecimal
Way too big for my liking. Imagine having to memorize 105 entries of the multiplication table to do multiplication.
B.
Vigesimal
Worse version of decimal.
C.
Sexagesimal
Very nice but too big.
C+.
4: How Say Number Mouth?????
This is very much open to suggestions. Email quaternarylover@gmail.com any suggestions you may have.
By basically cheating and using a hexadecimal system.
You see, each digit (starting from the right) can be grouped into pairs to make hexadecimal digits, which we can use since a proper base 4 pronunciation system would take too long.
The digit names remain the same (1 = one, 11 = five, 23 = eleven, 33 = fifteen, etc.). And the power names are:
16 = hex
16² = byte
16³ = hexand
...
16⁶ = millihex
...
16⁹ = billihex
...
Oh yeah, digits are grouped into sixes instead of threes because of this.
Examples are:
1,231230: one hexand eleven byte six hex twelve
312012,123021: thirteen byte eight hex six hexand six byte twelve hex nine
5: Alternate Digit Designs
As you hopefully know by now, quaternary has only 4 digits. So naturally, we can make these digits simpler than the current 0123's, as those also have to differentiate from 6 other unused symbols.
After much thought, I have decided that 0╱Ʌꓛ would be best.(I wouldve liked to be able to find a symbol for ╱ in unicode that takes up less horizontal space but couldn't, write it more straightly when you use pen and paper.)
Again, for suggestions, email quaternarylover@gmail.com
(I had actually misread the name as quarternary and used that in the name before realising. In my defense we don't call 1/4 a quater, and let's be real you wouldn't even have noticed it if i didn't realise).
Here's a quaternary calculator i made(intended for phones!!)