Janus Numbers

On other pages, you learned how to write numbers using the Shwa digits. But aside from some minor differences, these symbols just replace the current symbols like 4 and +, with no change in the "spelling" of numbers or the "grammar" of expressions. And we don't need any more than that to begin using the Shwa script for our familiar decimal numbers.

But Janus Numbers and the associated units of measurement (presented on the pages that follow) are interesting advances in their own right which the Shwa script makes feasible - for instance, with the needed digits. For some of you, they may seem one step too far; for others, an additional reason to change scripts. Those in the first group need not continue - you've already seen everything you need to start using Shwa.


Just as Shwa letters can be used to write different languages, Shwa numerals can also be used to write different "numeric languages". We are so accustomed to our own way of writing numbers, and it is so widespread, that we forget that it isn't the only one. For example, "Roman numerals" like XIV for 14 represent a different way of writing numbers.

This page will introduce another "numeric language", called Janus Notation in reference to the Roman god who faces both ways. This notation was developed by J. Halcro Johnston in his 1937 book, The Reverse Notation, on which this page is based. Numbers written in Janus Notation are called Janus numbers.

Dozenal Numbers

You all know that our decimal numbers are base ten (decimal), presumably because we have ten fingers. What that means is that when we write a number by putting two digits next to each other, the lefthand digit doesn't represent units, it represents tens of units. For example, in the number 24, the digit 2 doesn't represent the number 2; it represents the number 20 because it's in the tens place. Likewise, in the number 365, the digit 3 doesn't represent the number 3; it represents the number 300 because it's in the hundreds place - each place to the left of the rightmost digit represents one higher power of ten.

The first two of the Shwa hexadecimal digits,  and , can be used to write dozenal or duodecimal numbers: base twelve. In base twelve, each digit to the left of the units place represents one higher power of twelve, so the first place to the left represents 12s (the dozens place), the next place represents 144s (the grosses place), and so on: 1728, 20736, etc. To consider the same examples, the dozenal number 24 represents the decimal number 28: 2 × 12 + 4. The dozenal number 365 represents the decimal number 509: 3 × 144 + 6 × 12 + 5.

This is not the place to discuss the advantages of dozenal numbers. If you're interested, you can check out the following websites:

Balanced Numbers

A number system in which there are equal numbers of positive and negative digits is called balanced. You've already met the Shwa negative digits on the Numerals page. Here they are again, along with the Greek letters we use to write them in English, and their English names (from Greek bases):

ValueShwaGreekEnglish
-0Θudis
-1τmono
-2ζbis
-3εter
-4ηtetro
-5ςpento
-6ϑhexo

When we read non-decimal numbers aloud, we simply spell out the digits and other symbols, one by one. We never use words like "twenty" or "thirteen", since those are numbers, not digits.

Janus Notation

Janus Notation combines dozenal numbers and negative digits to form a balanced dozenal number system. In Janus Notation, only the digits from ϑ to 6 are used, and each place left of the units place represents the next higher power of twelve. On this page, when we write Janus numbers in English, we'll write them in green using the Greek letters.

For example, let's consider the number 9. In decimal notation, it's written with a single digit. But in Janus Notation, it's written as , which means 12 - 3, with a 1 in the twelves place and a ε in the ones place. The principle is the same as with Roman numerals, in which 9 is written IX - writing the I before the X indicates that it is negative. But Roman numerals require different symbols for each place, while Janus numbers, like decimal numbers, use the same numerals for all magnitudes, relying on position to indicate the magnitude.

Let's count from 0 to 100 to show you how Janus numbers work:

The first surprise is at number 7, which is written as 12-5, or , since 7 is closer to 12 than it is to 0. Rather than make a first approximation of the value of 7 by putting a 0 in the twelves place and then adding 7 units, we put a 1 in the twelves place and then adjust downwards by only 5 units.

Number 13 is the smallest number that needs the repeater: without it, 13 would be written 11.

After 18, numbers start being closer to two dozen as to one dozen, so there's a 2 in the twelves place, and likewise for all the numbers up to 30: they're closer to 24 than to any other multiple of twelve, so they have a 2 in the twelves place.

The next surprise is at number 79, which is actually closer to 144 than it is to 0, so we write it as 1 gross - 5 dozen - 5 unit: 1ςς or . But 78 is also closer to 144 than to 0, so why don't we write it as 1 gross - 6 dozen + 6, or 1 gross - 5 dozen - 6? The rule is very simple: we don't use -6 for positive numbers! On the other hand, we don't use +6 for negative numbers, so -78 is written ϑϑ or , while -79 is written τ55 or .

Likewise, negative numbers use -0  instead of +0 : +36 is 30 or , but -36 is εΘ or .

Thus, every digit has its own complement (the complement of a number is simply that number with the sign reversed, that is, multiplied by -1). To write the complement of a number, just replace every digit with its complement. It's completely symmetrical, like Janus!

The minus sign - isn't needed to write negative numbers in Janus notation. And in Janus notation, the easiest way to subtract two numbers is to complement the subtrahend (the number being subtracted) and then to add that to the minuend (the other number). For example, 7-3 is the same as 7+ε. This makes subtraction into addition, which is much easier.

Magnitudes

Since Janus numbers and decimal numbers use the same positive digits, we need some way to know which is which. In Shwa, when we write Janus numbers, we replace the oval decimal point, decade, decimal and ordinal signs with rectangular ones, which are called "radix", "degree", "dozenal" and "order" :

Like the decimal point, the radix is often omitted after integers if the context is clear.

Real numbers written in magnitude notation work the same in Janus notation as in decimal notation. We rarely need the dozenal sign, since a negative exponent is simply written with a negative (first) digit. However, in Janus notation, all the numbers near a given magnitude are written with the same magnitude. For example, in decimal scientific notation, the number 900 is written as 9x10², even though it's much closer to 10³. In Janus notation, that doesn't happen.

The break where the magnitude changes is always at 6/11 of the higher magnitude. That's because, in Janus notation, the highest mantissa that can be written is 0.6666666..., which equals 6/11 in base 12.

Color Codes

Shwa has a standard color code for all the digits, which I introduce here so I can use it as we continue :

Addition Table

Here is the addition table for Janus numbers:

Just like the decimal addition table, the results form diagonal stripes across the table. But this similarity masks a significant advantage of Janus notation: because of the mix of positive and negative digits, there's much less "carrying" between columns when adding lots of numbers. Here is a sample sum in decimal and Janus notation:

11
1311
1715
19
6050

In this example of the four teen primes, you have to carry a 2 in the decimal sum, but nothing at all in the Janus sum: the negative digits cancel out the positive ones. The more numbers involved, the easier the Janus sum is in comparison to the decimal sum.

Multiplication Table

Here is the Multiplication table for Janus numbers:

The multiplication table looks daunting, but then patterns begin to emerge. Some are the consequence of choosing twelve as a base: since it divides all the digits except 5, most of the multiples just repeat the same final digits in the same sequence. In addition, you don't need to memorize very many numbers: only the 15 products in the black outline at lower right. All the others are either multiples of 0 or 1 or the complements of other products. For example, if you learn that 4×5 = 2η, then you also know that 5×4 = 2η, that η×5 = ζ4, that 4×ς = ζ4, and that η ×ς = 2η. Compare that to the 36 products you had to learn for the decimal multiplication table!

Divisibility Tests

It's also easy to see whether a Janus integer is divisible by 2, 3, 4, 6 or 12 just by looking at the final digit. To see whether it's divisible by 8 or 9, look at the last two digits: if they spell a multiple of 8 or 9, it is. For example, the number  (13851) is divisible by 9, as you can see because its last two digits spell  (27), which is 3×9.

For the small primes 5 7 11 13, there are easy tricks. To see whether a number is divisible by 11, add the digits up. if the result is a multiple of 11, the original number was divisible by 11. The test for 13 works almost the same, but instead of adding them all, you subtract every second digit. For example, to test the number  (728), you calculate 5 - 1 = 4, then 4 + η = 0, which is 0×13.

The tricks for 5 and 7 are similar, but you double each result as you add. For example, to test the number  (595), you add 2×4 + 2 to get 10; then double that (20) and add ς: the result is 15, which is a multiple of 5, so the original number is, too. In the case of 7, you subtract every second digit (as for 13). So to test  (595), you calculate 2×4 - 2 to get 6, then double that (12) and add ς: the result is 7, which is a multiple of 7, so the original number is, too. So 595 is divisible by both 5 and 7.

Negative Recurrer

There is one more trick when representing numbers in Janus notation: it turns out that many fractions, when expanded in Janus notation, form a pattern where the same sequence repeats, but alternating between positive and negative values. In this case, we use the dozenal sign as the recurrer: it means "repeat what follows, but change the sign each time".

To illustrate this, let's consider the decimal expansion for the fraction 1/7, a very interesting case. In decimal, it's written 0.142857... and we would write it in Shwa numerals using the dozenal and recurrer signs: 1*°142857. But when we convert it to balanced decimal notation, it becomes 0.143143... - the same three digits repeated in sequence, but with the sign changing every time. So we replace the recurrer with the decimal sign to indicate this, and just write τ°*143. It works the same way in dozenal, too:

And note that 0.143, rounded off to three decimal places, is a much better approximation to 1/7 than 0.142, six times better. Because each new digit of a balanced number is no more than half of its place value, fractional expansions are actually a series of closer and closer approximations - you never need to revise a previous digit.

Percentage

You'll remember that Shwa notation uses the decade sign without any exponent to indicate a true percentage (one restricted to values between 0% and 100%). When using Janus notation, we retain the same notation, substituting the degree sign. But note that percentages above 50% are written starting with negative digits, to be subtracted from 100%:

Because of this, the complement of any percentage is simply the negative. If 25% of the world writes in the Roman alphabet, then -25% doesn't!

Janus Keypad

There is a separate keypad for the Janus numbers, which does not include the digits 7 8 9 but does include the negative digits. It also excludes the negative, rational and imaginary signs.

To shift into Janus mode, use the # key followed by the Janus Mode key:


< Arithmetic Physical Units >


© 2002-2017 Shwa shwa@shwa.org 02mar17