I wrote NETCALC to meet a practical need for a simple impedance
calculator for working out RF network design ideas. I hope you find it useful.
Here's how it works.
NETCALC uses a "stack" system (like the one used in HP
calculators) because that is the most powerful and flexible way to implement a
simple computer-based impedance calculator.
NETCALC displays two complex impedance registers, labeled X and Y. These
impedances each consist of two terms: resistance and reactance. You can do
things to the X impedance alone, or combine the X and Y impedances in various
ways.
? is NETCALC's prompt for input. At the prompt you
have three options:

Enter the value of an impedance into the stack; or

Carry out operations on impedance values already in the stack;
or

Change one of the "environment" parameters (frequency, system
impedance and velocity factor).

The results of the operations are displayed, and then you are
prompted again by ? .

Impedances are input and displayed in either
series or parallel form.

a+b means resistance a in
series with reactance b.

a&b means resistance a in
parallel with reactance b.

You must ALWAYS specify both the resistive AND the
reactive part, even if one of them is zero.
In NETCALC's impedance notation, the + sign in a+b does NOT
indicate that reactance b is positive; it means only that a and b are
series-connected. An impedance involving a negative reactance is indicated by
a+-b or a&-b.
NETCALC understands the normal "k", "m" and "M"
multipliers - in fact the whole range from "pico" to "Giga".
Simply enter the first letter. Only "m" and "M" are
sensitive to Shift or Caps Lock. For the "micro" (mu) symbol, type "u"
or "U" . The largest and smallest displayable numbers are 0.001p and
999.999G - a wide-enough range for most applications.
A reactance can also be input in terms of capacitance or inductance,
using the notation a+bpF, a&buH, etc. If NETCALC
hasn't been told any differently, it assumes that the frequency is 1Hz - see
later for instructions on changing frequency. NETCALC will
then calculate the reactance, and will enter the correct impedance into the X
register.
A "j" before the reactance value is not necessary. Use it if
you find it helpful, although NETCALC will not display it.
When NETCALC starts up, it displays undefined impedances as 0*0.
Your first input must be at least one impedance value for NETCALC to work on.
Examples of correct impedance inputs:

50+0

50 ohms, resistive

50+5

50 ohms resistance in series with 5 ohms inductive
reactance

50+j5

As above; the j is ignored

50++5

Same as 50+5. NOTE: the SECOND "+" sign is the optional one!

50+-5

50 ohms resistance in series with 5 ohms capacitive
reactance

1E6&5

1 megohm resistance in parallel with 5 ohms inductive
reactance

1M&+5

Same as 1E6&5; the "+" sign is optional

1M&j5

As above; the j is ignored

0+5E-3H

5mH inductance with no series resistance

10+5mH

5 millihenries inductance (note the small "m") with 10
ohms series resistance

1M&47pF

47pF capacitor with 1 megohm leakage resistance

Impedances of the type "a&0" or "0&b" are
acceptable, but are physically meaningless: one half of the impedance is
short-circuited by the other!

Error Protection

If you input something that NETCALC can't interpret,
the program either returns you directly to the ? prompt or
produces an error message. Press the Enter key to return from an
error message to the prompt.
Attempts to use an undefined impedance, or to carry out some physically
meaningless operation, will produce the error message Can't be done.
NETCALC smoothly handles calculations that produce infinite results. These
are automatically approximated to extremely large values, and the calculation
continues. Further operations are then likely to produce extremely small values,
which NETCALC will correct to zero.

V is the velocity factor for transmission lines (initially 1)

To alter any of these values, press the appropriate key
(F, Z or V) and enter a new value at the bottom of the screen. To leave the
present value unchanged, just press Enter. F can be entered using the normal "k", "M"
and "G" multipliers (lower-case m also is assumed to mean megahertz),
e.g. 14.345M. Z and V are entered as plain numbers.

NETCALC Operations

NETCALC keeps an operating stack of two
impedances. The "current" value is called X, the other Y.

Previous values of X and Y scroll up the screen. You can look at them for
reference, but you can't do anything with them.

Converts the impedance in X into parallel form (from series - ignored if X
is already in parallel form).

S

Converts the impedance in X into series form (from parallel - ignored if X
is already in series form).

J

Converts the impedance in X to its conjugate impedance (i.e. it flips the
sign of the reactance).

*

Multiplies both parts of the impedance in X by a scaling factor of your
choice.

/

Divides both parts of the impedance in X by a scaling factor of your
choice.

Mn

Copies the impedance in X into memory
n, where n = 1 to 9. X is unaffected, but the previous
contents of memory n (if any) are lost.

?n

Displays the contents of memory n on the bottom line. This
does not affect either the impedance in X or the memory contents.

For the following X-only operations, you need to have specified
the frequency (F command), and also possibly the system impedance (Z) and
velocity factor (V) -

Q

Displays the Q of the impedance in X, on the bottom line. X itself is
unaffected.

X

Calculates the capacitance or inductance corresponding to the
reactive part of the impedance in X, and displays the result on the bottom line.
X is unaffected.

L

Calculates the length of transmission line equivalent to the
reactive part of the impedance in X, and displays the result on the bottom line.
X is unaffected.

T

Adds a transmission line of characteristic impedance Z in series with the
impedance in X, transforming its impedance in most cases. You are asked
to input the length of the line. Inputs < 1.0 are assumed to be in
electrical wavelengths. Inputs > 1.0 are assumed to be physical
millimetres, so V and F are used to calculate the electrical length.
The impedance in X changes to its new impedance-transformed value.

W

Calculates the VSWR and return loss of X, according to the prevailing
system impedance Z, and displays the result on the bottom line. X
itself is unaffected.

Operations on Both X and Y

Keyboard entry

Entering an impedance from the keyboard will affect both X and Y - the new
impedance value goes into X, the old X is "pushed" up into Y, and
the old Y is lost (scrolls up the screen).

E

Exchanges X and Y (useful in connection with memory operations,
which only operate on the X register). To swap back, press E again.

Rn

Recalls the impedance stored in memory n and enters it into X,
just as if it had been entered from the keyboard. The old X is
pushed up into Y, and the old Y value is lost (scrolls up the screen).
Rn does not affect the memory contents.

+

Adds impedance X and impedance Y in series (whatever their original
forms). The result appears in X in series form, and Y becomes empty
(displayed as 0*0). If you wanted the answer in parallel form,
press P.

&

Adds impedance X and impedance Y in parallel (whatever their
original forms). The result appears in X in parallel form, and Y
becomes empty (displayed as 0*0). If you wanted the answer in
series form, press S.

Displays a Help screen containing a summary of this information.
When not in use for input/output, the bottom line of the screen
also displays the available command keys.

Example - a Pi-Tank

You can tackle almost any network problem by
entering the appropriate resistances and reactances, and adding them in series
or in parallel. For example, here is a pi-network design from the ARRL
Handbook. It is intended to transform a 50-ohm load impedance into a load of
1.5kohms resistive, as seen by the anode of the tube.
To see how this happens, start up NETCALC and follow these instructions.

Action

In NETCALC

1. Set frequency to 3.75MHz.

Enter F 3.75M.

2. Enter the 50 ohm load impedance in parallel
with C2, 1375pF.

Enter 50&1375pF. NETCALC converts 1375pF into reactance,
so the result is 50 & -j30.866.

3. Convert the result from Step 2 into
series-equivalent form.

Press S. The result is 13.797 + -j22.349.

4. Enter L1, 7.02 microhenries.

Enter 0 + 7.02uH. NETCALC converts this into 0 + j165.405,
and the result from Step 3 moves up into the Y register.

5. Add the impedance in X and the impedance in Y.
Get the result in series-equivalent form.

Press +. The result is 13.797 + j143.056. Note:
you could have skipped Step 3, because when you press +, NETCALC
automatically converts all impedances into series-equivalent form before adding
them together.

6. Convert the result into parallel-equivalent
form.

Press P. The result is 1.497k & j144.386 - so here is
the 1.5k resistive impedance that the pi-tank presents to the tube.

7. The 1.5k impedance has a reactive compnent,
which is tuned out by C1. Enter C1 = 294pF.

Enter 0+294pf. The result from
Step 6 moves up into the Y register.

8. Almost there! Combine the X and Y
registers in parallel, and then convert into series-equivalent form.

Press &, then press S. The result is 1.497k +
-j3.011, in other words almost exactly 1.5k resistive, as intended.
(The small remaining j term is due to the rounded-off values that we entered for
C2, L1 and C1.)

NETCALC was originally a DOS program. It runs
normally under Windows 3.1x, and correctly displays the special symbols such as
"ohms". Windows 95 does not display these symbols correctly because
it uses a different default character set. If this worries you, you will need to
load and activate code page 378 before starting NETCALC - see your Windows
manual for details.

Copyright

NETCALC is copyright 1986 - 1998 Ian White, G3SEK (the early
version called NETAN published in "Amateur Radio Software" is the
copyright of the publisher, RSGB). NETCALC is placed in the public domain
for non-commercial use, entirely at the user's own risk.