Showing posts with label Casio fx-260 Solar. Show all posts
Showing posts with label Casio fx-260 Solar. Show all posts

Sunday, September 29, 2019

fx-260 Solar Algorithms Part II

fx-260 Solar Algorithms Part II

Decimal to Binary Conversions

This is probably best demonstrated by example. 

Algorithm:

To the decimal integer D to binary integer B:

1.  Determine the number of digits (zeroes or ones) that the binary integer is going to have.  Also, we'll store D in memory.

n = int(log D/log 2)

Each digit will represent the powers 2^(n) to 2^0.

Keystrokes: D [SHIFT] (Min) [ log ] [ ÷ ] 2 [ log ] [ = ]  // ignore the decimal part

2.  Starting with n and going to 0, calculate 2^n.  Compare 2^n to the number in memory. 

If 2^n ≤ Memory, then write a 1.  Subtract 2^n from memory:  2^n [ +/- ] [M+].  Decrease n by 1 and continue.

If 2^n > Memory, then write a 0.  Decrease n by 1 and continue.

Each digit will be written to the right of the preceding digit.

Example:  Convert 462 to binary.

Determine n:
462 [SHIFT] (Min) [ log ] [ ÷ ] 2 [ log ] [ = ]
Result:  8.851749041

Start with n = 8.  462 is stored in Memory.

In M:  462  (n = 8)
2 [ x^y ] 8 [ = ] 256,  256 ≤ 462,  [+/-] [ M+ ]   // first digit is 1
Binary:   1________

In M:  206 (n = 7)
2 [ x^y ] 7 [ = ] 128,  128 ≤ 206,  [+/-] [ M+ ]  // next digit is 1
Binary:   11_______

In M:  78 (n = 6)
2 [ x^y ] 6 [ = ] 64,  64 ≤ 78,  [+/-] [ M+ ]  // next digit is 1
Binary:   111______

In M:  14  (n = 5)
2 [ x^y ] 5 [ = ] 32,  32 > 14  // next digit is 0
Binary:   1110_____

In M:  14  (n = 4)
2 [ x^y ] 4 [ = ] 16,  16 > 14  // next digit is 0
Binary:   11100____

In M:  14  (n = 3)
2 [ x^y ] 3 [ = ] 8,  8 ≤ 14,  [+/-] [ M+ ]  // next digit is 1
Binary:   1110001___

In M:  6  (n = 2)
2 [ x^y ] 2 [ = ] 4,  4 ≤ 6,  [+/-] [ M+ ]  // next digit is 1
Binary:   11100011__

In M:  2  (n = 1)
2 [ x^y ] 1 [ = ] 2,  2 ≤ 2,  [+/-] [ M+ ]  // next digit is 1
Binary:   111000111_

In M:  2  (n = 0)
2 [ x^y ] 01 [ = ] 1,  1 > 0  // last digit is 0
Binary:   1110001110

Result:  462_10 = 1110001110_2

Combinations that Allow for Repeated Picks

Sometimes when we are choosing r objects out of a group of n objects, repeated picks are allowed.  That is, any object that is picked is put back in the pool and has a chance to be picked again.  The formula to calculate such calculations is:

nHr = (n + r - 1)! / (r! * (n - 1)!)

We can state nHr in terms of nCr (number of combinations where no repeats are allowed).

aCb = a! / (b! * (a - b)!)
Let a = n + r - 1 and b = n - 1.
Then a - b = n + r - 1 - (r - 1) = r

Then:
nHr = (n + r -1)C(n - 1)

Algorithm:
[ ( ] n [ + ] r [ - ] 1 [ ) ] [SHIFT] (nCr) [ ( ] n [ - ] 1 [ ) ] [ = ]

Example:
Find the number of combinations of picking 10 objects out of the pool of 38, where repeats are allowed.

n = 38, r = 10

[ ( ] 38 [ + ] 10 [ - ] 1 [ ) ] [SHIFT] (nCr) [ ( ] 38 [ - ] 1 [ ) ] [ = ]

Result: 5,178,066,751

Harmonic Mean of Numbers

The harmonic mean of a set of n numbers is calculated by:
HM = n / Σ(1 / x_i)

We can use the Statistics mode to calculate the harmonic mean.

Algorithm:
[ON]  // clear everything and reset calculator to COMP mode
[MODE] 0  // Mode 0 is SD mode (single data, standard deviation)
x_i [SHIFT] (1/x) [M+](DATA)
....
[SHIFT] (n) [ × ] [SHIFT] (Σx) [ = ]

Example:
Data:  3.8, 4.6, 5.9, 7.1, 7.6, 9.0  (n = 6)

[ON]
[MODE] 0 
3.8 [SHIFT] (1/x) [M+](DATA)
4.6 [SHIFT] (1/x) [M+](DATA)
5.9 [SHIFT] (1/x) [M+](DATA)
7.1 [SHIFT] (1/x) [M+](DATA)
7.6 [SHIFT] (1/x) [M+](DATA)
9.0 [SHIFT] (1/x) [M+](DATA)
[SHIFT] (n) [ × ] [SHIFT] (Σx) [ = ]

Result:  6.20145512

Atwood Machine

Given the masses of two weights (in kg) on an Atwood Machine, the following system describes the relationship between the masses, tension, and acceleration of the system:

T + M1 * a = M1 * g
T - M2 * a = M2 * g

where:
T = tension of the system (N)
a = acceleration, positive means the pulley rotates counter-clockwise; negative means the pulley rotates clockwise (m/s^2)
g = Earth's gravity constant, 9.80665 m/s^2

Assumptions:
1.  The mass of both the pulley and the string are negligent
2.  Mass 1 is on the left side of the pulley while Mass 2 is on the right. 

Solving for T and a give:
a = (M1 - M2) * g / (M1 + M2)
T = M1 * (g - a) = M2 (g + a)

Algorithm:
[ ( ] M1 [ - ] M2 [ ) ] [ × ] 9.80665 [ ÷ ] [ ( ] M1 [ + ] M2 [ ) ] [ = ]   
// acceleration is displayed

[ +/- ] [ + ] 9.80665 [ = ] [ × ] M1 [ = ]
// tension is displayed

Example:
M1 = 18 kg, M2 = 12 kg

[ ( ] 18 [ - ] 12 [ ) ] [ × ] 9.80665 [ ÷ ] [ ( ] 18 [ + ] 12 [ ) ] [ = ]   
Acceleration: 1.96133 m/s^2  (pulley is rotating counter-clockwise)

[ +/- ] [ + ] 9.80665 [ = ] [ × ] 18 [ = ]
Tension:  141.21576 N


Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, September 28, 2019

fx-260 Solar Algorithms Part I

fx-260 Solar Algorithms Part I

All results are shown to screen accuracy. 

Sphere:  Surface Area and Volume

With the radius r,
the surface area is S = 4 * π * r^2
the volume area is V = 4/3 * π * r^3

Algorithm:
r  [SHIFT] (Min) [ x² ] [ × ] [EXP](π) [ × ] 4 [ = ]    // surface area is displayed
[ × ] [ MR ] [ ÷ ] 3 [ = ]   // area is displayed

M = r

Example:
Input:
r = 3.86

Results:
3.86  [SHIFT] (Min) [ x² ] [ × ] [EXP](π) [ × ] 4 [ = ]   
Surface Area = 187.2338956

[ × ] [ MR ] [ ÷ ] 3 [ = ] 
Volume = 204.9076123

Monthly Payment of a Mortgage or Auto Loan

Input:
A = amount of the mortgage/loan
I = annual interest rate
N = number of months

The monthly payment can be found by:
PMT = ( 1 - (1 + I/1200)^-N) / (I/1200)

Algorithm:
I [ ÷ ] 1200 [ = ] [SHIFT] (Min)   // stores I/1200 into M
1 [ - ] [ ( ] 1 [ + ] [ MR ] [ ) ] [ x^y ] N [ +/- ] [ = ]
[SHIFT] (1/x) [ × ] [ MR ] [ × ] A [ = ]     // monthly payment

Example:
Input: 
I = 4  (4%)
N = 360
A = 85000

Result:
4 [ ÷ ] 1200 [ = ] [SHIFT] (Min)   // stores I/1200 into M
1 [ - ] [ ( ] 1 [ + ] [ MR ] [ ) ] [ x^y ] 360 [ +/- ] [ = ]
[SHIFT] (1/x) [ × ] [ MR ] [ × ] 85000 [ = ]     // monthly payment

PMT = 405.8030014   ($405.80)
(I/1200 = M = 3.333333333E-03)

Electromagnetic Field Strength 

Given the EIRP (effective isotropic radiated power) of a microwave (in Watts), we can calculate the following:

Power Flux Density: 
S = EIRP / (4 * π * d^2)   (W/m^2,  d = distance from the wave source in meters)

Electric Field:
E = √(30 * EIRP) /  d   (W/m)

Magnetic Field:
H = √(EIRP / (480 * π^2 * d^2) )  (A/m)

Algorithm:

Calculating Power Flux: 
EIRP [ ÷ ] [ ( ] 4 [ × ] [EXP](π) [ × ]  d [ x² ] [ ) ] [ = ]

Calculating Electric Field: 
[ ( ] EIRP [ × ] 30 [ ) ] [SHIFT] (√) [ ÷ ] 0.5 [ = ]

Calculating Magnetic Field:
[ ( ] EIRP [ ÷ ] [ ( ] 480 [ × ] [EXP](π) [ x² ] [ × ] d [ x² ] [ ) ] [ ) ] [ √ ] [ = ]

Example:
Input:
EIRP = 1800 W
d =  0.5 m   (distance)

Results:

Calculating Power Flux: 
1800 [ ÷ ] [ ( ] 4 [ × ] [EXP](π) [ × ]  0.5 [ x² ] [ ) ] [ = ]
Power Flux: 572.9577951 W/m^2

Calculating Electric Field: 
[ ( ] 1800 [ × ] 30 [ ) ] [SHIFT] (√) [ ÷ ] 0.5 [ = ]
Electric Field: 464.7580015 W/m

Calculating Magnetic Field:
[ ( ] 1800 [ ÷ ] [ ( ] 480 [ × ] [EXP](π) [ x² ] [ × ] 0.5  [ x² ] [ ) ] [ ) ] [ √ ] [ = ]
Magnetic Field: 1.232808888 A/m

Source:  Barue, Gerardo.  Microwave Engineering: Land & Space Radiocommunications John Wiley & Sons, Inc.  Hoboken, NJ  ISBN 978-0-470-08966-5 2008

Slope and Intercept with Two Points

Given two points of a line (x1, y1) and (x2, y2) we can find the slope (a) and y-intercept (b) of the general linear equation y = a*x + b.

The trick is to use the rectangular to polar conversion to find the slope:
θ = atan((y2 - y1)/(x2 -x1))
tan θ = (y2 - y1)/(x2 -x1) = slope = a

Once the slope is found, we can solve for the y-intercept:
y = a*x + b
b = y - a*x

Algorithm:
[ ( ] x1 [ - ] x2 [ ) ] [SHIFT] (R→P) [ ( ] y1 [ - ] y2 [ ) ] [ = ] [SHIFT] (X<>Y) [ tan ]
// slope is displayed

[ × ] x1* [ +/- ] [ + ] y1* [ = ]
// intercept is displayed

*x2 and y2 can be used instead

Example:
(x1, y1) = (8, 5.5)
(x2, y2) = (4, 9.5)

Result:
[ ( ] 8 [ - ] 4 [ ) ] [SHIFT] (R→P) [ ( ] 5.5 [ - ] 9.5 [ ) ] [ = ] [SHIFT] (X<>Y) [ tan ]

Slope: -1

[ × ] 8 [ +/- ] [ + ] 5.5 [ = ]

Slope: 13.5


Tomorrow will be Part II. 

Eddie

All original content copyright, © 2011-2019.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026

Casio fx-50F/Radio Shack EC-4024 Program Collection: October 2026 Notes: * The fx-50F/EC-4024 has a 29 step program space betwe...