If you’ve spent too much time in the company of nerds like me, you’ve maybe heard of the concept of counting in alternate bases. There are all kinds of weirdos out there advocating for different bases than the standard, comfortable decimal (base 10) that most of the world has settled on.
I’m not gonna get too in-depth on what a base is; if you’re here, you probably already know. (If you don’t and you want to look up more information, the search term you’re looking for is positional numbering system.) Instead I’m here to pose a simple question: Why are we focusing only on bases that make our lives easier?
Hi, my name is November and I’m here to talk to you about Balanced Heptadecimal.
We choose to use balanced heptadecimal, not because it is easy, but because it is hard.
—The Dead Kennedys
Heptadecimal, aka suboptimal, aka septadecimal maybe except that sounds too much like “septic”, which is what this base is. We’re talking about base 17.
The name “suboptimal” was coined by conlang Youtuber jan Misali as part of their attempt to give every base a name that breaks away from the decimal-centric language we’re all steeped in. It made me laugh, but for the purposes of this page, we’ll be going with “heptadecimal”.
Base 17 isn’t a very good base. 17 is a prime number, so nice clean fractions like 1/2, 1/3, and so forth are represented with infinite repeating digits. Basically the only fractions you can represent nicely are ones with 17 or a multiple thereof in the denominator. In addition, you have to add more digits! Generally we use letters of the alphabet for additional digits (hence why hex code has a bunch of A’s through F’s scattered throughout), but when doing arithmetic with such numbers, it’s a pain to read.
We can “fix” those problems by implementing heptadecimal differently – instead of using digits for 0 through 16, we’ll use digits for -8 through 8. On this page, I’ll be using regular digits with lines over them to represent these digits; for “”, for example.
Sure I can. Balanced ternary is base 3 but with the digits , , and instead of , , and . Signed-digit representation is an established math thing, it’s no big deal.
If you meant “you can’t use overlines to represent negative digits because those are traditionally used for repeating digits after the radix point”, well, yeah, that’s true. For that reason I’ll instead use ellipses () on this page for repdigits like that.
Unfortunately, this page isn’t accessible to blind readers. Actually, since I haven’t figured out how to pronounce negative digits, this page probably couldn’t even be read out loud at all. (To-do: Create a tonal conlang that uses this numbering system.)
I lied, I’ll explain a little bit about what a number base really means. When you write a number in regular ordinary base 10, like for example:
…each digit means something different based on where in the number it is. The 1 at the beginning of the number isn’t the same as the 1 that’s one position from the end. Remember math class where they taught you about the “ones place”, “tens place”, “hundreds place”, and so on? In base 10, the number 17,017 really means:
It’s the same in other bases. Base 12 has a “ones place”, “twelves place”, “144s place”, etc.; base 2 has a “ones place”, “twos place”, “fours place”, and so forth; and base 17 has a ones place, seventeens place, 289s place, 4913s place, and you get the picture.
So the number , taken as base 17, means:
And you get the decimal number .
Note that any balhep number with only positive digits is written exactly the same way in regular heptadecimal.
Balanced heptadecimal.
Now for the negative digits! They may sound weird, but they work exactly the same way as positive digits. Take the balhep number , for example:
And we find that the weird-looking number is just our good old friend, decimal 10! Here’s all the balhep integers from to . If any of these representations confuse you, take a second to think about what each of the place values really stands for.
Non-positive integers | Non-negative integers |
---|---|
As you can see, we don’t even need a negative sign for negative numbers! If the leftmost (non-zero) digit is negative, then the whole number is negative!
Anyway, this was just a fun little project I spent a couple days on after re-watching jan Misali’s “A Better Way To Count” video. In doing so, I:
Obviously I don’t really want to replace the decimal system with, uh, this, (unless…? 😳) but it’s funny to think about.
Heptadecimal representations of fractions
Balanced heptadecimal arithmetic
Alternatives I considered for digit representation
Other number systems