Tampilkan postingan dengan label RGB. Tampilkan semua postingan
Tampilkan postingan dengan label RGB. Tampilkan semua postingan

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. 


HP 42S/DM42: Base Programs

 HP 42S/DM42:   Base Programs


Unsigned NOT


The program UNOT applies a NOT to a binary integer (flips zeros to ones and ones to zeros) using unsigned binary integers.  The number of bits (size) is prompted.


HP 42S/DM42 Program UNOT


00  {40-Byte Prgm}

01  LBL "UNOT"

02  BINM

03  "BIN?"

04  PROMPT

05  STO 01

06  EXITALL

07  "SIZE?"

08  PROMPT

09  STO 02

10  2

11  X<>Y

12  Y↑X

13  RCL- 01

14  STO 02

15  1

16  -  

17  BINM

18  END


Examples:


Unsigned NOT of 10100, size 5:  1011  (01011)


Unsigned NOT of 10100, size 8:  11101011


Shift Left


Makes a binary integer shift left: a zero is added to the right side of the integer and "drops" off the left most digit.  The number of bits (size) is prompted.  The binary number is assumed to be non-negative. 


HP 42S/DM42 Program SL16


00  {35-Byte Prgm}

01  LBL "SL16"

02  BINM

03  "BIN?"

04  PROMPT

05  EXITALL

06  2

07  ×

08  "SIZE?"

09  PROMPT

10  2

11  X<>Y

12  Y↑X

13  MOD

14  BINM

15  END


Examples:


Shift Left:  10100, size 5:  1000   (01000)


Shift Left:  10100, size 8:  101000  (00101000)


Shift Right (Logical)


Makes a binary integer shift right: a zero is added to the left side of the integer and "drops" off the left most digit.  The binary number is assumed to be non-negative. A logical shift right divides an integer by 2 and taking the integer result.


HP 42S/DM42 Program SR16


00  {24-Byte Prgm}

01  LBL "SR16"

02  BINM

03  "BIN?"

04  PROMPT

05  EXITALL

06  2

07  ÷

08  IP

09  BINM

10  END


Examples:


Shift Right:  10100:  1010


Shift Right:  1010:  101


The next two programs deals with RGB and HEX codes for computer colors.


HP 42S/DM42 Program CLR→:   RBG to Hexadecimal Code


00  {51-Byte Prgm}

01  LBL "CLR→"

02  DECM

03  "RED?"

04  PROMPT

05  65536

06  BASE×

07  "GREEN?"

08  PROMPT

09  256

10  BASE×

11  BASE+

12  "BLUE?"

13  PROMPT

14  BASE+

15  HEXM

16  END


Example:

Red: 221, Green: 80, Blue 109

Result:  HEX Code:  DD506D


HP 42S/DM42 Program  →CLR:   Hexadecimal to RGB Code


00  {63-Byte Prgm}

01  LBL "→CLR"

02  HEXM

03  "HEX CODE?"

04  PROMPT

05  STO 00

06  DECM

07  65536

08  BASE÷

09  STOP   // Red

10  65536

11  BASE×

12  RCL 00

13  X<>Y

14  BASE-

15  STO 00

16  256

17  BASE÷

18  STOP   // Green

19  256

20  BASE×

21  RCL 00

22  X<>Y

23  BASE-

24  END


Example:  

HEX Code:  103E22

Result:  Red:  16, Green:  62,  Blue:  34


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. 


Backlink 9999 Traffic Super

Order Now...!!!!