11/26/2009

Trinary Numbers

In my last post I explained how Trinary logic can be used in place of binary logic, now I am going to show you how multidigit Trinary numerals work and how to add, subtract, multiply and divide them.

Trinary numerals greater than 1 or less than - work much like normal numbers. You take place value (1, 3, 9, 27, 81, 243, etc.) and multiply it by the digit value. The diference in trinary is that digit values can be negative. For instance:

1-01=27-9+0+1=19

In this way, counting in Trinary goes like this:

0, 1,
1-, 10, 11,
1--, 1-0, 1-1, 10-, 100, 101, 11-, 110, 111

and so on.


Adding in Trinary is a bit more complicated

Say we are adding 123 and 21.
In Trinary these are 1----0 and 1-10
We add right  to left. Column 1 is 0+0 which equals 0. Column 2 is - + 1 which equals 0.

Colunm 3 is is - + -. Here is where we get to the weird part. In trinary addition, we can end up with "borrowing" as we would in normal subtraction. We put a 1 at the bottom of column 3 and a - at the top of column 4. Column 4 now has two -'s and one 1, so it equals -. For the next two columns we just bring down the value from the top row because the bottom row is empty. Our final answer is 1--100, which is 243-81-27+9=144. Carrying out the same calculation in base 10, we discover that 123+21=144.


Subtraction in Trinary is interesting as well.

The easiest way is to negate the second number and add them. In Trinary, negation is easy. The opposite of 1 is - and vice versa, so to negate a number we simple change every 1 into - and vice versa.

Say we are doing 154-62
154 is 1-0-01
62 is 1-10-
-62 is -1-01
So we are performing 1-0-01+-1-01

Column 1 is 1+1, so we write - in the bottom of column 1 and 1 in the top of column 2. As it turns out, the other numbers in column 2 are all 0's so we write 1 in the bottom of it as well. Column 3 is -+-, so we put 1 in the bottom of column 3 and - in the top of column 4. Column 4 is -+0+1, so put 0 in the bottom of column 4.
Column 5 is -+-, so we put one in the bottom of column 5 and - in the top of column 6. Column 6 is now -+1, so we leave it blank.

Our answer is 1011-, or 81+9+3-1, or 92. Performing 154-62 in base 10, we discover that it also is 92.


 Multiplication in trinary is like repeated addition and subtraction.

I will star with a simple square, 8x8.
8 is 10-

We start from the bottom right. - times 10- is -01 Since this is in the first bottom digit we do not shift it. 0 times 10- is nothing. 1 times 10- is 10-, but since it is in the third digit, we need to shift it two digits to the left to get 10-00.
We add 10-00 and -01 to get the answer.
Coumn 1 is 1. Column 3 is -+-, or 1 with a - in column 4. We bring down the - in column 4 because column 4 is empty. Column 5 is 1.

Our answer is 1-101, or 81-27+9+1, or 64.


Division is repeated addition and subtraction as well.

Say we are performing 60/10.
60 is 1-1-0
10 is 101

This should come out evenly in Trinary because we know it does in base 10.

The division question in Trinary is "Can +or- B be subtracted from this part of A?" instead of "Is B less than this part of A?".

So, first we look at the first 3 digits, 1-1. Positive 101 can be subtracted from 1-1 to make -0, so our answers 3rd digit is 1. Now we have -0-. Negative 101 can be subtracted from -0- to make 0. Our 2nd digit is -. We are left with 000, so out 1st digit is 0. Our answer is 1-0, or 9-3, or 6.





11/23/2009

Trinary Logic

I was recently reading a book on binary logic circuits, and I got an idea. Since electronic charges can be positive or negative, why not make a logic system with three values: positive charge, negative charge, and no charge. I invented a system of "trinary" logic which uses these three values. I don't know if it could be implemented in hardware, but I know it could be easily implemented in software.

The rules of trinary logic are:
The + and * functions represent addition and multiplication as in normal math, but 1+1=-1 and -1+-1=1

This means that and number plus itself is the opposite of itself:

0+0=0*-1
1+1=1*-1
-1+-1=-1*-1

This makes trinary logic useful in constructing cryptographic systems (systems of codes)

I recommend that the negative symbol be used to represent -1 because -1 is the only negative value in trinary. Similarly, you can substitute "neg" for -1 while speaking.

11/16/2009

Mark Alliance: Hi fighter

The Mark Alliance Hi fighter is the best fighter the MA can make. It has superior speed, maneuverability, firepower, and armor.

It has 9 engines, 1 main and 8 auxiliary. Altogether they provide speed rivaling that of an A-wing and maneuverability rivaling that of a TIE interceptor.

It is armed with 4 heavy laser cannons for tearing enemies to pieces, 4 proton torpedo launchers for destroying large amounts of fighters at long range, and 2 baradium missiles the size of a small fighter for punching giant holes in capital ship armor.

It's armor is laced with cortosis to resist energy-based weapons (anything but frag grenades and slugthrowers) and is made with the finest alloys MA researchers have developed.

Mark Alliance: MAC

The Mark Alliance Cruiser, or MAC, is the only large ship type in the Mark Alliance fleet. It is the only one we need.

Even an unmodified lucrehulk-class battleship is impressive. At over 3000 meters in diameter it dwarfs Imperial-class star destroyers, and its shields are made to resist barrages from heavy capital ships like the Acclamator- and Venator-class ships in the clone wars. The biggest thing it lacks is some good weapons.

Mine are even more impressive. I added deck plates to counteract one of its greatest weaknesses, the area in between the core ship and the ring. I also bolstered the anti-fighter guns and added 20 of my own creations: massive ball turrets, each with two barrels spitting plasma beams traveling nearly as fast as a turbolaser bolt.
A barrage from these weapons can bring down an imperial-class star destroyer with little trouble. I even enhanced the shields.

You are probably wondering how I generate this much power. The answer is that I enlarged the fusion reactor to the point where it fills most of the core ship area and added fuel tanks in the plated off area.

The MAC is not only useful as a warship, it also is a carrier ship. It holds 52 Albatross-class landers providing 624 MTT's with 112 troops each and 5,200 other vehicles. Each MAC also holds 1,100 fighters and 52 falcon-class dive landers.


11/05/2009

Mark Alliance: history

The Mark Alliance exists in an Star Wars alternate universe I made up. This universe remains largely the same as the normal one until the end of episode 6.

The only difference until episode 2 is that I exist. I am trained as a Sith after Darth Maul and before Count Dooku, but I run away when my master attempts to kill me. I join the Jedi for a short time, but they deem me to "independent" and kick me out. I hide until episode 2, when I implant a special virus into a shipfull of droids and go back into hiding again.

The droids are oblivious to the virus for it has no symptoms, so it silently spreads throughout the clone wars. When Palpatine ordered the droids shut down at the end of the clone wars, several ships stayed online and jumped to an RV point I had programmed into the virus. I picked up my army, and once more hid, this time deep in the Unknown Regions.

During the entire Galactic Civil War I built up my army into a version several times better than the original (using methods partially explained in The Industrial Exponent) and at the end of episode 6 I decided to join the fight against the disorganized but still inordinately powerful Empire.

Mark Alliance: unit's description

 These are most of my units. If you need info on the ships they were derived from, go to starwars.wikia.com.
If you need more info on these units, just post a comment.

MAC: Modified lucrehulk-class battleship with 20 massive "dual heavy plasma cannon ball turrets".

Hi-fighter: Custom starfighter unit with 9 engines. Armed with 4 heavy laser cannons, 4 proton torpedo launchers, and 2 large baradium missiles.

Lo-fighter: Custom starfighter unit. Armed with 4 laser cannons, 4 proton rockets and 4 baradium rockets.

Falcon-class dive lander: Vanguard transport for ground battles. Travels at insane speeds, diving straight towards the planets surface until the end, where it blasts its repulsors to stop on a dime and uses an inertial compensator to keep itself alive.

Albatross-class lander: Basically the same as the C-9979 landing craft.

Mtt: Basically the same as trade federation version.

Aat: Basically the same as trade federation version, but with much better armor.

Artillery: Basically an Aat with the top cannon replaced with a baradium grenade lobber and the side cannons replaced with magazines. The missile launchers are still there.

Infantry: Battle droids with much better programming, armor, and weapons.

Commandos: Smarter even than my infantry, these droids carry solid slug weapons capable of penetrating 6 inches of durasteel. They also carry portable scanners to assist in locating targets.

11/04/2009

The Industrial Exponent

In this post I will explain a quality of industrial systems that I stumbled across on October 30, 2009. This quality is difficult to explain, so I will use examples with lots of equations. Keep a graphing calculator handy so you won't get confused. My first example is rather simple, but  it is complicated enough to illustrate my quality.
  • Suppose you have a constant number of workers represented by w = 1
  • Each unit of workers can create a factory in one unit of time: f = wt
  • Each factory can create one unit of product in one unit of time: p = ft
  • Thus p = t^2
Those who are logical inclined will notice an error. Each factory must be completed before it can create product, therefore my equation for p should be something more like p= .5t^2 - .5t.

My second example is more complicated, so prepare to be slightly more confused.
  • Suppose you have one factory type a: a = 1
  • Each factory type a produces one factory type b per unit of time: b = at
  • Each factory type b produces one factory type c per unit of time: c = bt
  • Each factory type c produces one unit of product per unit of time: p = ct
After my reality check, this comes out to about p= (1/6)x^3-.5x^2+(1/3)x-.00000000002 (I don't know where the -.00000000002 came from, but my calculator spat it out) The significance of this is that the more steps you add to an industrial equation, the larger the exponent.

Mark Alliance

In case you were wondering about the name...

The Mark Alliance is a Star Wars faction I made up. Several of my posts to this blog will regard this faction. Any post that has to do with the M.A. faction will be labeled "MA".

The Mark Alliance is a Droid-based faction against the Empire (nominal allied with the Rebel Alliance).

My source for Star Wars facts is Wookiepedia (www.starwars.wikia.com).