Previous page Next page Navigation bar

Programs

Physics Programs

Ohm’s Law Solution

Summary Description

Programs:

OHMSLAWS

Version:

1.0, 12 February 2006

Description:

The OHMSLAWS program computes any two of the power, voltage, current, and resistance in a simple resistance circuit from two known factors.

Compatibility:

Is compatible CFX-9850G

Compatible with CFX-9850G

Is compatible FX-7400G

Compatible with FX-7400G

Detailed Description

The OHMSLAWS program computes the unknown quantities that can be deduced from known quantities using the following equations of a simple resistance circuit:

E = I R
P = E I
P = I2 R

The variable E stands for electromotive force, or voltage, measured in volts; the variable P stands for power, measured in watts; the variable I stands for current, measured in amperes; and the variable R stands for resistance, measured in ohms. All values must be positive: the program assumes that the case of zero in any value is sufficiently uninteresting that you will not compute it.

Usage

Enter the OHMSLAWS program into the calculator, using either the calculator data cable or entering the program directly.

Convert all known values into MKS electrical units (watts, amperes, volts, ohms). The results in the solution will also be expressed in this system.

Run the program.

Screen shot The program will display the prompt “0:Done 1:P 2:E 3:I 4:R” and pause for you to input a code. This menu is shown in the screen shot to the right. These codes refer to: P, the power (code 1); E, the electromotive force (voltage) (code 2); I, the current (amperage) (code 3); and R, the resistance (code 4).

Screen shot You enter each known factor by first entering the appropriate code (1 through 4), then entering the factor’s value. The program displays the name of the unit in which the factor is measured after you enter the factor’s code, to help ensure the correct factor is entered. This two-step process of identifying the data to be entered, then entering the data, is indicated in the screen shot to the left.

If you enter an incorrect value for a factor, you can enter the factor again with the correct value. The most recently entered factor value is the value that is used. If you enter an incorrect factor code, you may enter a value of zero. The program interprets a factor value of zero as indicating the factor is unknown. The value you enter for a factor must be non-negative; the program will repeat the prompt until you enter a positive value or a zero.

Screen shot When you have entered all the known factor values, use the code 0 to indicate that entry of the factor values is complete. The program will then compute and display the factor values that were not entered and can be deduced from the factors that were entered. The display of values is shown in the screen shot to the right.

Screen shot The program displays the message “Done” when it has displayed all the factors which can be determined from the factors you entered. This may occur without the display of any factors which were deduced, if the information you entered was insufficient to deduce any factors. This message is shown in the screen shot to the left.

Program

Source Code

The program is available in a ZIP file, or may be entered as shown below. Remember that this program is copyrighted; see the copyright issues page for limitations on redistribution.

Program OHMSLAWS (600 bytes):

'OHMSLAWS 1.0End of line operator
0→A~EEnd of line operator
DoEnd of line operator
"0:Done"End of line operator
"1:P 3:I"End of line operator
"2:E 4:R"?→AEnd of line operator
If A=1End of line operator
Then DoEnd of line operator
"Watts"?→BEnd of line operator
LpWhile B<0End of line operator
IfEndEnd of line operator
If A=2End of line operator
Then DoEnd of line operator
"Volts"?→CEnd of line operator
LpWhile C<0End of line operator
IfEndEnd of line operator
If A=3End of line operator
Then DoEnd of line operator
"Amps"?→DEnd of line operator
LpWhile D<0End of line operator
IfEndEnd of line operator
If A=4End of line operator
Then DoEnd of line operator
"Ohms"?→EEnd of line operator
LpWhile E<0End of line operator
IfEndEnd of line operator
LpWhile A≠0End of line operator
DoEnd of line operator
0→AEnd of line operator
If (B=0)(C≠0)(D≠0)End of line operator
Then CD→BEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (B≠0)(C=0)(D≠0)End of line operator
Then B÷D→CEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (B≠0)(C≠0)(D=0)End of line operator
Then B÷C→DEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (B=0)(D≠0)(E≠0)End of line operator
Then D2E→BEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (B≠0)(D=0)(E≠0)End of line operator
Then √(B÷E)→DEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (B≠0)(D≠0)(E=0)End of line operator
Then B÷D2→EEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (C=0)(D≠0)(E≠0)End of line operator
Then DE→CEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (C≠0)(D=0)(E≠0)End of line operator
Then C÷E→DEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
If (C≠0)(D≠0)(E=0)End of line operator
Then C÷D→EEnd of line operator
1→AEnd of line operator
IfEndEnd of line operator
LpWhile A≠0End of line operator
If B≠0End of line operator
Then "Watts"End of line operator
BDisplay operator
IfEndEnd of line operator
If C≠0End of line operator
Then "Volts"End of line operator
CDisplay operator
IfEndEnd of line operator
If D≠0End of line operator
Then "Amps"End of line operator
DDisplay operator
IfEndEnd of line operator
If E≠0End of line operator
Then "Ohms"End of line operator
EDisplay operator
IfEndEnd of line operator
"Done"

[ Previous page | Top of page | Next page ]

Previous page Top of page Next page Navigation bar

Copyright © 2006 Brian Hetrick
Page last updated 12 February 2006.

Brian’s Casio Calculator Corner

Home

Programs

Index

Linkage Conventions

Mathematics

Finance

Physics

Index

Vector Sum

Right Triangle

Newton’s Law

Uniform Acceleration

Ohm’s Laws

Utility

Tutorial

Puzzles

Site Information

Your Privacy

Site Map

E-mail

Site Technical Data