Showing posts with label TI-65. Show all posts
Showing posts with label TI-65. Show all posts

Sunday, October 16, 2022

TI-65: Relativity Applications

TI-65:  Relativity Applications


Introduction


The programs on today's blog entry were programmed on the Texas Instruments TI-65 calculator.   One of the features of the TI-65 is the set of physical constants.  


The programs call up the speed of light, c = 299,792,458 m/s, by the [ 3rd ] [ 2 ] key combination.  If you are using a TI-58, TI-59, or TI-66, where there are no physical constants, please store 299792458 in a memory register first, and replace the key sequence by recalling that register.  


These programs will use the shortcut:


cos(arcsin x) = √(1 - x^2) for all -1 ≤ x ≤ 1


This allows us to cut down on the number of bytes required.  


Redshift vs. Blueshift


f0 = fs * √((1 - v/c) / (1 + v/c))


v = velocity of the source/star in m/s

blueshift:  v < 0

redshift:  v > 0

fs = frequency given off by the source/star in Hz

f0 = observed frequency in Hz


v/c is stored in register 0.


Program 


Keys:

LBL F1

1

-

(

R/S

÷

[c]

)

STO 0

=

÷

(

1 

+

RCL 0

)

=

√

×

R/S

=

RTN


Key Codes:

2nd 53.53

1

49

16

51

28

3rd 46

17

12.0

39

28

16

1

59

13.0

17

39

33

38

51

39

2nd 52


Instructions:

1.  Press  [ F1 ]. 

2.  Enter v when execution stops, press [ R/S ].

3.  Enter fs when execution stops, press [ R/S ].

4.  f0 is calculated.


Example:

v = 210,000,000 m/s

fs = 450 * 10^6 Hz  (450 [ EE ] 6)

Result:  f0 = 1.888581542E8 Hz  (188.8581542 * 10^6)


Relativistic Doppler Effect


f0 = (fs * √(1 - v^2/c^2)) / (1 - v/c * cos Θ)


v = velocity of the source

Θ = direction of source's motion relative to the observer (angle from the observer's perspective)

fs = frequency given off by the source/star in Hz

f0 = observed frequency in Hz


Program


Key:

LBL F2

(

R/S

÷

[c]

)

STO 0

INV SIN

COS

×

R/S

=

÷

(

1

-

RCL 0

×

R/S

COS

)

=

RTN


Key Code:

2nd 53.54

16

51

28

3rd 46

17

12.0

-22

23

38

51

39

28

16

1

49

13.0

38

51

23

17

39

2nd 52


Instructions:

1.  Press  [ F2 ]. 

2.  Enter v when execution stops, press [ R/S ].

3.  Enter fs when execution stops, press [ R/S ].

4.  Enter Θ when the execution stops, press [ R/S ].

5.  f0 is calculated.


Example:

v = 196 * 10^6 m/s

fs = 500 * 10^6 Hz  

Θ = 40°  (degrees mode)

Result:  f0 = 7.579362482 * 10^8 Hz = 757.9362482 * 10^6 Hz


Time Dilation


t' = t0 * √(1 - (v/c)^2)


t0 = source's time 

v = velocity of source in m/s

t' = observer's time


Key:

LBL 0

R/S

÷

[ c ]

=

INV SIN

COS 

×

R/S

=

RTN


Key Codes:

2nd 53.0

51

28

3rd 46

39

-22

23

38

51

39

2nd 52


Instructions:

1.  Press  [ SBR ] [ 0 ]. 

2.  Enter v, press [ R/S ].

3.  Enter t0 when execution stops, press [ R/S ].

4.  t' is calculated.


Example:

v = 164 * 10^6 m/s

t0 = 1.5 yr

Result:  t' = 1.255654687 yr


Source:


"Sinclair Enterprise Programmable: Physics Engineering Electronics Program Library"  Sinclair Radionics Inc.  New York, NY and St. Ives, Huntingdon, Cambridgeshire UK.  1976


All original content copyright, © 2011-2022.  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. 

Sunday, June 12, 2022

TI-65 Programs

TI-65 Programs


Conversions:  Miles and Kilometers 


TI-65 Conversion:  

F1:  Miles to Kilometers

F2:  Kilometers to Miles


00  2nd 53.53     LBL F1

01  38     ×

02   6     6

03   3     3

04   3     3

05   6     6

06   0     0

07  39     =

08  3rd 25     in-cm

09  28     ÷

10   1     1

11  15     EE

12   5     5

13   39   =

14   -15   INV EE    // remove scientific notation

15   2nd 52    RTN


16   2nd 53.54     LBL F2

17   38     ×

18   1      1

19   15    EE

20   5      5

21   -3rd 25     INV in-cm

22   28     ÷

23   6      6

24   3      3

25   3      3

26   6      6

27   0      0

28   39   ×

29   -15      INV EE

30   2nd 52    RTN


4.9 mi to km:

4.9 [ F1 ]

Result:  7.8857856  km


150 km to mi: 

150 [ F2 ]

Result:  93.20567884 mi


Conversions:  RGB (Red/Green/Blue) Color Code and Hexadecimal Codes


TI-65 Conversions:

F1:  RGB to Hexadecimal

F2:  Hexadecimal to RGB


00   2nd 53.53      LBL F1

01    38     ×

02    1       1

03    6       6

04    18     y^x

05    4       4

06    39     =

07    12.0    STO 0

08    51    R/S

09    38    ×

10    2      2

11    5      5

12    6      6

13    39    =

14    12.59   STO+

15    0      0

16    51    R/S

17    12.59    STO+

18    0       0

19    13.0    RCL 0

20    3rd 13   HEX

21    2nd 52  RTN


22    2nd 53.54   LBL F2

23    12.0   STO 0

24    3rd 12    DEC

25    28      ÷

26    1        1

27    6        6

28    18      y^x

29    4        4

30    39      =

31    2nd 27   INTG

32    51     R/S

33    38     ×

34    1       1

35    6       6

36    18     y^x    

37    4       4

38    39     =

39    12.49  STO-

40    0      0

41    13.0    RCL 0

42    28    ÷

43    2      2

44    5      5

45    6      6

46    39    =

47   2nd 27   INTG

48   51     R/S

49   38     ×

50   2       2

51   5       5

52   6       6

53   39     =

54  12.49   STO-

55   0        0

56   13.0   RCL 0

57   2nd 52  RTN


RGB to HEX:   red  [ F1 ]  green [ R/S ] blue [ R/S ] 

Example:  Red:  108, Blue:  4, Green: 82

108 [ F1 ]  4 [ R/S ] 82 [ R/S ]

Result:  6C0452  (HEX mode)


HEX to RGB:   [ 3rd ] (HEX) hex code [ F2 ]  

Example:  Hex Code: 3401D2

[ 3rd ] (HEX) 3401D2 [ F2 ] 

Result:  52 (red) [ R/S ], 1 (green) [ R/S ], 210 (blue)



Electronics:  Primary Filter and Voltage Gain


F1:  Calculate frequency.  f = 1 ÷ ( 2 * π * R * C ).   

Syntax:  R [ F1 ] C [ R/S ]

R = resistance in ohms ( Ω )

C = capacitance in farads ( F )

f = frequency in Hertz (Hz)


F2:  Voltage Gain.  G = 20 * log( E_output ÷ E_input ).  

Syntax:  E_output [ F2 ] E_input [ R/S ]

E_output = output voltage ( V )

E_input = input voltage ( V )

G = voltage gain in decibels ( dB )


Source:  Casio fx-61f User's Manual


00  2nd 53.53  LBL F1

01  38    ×

02  51    R/S

03  38    ×

04  2      2

05  38    ×

06  2nd 17  π

07  39    =

08  34    1/x

09 2nd 52  RTN


10  2nd 53.54  10

11  28    ÷

12  51    R/S

13  39    =

14  2nd 32  LOG

15  38   ×

16  2     2

17  0     0

18  39   =

19  2nd 52  RTN



R = 8400 Ω, C = 0.05*10^-6 F

8400 [ F1 ] 0.05E-6 [ R/S ]

Result:  3.789403407E2 Hz


E_output = 54 V, E_input = 28 V

54 [ F2 ] 28 [ R/S ]

Result:  5.70471457 dB


Eddie


All original content copyright, © 2011-2022.  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. 


Monday, July 4, 2016

TI-65 Programs Part III: Impedance and Phase Angle of a Series RLC Circuit, 2 x 2 Linear System Solution, Prime Factorization (from TI-65 Manual)

TI-65 Programs Part III:  Impedance and Phase Angle of a Series RLC Circuit, 2 x 2 Linear System Solution, Prime Factorization (from TI-65 Manual)


This is the third and final part of programs I will post today, this Fourth of July.




TI-65 Impedance and Phase Angle of a Series RLC Circuit

Formulas:

Impedance: Z = √(R^2 + (XL –XC)^2)

Phase Angle:  Φ = atan ((XL – XC)/R)

Where:
R = resistance of the resistor in ohms (Ω)
L = inductance of the inductor in Henrys (H)
C = capacitance of the capacitor in Farads (F)
f = resonance frequency in Hertz (Hz)
XL = 2*π*f*L
XC = 1/(2*π*f*C)

Program:
CODE
STEP
KEY
COMMENT
38
00
*
Start with f
2
01
2

38
02
*

2nd 17
03
π

39
04
=
Calculate 2*π*f
12.0
05
STO 0

12.1
06
STO 1

38
07
*

51
08
R/S
Prompt for L
39
09
=

12.0
10
STO 0
Calculate XL
13.1
11
RCL 1

38
12
*

51
13
R/S
Prompt for C
39
14
=

34
15
1/x

12.1
16
STO 1
Calculate XC
51
17
R/S
Prompt for R
12.2
18
STO 2

2nd 33
19
x^2

59
20
+

16
21
(

13.0
22
RCL 0

49
23
-

13.1
24
RCL 1

17
25
)

2nd 33
26
x^2

39
27
=

33
28
√

-2nd 16
29
INV 2nd ENG
Remove ENG Notation
51
30
R/S
Display Z
16
31
(

13.0
32
RCL 0

49
33
-

13.1
34
RCL 1

17
35
)

28
36
÷

13.2
37
RCL 2

39
38
=

-24
39
INV TAN
arctangent
51
40
R/S
Display Φ

Input:  f [RST] [R/S], L [R/S], C [R/S], R [R/S]
Result:  Z [R/S] Φ

Test: f = 60 Hz, L = 0.25 H, C = 16 * 10^-6 F, R = 150 Ω
Result (in degrees mode):  Z ≈ 166.18600 Ω,  Φ ≈ -25.49760°

Source:  Browne Ph. D, Michael.  “Schaum’s Outlines:  Physics for Engineering and Science”  2nd Ed.  McGraw Hill: New York, 2010


TI-65 2 x 2 Linear System Solution

Let M = [ [a, b], [c, d] ],  S =  [ [ f ], [ g ] ]

Determinant:  E = a*d – b*c

If E ≠ 0, the solutions to the system Mx = S:
x1 = d/E * f – b/E * g
x2 = -c/E * f + a/E * g

Memory Registers:
R0 = a
R1 = b
R2 = c
R3 = d
R4 = f
R5 = g

Hence [ [R0, R1], [R2, R3] ] * [ [x1], [x2] ] = [ [R4], [R5] ].  The determinant is stored in R6.  Since so many storage registers are used, and storage registers eat up programming memory, the program will need to be short.

Program:
CODE
STEP
KEY
COMMENT
13.0
00
RCL 0
Calculate det(M)
38
01
*

13.3
02
RCL 3

49
03
-

13.1
04
RCL 1

38
05
*

13.2
06
RCL 2

39
07
=

12.6
08
STO 6

13.3
09
RCL 3
Calculate x1
38
10
*

13.4
11
RCL 4

49
12
-

13.1
13
RCL 1

38
14
*

13.5
15
RCL 5

39
16
=

28
17
÷

13.6
18
RCL 6

39
19
=

51
20
R/S
Display x1
13.0
21
RCL 0
Calculate x2
38
22
*

13.5
23
RCL 5

49
24
-

13.2
25
RCL 2

38
26
*

13.4
27
RCL 4

39
28
=

28
29
÷

13.6
30
RCL 6

39
31
=

51
32
R/S
Display x2


Input:
Store values:
a [STO] 0, b [STO] 1, c [STO] 2, d [STO] 3; f [STO] 4, g [STO] 5
Press [RST] [R/S]
If det(M) ≠ 0, x1 will be calculated.  Press [R/S] to get x2.
Press [RCL] 6 to get the determinant of M.

Test:  Solve
2*x1 + 3*x2 = 3.45
-6*x1 + x2 = 4.26

R0 = 2, R1 = 3, R2 = -6, R3 = 1, R4 = 3.45, R5 = 4.26

Results:  x1 = -0.4665, x2 = 1.461.    Determinant = 20 (stored in R6)


TI-65 Prime Factorization

This prime factorization comes straight from the Texas Instruments TI-65 Manual.

Program:
CODE
STEP
KEY
COMMENT
12.1
00
STO 1
Store n in R1
0
01
0

12.0
02
STO 0
Store 0 for comparisons
3
03
3

12.2
04
STO 2
Trail factor of 3
2nd 53.0
05
LBL 0
Test 2 as a factor
13.1
06
RCL 1

28
07
÷

2
08
2

39
09
=

2nd 28
10
FRAC
Is frac(R1/2)≠0?
-3rd 43
11
INV x=m
x≠m
0
12
0
R1≠R0?
2nd 54.1
13
GTO 1
Go to odd factors
2
14
2

12.28
15
STO÷

1
16
1
STO÷ 1
51
17
R/S
Display 2 if it is a factor
2nd 54.0
18
GTO 0
GTO 0, test 2 again
2nd 53.1
19
LBL 1
Odd factors loop begins here
13.1
20
RCL 1

-3rd 42
21
INV x<m
x≥m
2
22
2
Is R1≥R2?
2nd 54.2
23
GTO 2
All factors found? No: GTO LBL 2
13.1
24
RCL 1
If complete, display 1
51
25
R/S
(program execution ends here)
2nd 54.1
26
GTO 1

2nd 53.2
27
LBL 2
Label 2 starts here
13.1
28
RCL 1

28
29
÷

13.2
30
RCL 2

39
31
=

2nd 28
32
FRAC
Is frac(R1/R2)≠0?
-3rd 43
33
INV 3rd x=m
x≠m
0
34
0

2nd 54.3
35
GTO 3

13.2
36
RCL 2
Display odd factor
51
37
R/S

12.28
38
STO÷

1
39
1
STO÷ 1
2nd 54.1
40
GTO 1

2nd 53.3
41
LBL 3
Test next odd factor
2
42
2

12.59
43
STO+

2
44
2
STO+ 2
2nd 54.1
45
GTO 1


Input:  Enter n, press [RST] [R/S].  Each prime factor is displayed, keep on pressing [R/S] until you get 1 displayed.

Test 1:  Factorize 102
Input:  102 [RST] [R/S]
Result: 2, press [R/S]
Result: 3, press [R/S]
Result: 17, press [R/S]
Result: 1
Final result:  102 = 2 * 3 * 17

Test 2:  Factorize 168
Input: 168 [RST] [R/S]
Repeated presses of [R/S] gives: 2, 2, 2, 3, 7, 1
Final result:  168 = 2 * 2 * 2 * 3 * 7 = 2^3 * 3 * 7

Resource:  Texas Instruments.  “Texas Instruments Professional TI-65 Guidebook”  1986

This blog is property of Edward Shore, 2016.


HP 15C: The I Squared Rule and HHC 2026

HP 15C: The I Squared Rule and HHC 2026 HHC 2026 Videos Before we start, the videos for HHC 2026 are up! Please take a look, ev...