Hello.
I am currently inventing a language, and have created a base 4 number system for it. Unfortunately, I am horrible with numbers, even in decimal. So it was a hard slog. But I finally got there.
It would be great if I could know of any practical applications quaternary has (if any), so I can incorporate it into the language and make it more naturalistic. Thanks.
Quaternary is a power of 2 base, and so is pretty closely related to binary. Each quaternary digit corresponds to a group of 2 binary bits, so you can easily convert. For example 100011 -> 10,00,11 -> 2,0,3 -> 203. Computer science uses hexadecimal for essentially the same reason (just grouping bits by 4 rather than 2), so people from this culture might be better with computers.
Hmm. Maybe they were experts at some precursor to quantum physics, and viewed nature itself as 0s and 1s?
That binary conversion made absolutely no sense at all to me, so I’ll research it now!
Edit: OK, it’s pretty easy once you know how binary progresses. I think this micro-science binary theory might have legs. Thanks for the suggestion!
Why did you choose quaternary in the first place? Do they have four fingers on each hand or something? Dozenal is good for times tables, binary is useful for simplicity, hexadecimal is useful for compactly dealing with binary. Decimal doesn’t have much going for it except that we can count on our fingers, so I could image quaternary being a similar concept.
I chose quaternary because you have to use decimal for time, weeks, months etc, because it would be a pain in the ass to have to convert everything all the time. So the quaternary system is the “ancient” system they used long ago. But in truth, it’s so I don’t have to come up with so many names for different numbers haha. I only needed a system that goes to 16 (decimal) so quaternary is a perfect fit in that regard. An example of it in use: the word for rainbow is d’ci’ka. It’s a contraction of denci’ (“ten-three”, or 7) + kaza (color) Thirteen colors. Same process for the word weekend, which is d’ci’mw. Denci’ + mw (“one”). 7/1. The 7th and 1st days of the week.
Quartenary is kinda like how our DNA works I guess.
4 is a square number and highly composite (although it’s right smack dab at the start of the number line so perhaps it’s not that surprising).
Apparently quarternary has some uses in Hilbert curves, although how I dunno.
Perhaps the world they’re from has 3 moons? New moons being 0.
Well this civilisation was from Earth, just not somewhere that exists any more. Like Atlantis. So that probably rules the moon theory out. And I don’t even vaguely understand the rest of what you said haha.
Highly composite numbers are useful cause they have a lot of factors! That’s why the Babylonians and us use 60 for minutes and seconds. It makes dividing really simple, how much is 2/5 of 60? Why it’s 24 (no fractions) etc. Being a square number is just interesting. I bet quarternary would have funky repetitive fractions. Hilbert curves are just some space filling fractal thing, apparently they use quarternary at some point in analyzing or generating them.
I’m still struggling to convert base 4 and decimal in my head, so I might just stay in my lane and take it slow 🤯
Here’s how you can do it while only ever dividing or multiplying by two.
Decimal to quaternary
This is a cycle of looking at remainders from dividing by two, with the first one an odd-even determinant, and the second a big-little determinant for each quaternary digit. You make numbers even before dividing by two, so there are never fractions to consider.
- Is the decimal number even? If yes, remember that you’ll have an even quaternary digit (0 or 2). If the decimal number is odd, subtract one from the decimal number, and remember that you’ll have an odd quaternary digit (1 or 3).
- Divide the decimal number (having subtracted 1 if odd) by two. This gives you an intermediate number.
- Is the intermediate number even? If yes, your quaternary digit is the lesser of the possibilities (0 or 1). If the intermediate number is odd, subtract one from the intermediate, and your quaternary digit is the greater of the possibilities (2 or 3). Write the quaternary digit down.
- Divide the intermediate number (having subtracted 1 if odd) by two. This gives you a new decimal number for the next round.
- Repeat from step 1 unless the new decimal number is less than 4, at which point it becomes the final (left-most) quaternary digit. New quaternary digits go the left of previous ones.
Example
Decimal number is 5710.
- 57 is odd so the quaternary digit will be odd (1 or 3). Subtracting 1 gives 56.
- 56 divided by 2 is 28 for the intermediate number.
- 28 is even so the quaternary digit is the lesser possibility for an odd digit, i.e., 1. Write down 1.
- 28 divided by 2 is 14 for the new decimal number.
Next round:—
- 14 is even, so the quaternary digit will be even (0 or 2).
- 14 divided by 2 is 7 for the intermediate number.
- 7 is odd, so the quaternary digit is the greater possibility for an even digit, i.e., 2. Write down 2 to the left of the previous quaternary digit. Subtract 1 from the odd intermediate number (7 - 1 = 6).
- 6 divided by 2 is 3 for the new decimal number.
Final digit:—
- 3 is less than 4, so write it down as the last quaternary digit, to the left of the previous one.
That process gives 5710 = 3214; that is, 3 sixteens, 2 fours and 1.
Quaternary to decimal
Here you only need to add a small number and then double twice with each digit.
- Start with 0 as your running total.
- Add the left-most quaternary digit, then ignore that digit for subsequent rounds.
- Multiply the new total by 4. You can multiply by 2 twice if you prefer.
- Repeat from step 2 using the next quaternary digit unless it is the last (right-most) digit.
- Add the final quaternary digit to the running total. This is your decimal number.
Example
Quaternary number is 3214.
- Running total starts at 0.
- Adding 3 makes 3.
- 3 times 4 is 12.
Next round:—
- Adding 2 to 12 makes 14.
- 14 times 2 twice is 28, then 56.
Final digit:—
- Adding the final digit (1) to the running total (56) gives 57 as the decimal number.
So 3214 = 5710.
deleted by creator
You’re thinking of quaternions
that’s quaternions. quaternary are a species of aliens from mass effect that live on big flotillas of spaceships.