11.07.2015 Views

Atari Calculator/Atari_Calculator_Manual_Optimized ... - Strotmann.de

Atari Calculator/Atari_Calculator_Manual_Optimized ... - Strotmann.de

Atari Calculator/Atari_Calculator_Manual_Optimized ... - Strotmann.de

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PREFACEThis manual has been written on two levels: for stu<strong>de</strong>nts and professionals in thetechnical fields who are intimately acquainted with programmable calculators,and for the " beginner" who uses mathematical functions in school or a job, butwho is not really familiar with the capabilities of a programmable calculator.The first section contains the information you need to know regarding how toget started. The second three sections contain step-by-step explanations of theCALCULATOR display and how to enter and solve mathematical problems in eachof the three calculation mo<strong>de</strong>s: ALG, ALGN, and RPN. Each option used on theStatus Display is thoroughly explained and examples are given to allow the beginnera chance to receive " hands-on" experience. The following four sections<strong>de</strong>scribe each of the functions in <strong>de</strong>tail with examples of how to enter the functions.If you are extremely familiar with the functions in this CALCULATOR, youmight want to skip these sections and simply review Appendix C for the list of thefunctions and their abbreviations.The next section <strong>de</strong>tails the programming commands. In this section, you will" write" and modify a program. The second part of this section inclu<strong>de</strong>s exampleprograms using the CALCULATOR functions. The programs inclu<strong>de</strong> practical examplesfor ham radio operators, interest calculations for those interested in howmuch you actually pay on a time purchase, and more theoretical problems such asspherical/rectangular conversion examples. Section 10 is inclu<strong>de</strong>d for programmerswho work in assembly language and who <strong>de</strong>al with bit manipulation functions.The last section explains the commands for peripheral input and output. It gives exampleson how to " save" your programs on an AT ARI 810 Disk Drive and theAT ARI 410 Program Recor<strong>de</strong>r, and how to list your data on an AT ARI 820Printer.The appendices inclu<strong>de</strong> the Error Messages, Helpf ul Prompt Messages (non-errormessages), an alphabetical list of all the CALCULATOR functions, and a table ofconversion factors.Prefacev


CONTENTSPREFACE1 INTRODUCTIONLoading the <strong>Calculator</strong> Diskette ProgramConventions Used in This <strong>Manual</strong>Keyboard RepresentationTerminology112232 KEYBOARDDisplay Control KeysShift FunctionControl FunctionClear Current Entry FunctionClear Prompt Line and Stack Display FunctionEnd of Command FunctionSystem Reset FunctionFunction Entry FormatsToken EntryAbbreviated Entry555666666673 SCREEN DISPLAYPrompt and Scroll AreaNumber StackPush CommandPop CommandClear X Register CommandClear Stack CommandsExchange X and Y Registers CommandMemoryStore CommandRecall CommandList Memory CommandSum to Memory CommandExchange Number in X Register WithMemory CommandClear Memory Command9910111212131314141415161718Contentsvii


Status Display 18Computation Mo<strong>de</strong>s 19Algebraic Notation With Operator Prece<strong>de</strong>nce 19Algebraic Notation With No Operator Prece<strong>de</strong>nce 20Reverse Polish Notation 22Angular Mo<strong>de</strong>s 25Number Bases 25Decimal Base and the Floating Point Notation 25Octal Base 26Hexa<strong>de</strong>cimal Base 27Displaying Numbers 28Fix Command 28Bits Command 29Financial Options 304 CONVERSIONS 31Fahrenheit ... Celsius 31Mass, Length, and Volume Conversions 31Degrees'" Radians Conversions 32Polar'" Rectangular Conversions 335 FUNDAMENT AL FUNCTIONS 37Absolute Value Function 37Change Sign Function 37Fraction Function 37I nteger Function 38Pi Function 38Reciprocal Function 38Round a Number Function 39Square Function 39Square Root Function 39Truncate Function 406 ALGEBRAIC AND TRIGONOMETRICFUNCTIONS 41Algebraic Functions 41Exponentiation Base e Function 41Exponentiation Base 10 Function 41Factorial Function 41Logarithm Base 10 Function 42Natural Logarithm Function 42Power and Root Functions 42Modulo Function 45viiiContents


Trigonometric FunctionsSine, Cosine, and Tangent FunctionsArc Sine, Arc Cosine, and Arc Tangent FunctionsComputing Hyperbolic Functions464646477 STATISTICS FUNCTIONSStatistical Functions I ncluding Linear RegressionClear Memory Registers 3-9 for StatisticsCalculations Mo<strong>de</strong>Description of FunctionsSigma Plus FunctionSigma Minus FunctionN Weighting FunctionMean of X FunctionMean of Y FunctionVariance of X FunctionVariance of Y FunctionStandard Deviation of X FunctionStandard Deviation of Y FunctionSlope FunctionY-I ntercept FunctionCorrelation Coefficient FunctionReturn Y Given X and Return X Given Y Functions49494950505050515151515152525252528 FINANCIAL FUNCTIONSMo<strong>de</strong> OptionsC lear Memory Locations 4-9 for InterestCalculations Mo<strong>de</strong>Select Enter Mo<strong>de</strong>Select Find Mo<strong>de</strong>Compound InterestBalloon Payment FunctionFuture Value FunctionInterest Rate Per Period in Percent FunctionNumber of Periods FunctionPayment Per Period FunctionPresent Value FunctionSelect Compound Interest Mo<strong>de</strong>AnnuitiesFuture Value of an Annuity Due FunctionFuture Value of an Ordinary Annuity FunctionPresent Value of an Annuity Due FunctionPresent Value of an Ordinary Annuity Function636363646464646464656565657070707273Contentsix


9 PROGRAMMING INSTRUCTIONSAND EXAMPLES 75Mo<strong>de</strong> Select 75Enter Program Mo<strong>de</strong> Instruction 75Clear Program Memory Instruction 76End Program Mo<strong>de</strong> Instruction 77Programming Instructions 78List Program Instruction 78Back Step Instruction 79Single Step Instruction 79Insert Character(s) Instruction (One Byte) 80Insert Number Instruction (EigLt Bytes) 81No Operation Instruction 82Delete Current Instruction Command 84Stop Program Instruction 85Continue Program From Current Location Instruction 86GOTO Instruction 87Conditional Branching Instructions 87Call Su broutine at Location n Instruction 91Return From Subroutine Instruction 91Pop Call Stack Instruction 94Display Program Trace Instruction 98Turn Off Trace (No Trace) In'struction 100Pause Instruction 100Reset I nstru ction 101Programm ing Exa mples Using Fundamental Functions 1031, In Summation, , , 1032, In All Probability, I' m Ready for Vegas 104Programming Examples Using Algebraicand Trigonometric Functions 1053, Off on a Tangent 1054, Putting a Round ' Peg' in a Three-Cornered Hole 1085, Putting a Roof Over Your Head 1106, Divi<strong>de</strong> and Conquer 1137, Permutations! 1148, Combinations! 116Programming Examples for Radio Nuts 1179, I Can't Hear You-Get a Bigger Antenna 11710, Faster Than a Speeding Bullet 11811, S,O.5. , , , I Think I'm Lost 11912, Decibels, Shmecibles, Turn It Down ! 12113, The Ever-Popular Ohm's Law 12214, Charge It 12415, Personal Magnetism 12516, Why Make It Difficult? 126i!'xContents


APPENDICESA ERROR MESSACESB NON-ERROR MESSACESC FUNCTION SUMMARYD CONVERSION FACTORS163163165167171ILLUSTRATIONS1 Diskette Insertion2 Example of <strong>Calculator</strong> Screen Display3 Stack Analogy4 LlSTM Display5 Maximum Range of Number Bases6 Status Display Category Definition7 Operator Prece<strong>de</strong>nce8 Root and Power Table9 Program Mo<strong>de</strong> Screen Display10 Instructions Not To Be Stored in Memory11 Binary Bit Pattern12 DOS Menu291016171819437576156160xiiContents


1INTRODUCTIONYour ATARI® Personal Computer System with its 145-function CALCULATORdiskette program combines the best qualities of a calculator and a computer. Thediskette program contains 145 functions ranging from simple arithmetic operationsto programming commands that allow you to write your own programs. The typewriter-Iike keyboard perm its you to enter data with less chance of "finger-error"and the display-your own television set-shows you what you have entered inreadable characters, how the computer handles the data, and the calculationresults. So, not only can you work complex conversions at the touch of one or twokeys, but you can watch the stack and memory displays as well. In addition, thecomputer will let you know if you've ma<strong>de</strong> a mistake, or if you are asking the impossible.If you do not know how to hook up your AT ARI computer or attach the peripheralequipment you wish to use, read the appropriate Operator's <strong>Manual</strong>. This manualwas written to explain the CALCULATOR diskette functions. You must have 24KRAM to use this diskette.LOADING THECALCULATORDISKETTEPROGRAM1. Remove cartridge from cartridge slot and close console cover.2. Turn on television set.3. Turn on disk drive unit. The BUSY light will stay on until the drive is initialized.4. Turn on any other <strong>de</strong>sired peripheral <strong>de</strong>vices.5. Hold diskette with label in the lower right corner and the arrow pointingtoward the disk drive (see Figure 1).6. Insert diskette into drive and close disk drive door.7. Turn on computer console.Introduction 1


The CALCULATOR diskette program will load automatically and the display willappear on the screen.II CARTRIDGEATARI800PERSONAL COMPUTERSYSTEMATARI810DISK DRIVEFigure 1Diskette insertionCONVENTIONSUSED IN THISMANUALKEYBOARD REPRESENTATIONEach named key is illustrated as a keycap: E'l'i!II, 1iDIID, BID, am, 1·@'i1,t.t31.i­BIll, .wi"hU',The space bar is also represented as a keycap. However, EEl and 'id3.'U;, areused interchangeably.Alphanumeric characters and symbols are illustrated in bold typeface: 12, 3, +,RPN.Commands are illustrated in bold typeface as single keystroke entries wheneverpossible: A for Absolute; otherwise they are illustrated in their most abbreviatedform: lOADM for Load Memory from File. These commands are not shown asseparate key tops.2 Introduction


Double key commands which entail one key being pressed and held while pressinga second key are illustrated as being si<strong>de</strong> by si<strong>de</strong>. These double key commandsusually require the .. or control ( ) key to be pressed and held; e.g.PressandHoldPressElEJ to clear the display9 for an open parenthesis/\ for the power symbolTERMINOLOGYThe words command, function, and instruction are used interchangeablythroughout this manual to refer to the 145 functions that are available. However,instruction is used primarily for functions used in programs. Operators refer tosymbols used in solving problems; e.g. , +, *, -, /,/\.Unless otherwise specified, the word stack refers to the number stack. RAM refersto Random Access Memory.J ntroduction 3


2KEYBOARDDISPLAYCONTROL KEYSThe CALCULATOR screen format is displayed in upper case, non-inverse vi<strong>de</strong>o.This means that all the alphabetic characters are capitalized and that thecharacters appear on the screen as light characters on a dark background. In theAT ARI BASIC computer language you had the option of displaying the charactersin upper and lower case by using the ''''4"il@;' key. That function has beennullified for the CALCULATOR program as you do not need it. Also, by using theATARI logo key (8) in BASIC, you could print dark characters on a light background.That function has also been nullified. The following paragraphs <strong>de</strong>scribethe keys that do control the screen display.EmID FUNCTIONOn a typewriter, the EmID key is used to print a capital letter or an " upper case"symbol. This CALCULATOR program uses the EmID key to print an upper casesymbol. The following is a list of all the symbols that require a EDIID key precedingthem and the functions they represent.SYMBOLKEYS USEDFUNCTION/I#$%&@EmID 1EmID 2EmID 3EmID 4EmID 5EmID 6EmID 7EmID 8EmIDEmIDEmID *,EmIDEmIDEmIDFactorialResetProgram mo<strong>de</strong>EndModuloLogical ANDRunContinueChange signLogical ORRaise to a powerPush contents of X registerPop contents of X registerPrintKeyboard 5


&mI FUNCTIONThis key is similar in function to the EmID key. On your AT ARI keyboard, there arefour keys that have triple functions. The arrows are displayed when the &mI key ispressed first. The following examples illustrate the symbols that must be prece<strong>de</strong>dby the &mI key.SYMBOL KEYS USED FUNCTIONtBack Step.j, Bii.1I Single Step-- Bii.1I + Exchange X and Y registers-+BID Insert numberCLEAR CURRENT ENTRY FUNCTIONTo clear the prompt line, you can use either thekey or the EmID'DElETE BACK S keys. This is valuable when you mistype a number or misspell a commandname.CLEAR PROMPT LINE AND STACK DISPLAY FUNCTIONPress either EmID &!!!.I or BID &!!!.I. This causes the computer to erase theprompt line, clear the number stack display, and place a 0 in the X register.END OF COMMAND FUNCTIONTo indicate the end of a command entry, press I;I:",@. or the J#Si:mjl. Thel;!iiii@1 and E!il'.l'mJ keys may be used interchangeably in this program. When eitherof these keys or a number is pressed, the computer program clears the prompt lineand displays the function name in the scroll area, then performs the necessaryoperation.SYSTEM RESET FUNCTIONThe lii.iiMUWiI key initiates a "warm start" in that it will return theCALCULATOR program to its original ON state. However, the program memoryand memory registers are not cleared. This operation must be done separately usingeither CLPROG or CLMEM instructions (to be discussed in the PROGRAM­MING INSTRUCTIONS AND EXAMPLES section).FUNCTIONENTRY FORMATSThis CALCULATOR diskette program contains two different ways to enter functions:token and abbreviated. Some functions can be entered either way. A completesummary of commands with their tokens or abbreviated forms is given in AppendixC.TOKEN ENTRYA token entry is a single symbol entry. Examples of token entries are the mathematicaloperators; +, -, *, /, = . Other token entries were discussed in the EmID functionand &mI function paragraphs. They required pressing two keys simultaneouslyto print the symbol. Refer back to these paragraphs.6 Keyboa rd


ABBREVIATED ENTRYOther functions have " abbreviated" forms ranging from a single letter to six letters.Examples of these are 0 for Octal, NOT or NOTRe for No Trace, INSN or INSNUMfor I nsert Number, and ALGN for Algebraic Notation with No OperatorPrece<strong>de</strong>nce.As this manual progresses, you will use the display control keys and functions sothat you will become completely familiar with them. But for now, look at thescreen display.Keyboard 7


3SCREEN DISPLAYAs you can see, the display on the screen consists of several divisions, each<strong>de</strong>noted by a different color. Figure 2 illustrates the screen and its various divisionswith sample entries.STATUS DISPLAY LINE(Default options shown)STACKDISPLAYSTACKHEHORY •o1802 83 0"5102"06 87 ' 88 0~ 8MEMORY........ --DISPLAYSCROLL AREA(7 lines)PROMPT LINEWITH CURSOR~~~~~~~~~LA~STENTRY:!:: LINEFigure 2Example of <strong>Calculator</strong> Screen DisplayPROMPT ANDCROLL AREAThe scroll area, in which all keyboard and computational actions are reflected, isdivi<strong>de</strong>d into three fields. The left field is reserved for computer-generatedmessages. In the above figure, the computer has displayed the message, ENTER0-99. The program also uses this field to display error messages. Appendix A gives acomplete list of error messages while Appendix B gives a list of the "helpful"messages the program uses to prompt you. The middle field is reserved fornumbers. Your entries and the computer program's calculated results are displayedin this field. Any computer-calculated results will have *** after them. In Figure 2,the number field contains 2, 10, and 1024. The rightmost field displays functionnames, operator symbols and asterisks. In Figure 2, this field displays CLMEM,POWER, =, ***, and STO.The prompt symbol (» is located on the last line of the scroll area. It is followedby the cursor which shows you where your next entry will begin. To familiarizeyourself with the way your CALCULATOR displays data you enter, type 1. The 1 appearsnext to the prompt symbol and the cursor moves one space to the right. Nowpress 11d9"',!;,. The 1 moves up one line into the scroll area number field and intothe X register (see NUMBER STACK). Now type the numbers on the next page.Screen Display 9


2 lig'ijli:t l!;,3 eR.tIJ';@ii4 lil·II:!,hl5 lik'Ai:!,);'6 11#-'9 ':1.';.7 11"'3 ' :"';'8The scroll area now looks like this:J.234567Notice that each time you entered a number by pressing the J#!9,;f.u, the entirescroll moved up one line.TypeEIlDIEDThe 8 that was on the prompt line disappears as does the 7 that was in the X registerof the Stack Display.NUMBER 5T ACKLocated directly above the scroll area, the stack provi<strong>de</strong>s temporary storage locations(or registers) for 42 numbers. Of these 42 locations, only the first 10 are displayedon the screen. Although the other 32 locations are "invisible," they arenonetheless available for your use. The first two registers are <strong>de</strong>signated as the Xand Y registers. The X register is the location where your results appear; therefore, itis also known as the accumulator register.I""---~~ ~~~C-;,--~~1}~ ~~ ~~ - ~C ~IIc. ~c. ~ IFigure 3Stack Analogy10 Screen Display


The stack works very simply. If you have ever been in a cafeteria that uses an automaticspring-loa<strong>de</strong>d plate dispenser, you have seen a practical example of a ~tack.The plate dispenser can only hold a certain number of plates. Therefore, it has acertain number of places or locations. When the busboy puts one plate on thedispenser, he has "loa<strong>de</strong>d" one location. When he places a second plate on top ofthe first one, the first plate moves down one location. This move is called a PUSHand the Number Stack works the same way.TypeStackDisplayX 5CommentsThis places a 5 in the X register.To move this 5 to the Y register (one location down), you must use a PUSH command.PUSH COMMANDIlmD [ (left bracket) or PUSH 1.1dJi,Oi'You can either type the word PUSH followed by pressing the '@Ai''''j', or you canpress IlmD [ to use the token entry. The following example uses the token entry.TypeStackDisplayComments1lmD [ X 5Y 56 1lmD [ X 6Y 62 57 1lmD [ X 7Y 72 63 5This command causes the content of the X registerto move down to the Y register, but it doesdoes not disappear from the X register.This PUSH places the 6 in the X register and immediatelymoves it down to the Y register. The5 that was in the Y register is "pushed" to the 2register.Again, this PUSH places the new entry, 7, intothe X register and immediately moves it to theY register. This causes the former contents ofthe X and Y registers and the 2 register to be"pushed" down also.Each time you enter a value followed by a PUSH command, the value will appearin the X register and will be immediately duplicated into the Y register. If you donot enter a value preceding a PUSH command, the number that is already in the Xregister will be duplicated into the Y register. In either of these cases, the contentsof the other registers will move down one register.If you fill all the registers (42) with values then try to enter another number, thescreen will display the message ERROR-STACK FULL. The program will not allowyour last number to be entered and the stack will rem ai n unchanged.Screen Display 11


POP COMMANDma 1 (right bracket) or POP "#A'@;'Just as you can remove plates from the cafeteria plate dispenser, you can removenumbers from the stack register. To do this, you either type POP, then press the11#91"1';', or you press 1Typema lStackDisplayXY2765CommentsThis command removes the number that wasin the X register and replaces it with the numberthat used to be in the Y register. This causesall other register contents to move up one location.Emil lXY65Now you can see more clearly that the 7 wasremoved from the X register, replaced by the 6that was in the Y register, and that the 5 thatwas in the 2 register is now moved up to the Yregister. The "popped" number (7) shows in thescroll area.Notice that in removing numbers from the stack, you didn't remove the firstnumber you entered, but the last. The same is true of the plate dispenser. Thebusboy doesn't take the first plate he loa<strong>de</strong>d onto the stack, but the last one heplaced there. This is called a LIFO (Last In, First Out) structure. You can onlyremove the last number you entered (the number in the X register).Currently you have two numbers left in the stack-a 6 in the X register and a 5 inthe Y register.Typemil lStackDisplayX 5CommentsThis POP command removes the 6 from the Xregister and moves the 5 from the Y register tothe X register.This leaves only one number· in the stack. If you try to enter another POP command,the screen will display the message ERROR-STACK EMPTY. The computerprogram will not allow you to empty the stack completely.CLEAR X REGISTER COMMANDC LX aMii :t.';'Although the computer program will not allow you to empty the stack completely,you can use this CLX command to replace the content of the X register with o.12 Sc reen Display


TypeStackDisplayxoCommentsThis command removes the 5 from the Xregister and replaces it with a O.CLEAR STACK COMMANDSAnyone of the above three commands will clear the stack and set the contents ofthe' X register to 0 as well as clearing the current entry on the prompt line.EXCHANGE X AND Y REGISTERS COMMANDEmI ..... or XCHGY Ive,,'·1;1Sometimes you will find it necessary to switch the contents of the X and Y registersin the stack. To do this, you either type XCHGY and press the li4M.:f4i', or youpress EmI ......Type.5 mD [6 11#.$il;I.';'EmI -StackDisplayX 5Y 5X 6Y 5X 5Y 6CommentsThe 5 that was in the Y register is now in theX register and vice versa.The following example uses all the commands explained in this section.TypeISl.D E.1!D3 IVNj:fl1ilEmI [C LX 111·*91;51i.EmI -CLR '14M':t"15 mD [2 J1k'Ai:I.';'mD lEmlm:mX RegisterDisplay330305250Y RegisterDisplay33o55Screen Display 13


MEMORYYou have 100 memory locations (or registers) into which you can store numbers.When you first turn the power on, all memory registers are initialized to O. Thescreen display shows the first 10 memory locations (labeled 0-9). The following sixcommands are exclusivel y associated with memory. The other two commandsassociated with memory, SAVEM and LOADM, are <strong>de</strong>scribed in I/O COMMANDSFOR PERIPHERAL DEVICES.STORE COMMANDThis command stores whatever is in the X register of the stack into a memory locationthat you specify. After you type STO i#SI@;I, the screen displays themessage ENTER 0-99. Then you enter the memory location in which you wish toplace the content of the X register.Stack Memory ScrollType Display Display Message Comments5 114.13':'4;' X 5S10 Jiq.Ai~t.!;i X 5 ENTER 0-99o 114·S3':!·!;1 X 5 0 5 The 5 in the X registeris now stored inmemory location O.23 11k'AI:!'!;' X 23 0 5S10 414"3':!·!;' X 23 0 5 ENTER 0-991 111·';1.','1 X 23 0 5 The 23 in the X reg-1 23 ister is now stored inmemory location 1.17 ,i4·AI."iI X 17 0 51 23STO EI'ml:!'!il X 17 0 5 ENTER 0-991 2322 11~,!al:!;!il X 17 0 5 The 17 in the X reg-1 23 ister is now stored in22 17 memory location22 (not visible ondisplay).RECALL COMMANDTo retrieve a number from a memory location, use the RCL command. This commandtakes the number in the memory location you specify and places it in the Xregister.14 Screen Displ ay


Stack Memory ScrollType Display Display Message Comments0 5 ENTER 0-991 23X 5 0 5 The 5 in memory1 23 location 0 is nowloa<strong>de</strong>d into the Xregister.Note: In Reverse Polish Notation (RPN), an automatic PUSH is performed. SeeReverse Polish Notation computation mo<strong>de</strong> later in this section.TypeStackDisplayMemoryDisplayScrollMessageCommentsRet 114'SI:t.!;'X 170 51 230 51 23ENTER 0-99The 17 in memory location22 (not visibleon screen) is nowloa<strong>de</strong>d into the Xregister.LIST MEMORY COMMANDThis command displays the contents of the requested memory locations in the scrollarea. After you enter the command, the screen displays the message ENTER 0-99 foryou to enter the first memory location to be displayed. After you enter the number(which must be a <strong>de</strong>cimal number), the screen displays a second message ENTER0-99 for the last memory location to be displayed . Remember, the scroll areadisplays only seven lines at a time. If you request more than seven memory locations,you can press the Ei'lZ!I key to stop the listing. However, if you do, you cannotcontinue the listing. If you want to halt the listing temporarily, press &11 1 tostop it and press &11 1 again to restart it.TypeStackDisplayMemoryDisplayScrollMessageCommentslISTM 114M'1:0;' X 17o J14·$';'·';I1 J1p·'91:"';'o1523ENTER 0-99ENTER 0-99Lists data for memorylocations 0 and 1.Screen Display 15


STACKHEHORVK 1.7 o 5V 1. 232 2 '03 3 e'4 0•5 5 e6 6 07 7 88 8 8'} '} 0Figure 4LlSTM DisplayThe memory location numbers are displayed in inverse vi<strong>de</strong>o in the left field of thescroll area and the contents of each location are displayed in the center field of thescroll area.Remember, you can stop and restart the listing by pressing IiI3 1.Stack Memory ScrollType Display Display Message CommentsLISTM 111'!BI:!'!il X 17 0 5 ENTER 0-991 23o 11P"31:"';' X 17 0 5 ENTER 0-991 2325 111'!II:!'!il X 17 0 5 Begins displaying1 23 memory locations0-25 as soon as.. 1#31:6:1;, is pressed1il3 1 X 17 0 5 Stops listing.1 23GlD 1 X 17 0 5 Restarts listing.1 23SUM TO MEMORY COMMANDSUM 11k-'9i:'.';'This command adds the content of the X register to a memory location that youspecify. It then stores the resulting sum into the same specified memory location.16 Sc reen Display


Note: It is advisable to store a number in memory before doing a series of SUMcommands to make sure the memory register is initialized correctly.If the numbers exceed the allowed range, which for <strong>de</strong>cimal is ±1 E -98 to ±9E+97 (Figure 5), the message ERROR-ARITHMETIC OVERFLOW appears in thescroll area and the X register will be set to O. (See NUMBER BASES.) The contentsof the memory register will be displayed in the sc roll area followed by the lastnumber you attempted to enter.BaseDecimalOctalHexa<strong>de</strong>cimalRange in Base± -98 to±9E +9720000000000to1777777777780000000to7FFFFFFFRange in Decimal- 2147483648to+ 2147483647-2147483648to+ 2174783647Figure 5Maximum Range of Number BasesTypeStackDisplayMemoryDisplayScrollMessageComments15 111,111:!'!ilSUM J1ti3i:t'1;jo i1itiii:f.MX 15X 15X 150 51 230 51 230 201 23ENTER 0-99The 15 in the X registerwas ad<strong>de</strong>d tothe 5 in memory location0 and theresultant sum of 20is stored in memorylocation O.EXCHANGE NUMBER IN X REGISTER WITH MEMORY COMMANDUsing this command, you can switch the number in the X register with the contentof a memory location that you specify.Screen Display 17


TypeStackDisplayMemoryDisplayScrollMessageCommentsXCHMx 15x 23o 201 23o 201 15ENTER 0-99The 15 that was inthe X register goes tomemory location 1and the 23 that wasin memory location1 is now loa<strong>de</strong>d intothe X register.CLEAR MEMORY COMMANDCLMEM l#fI)':f.1;'This command puts a 0 in each memory location.TypeStackDisplayMemoryDisplayScrollMessageCommentsCLMEM 11dal"";' X 23oo1 0STATUS DISPLAYEach category in the Status Display has options that you can change to suit thetype of calculations you are doing. When the CA!...CULATOR program is first inserted(or you press IftiiMliI¥1!i' ), the <strong>de</strong>fau It option for each category appears onthe screen. (A <strong>de</strong>fault option is the option selected by the CALCULATOR.) Figure 6<strong>de</strong>fines the categories and the following paragraphs explain the options for eachcategory.AlG RAD DEC BITS16 FIX8 CMPND ENTERComputat;o" Mod .. ~Angular Mo<strong>de</strong>s ______ ----lNumber Bases------------'Number Displays--------------....Financial Options -------------------------'Figure 6Status Display Category Definition18 Screen D isplay


COMPUTATION MODESYour CALCULATOR program can operate in anyone of three different computationmo<strong>de</strong>s.ALG - Algebraic Notation with Operator Prece<strong>de</strong>nceALGN - Algebraic Notation with No Operator Prece<strong>de</strong>nceRPN - Reverse Polish NotationAlgebraic Notation With Operator Prece<strong>de</strong>nce (ALG)This is the <strong>de</strong>fault option and so far, all of your entries have been ma<strong>de</strong> in thismo<strong>de</strong>. This notation uses operator prece<strong>de</strong>nce. Operator prece<strong>de</strong>nce simply meansthat the CALCULATOR, when in this mo<strong>de</strong>, performs certain operations before itdoes other operations. Figure 7 lists the operator prece<strong>de</strong>nce.Highest PriorityLeft and Right Parentheses. If parenthesesare "nested" (or placed withinanother set of parentheses), theCALCU LA TOR wi II perform the operationcontained with the innermostset first.LSHF, RSHF, MODA, ROOT*, I+ .ANDOR, XORLeft Shift, Right Shift, Modulo. Theseoperations will be discussed in thePROGRAMMING INSTRUCTIONSAND EXAMPLES section.Raise a number to a power (exponentiation):Take the root of a number.Multiplication, DivisionAddition, SubtractionLogical ANDLogical OR, Exclusive ORLowest PriorityFigure 7Operator Prece<strong>de</strong>nceScreen Display 19


Type21-9*2/3=StackDisplayX 21Y 21X 12Y 12X 24Y 24X 8CommentsThe X and Y registers both display the numberyou entered.The CALCULATOR subtracted 9 from the 21 inthe X register and stored the result in both theX and Y registersThe CALCULATOR multiplied the 2 times the12 in the X register and placed the resu Iting 24in both the X and Y registers.The CALCULATOR divi<strong>de</strong>d the 24 stored in theX register by 3 and placed the answer in the Xregister.In this mo<strong>de</strong>, you <strong>de</strong>termine which operation you want the CALCULATOR to performfirst by using the parentheses. Otherwise, the CALCULATOR wil! performeach operation as it is entered.Type21-(9*2/3=StackDisplayX 8X 8X 21Y 212 8X 9Y 92 213 8X 18Y 182 213 8X 15Y 8CommentsPUSH the answer from the last problem tosave it.The CALCULATOR places the 21 you enteredin both the X and Y registers and moves the 8 toregister 2.Because of the parentheses, the CALCULATORcannot su btract the 9 from the 21, so it storesthe 21 in register 2 and pushes the 8 to register3.The CALCULATOR performs the multiplicationbut still does not subtract the result fromthe 21 in register 2. It must wait for the secondpart of the division operation.The CALCULATOR performs the division, thensubtracts the resulting 6 from 21 that wasstored in register 2 and places the answer of 15in the X register. You still have the answer fromthe last problem in the Y register so you cancompare the difference the parentheses ma<strong>de</strong>in the answer.Screen Display 21


In ALGN, you have the option of placing parentheses wherever you need them.Both ALG and ALGN mo<strong>de</strong>s are infix notations. You type the number followed byan operator and use an equals symbol to indicate where the problem ends. Butthere are times when this type of notation is inconvenient-especially in scientificprogramming functions. At those times, there is a third computation mo<strong>de</strong>available to you on the CALCULATOR.Reverse Polish Notation (RPN)Reverse Polish Notation is a postfix notation which exclu<strong>de</strong>s the use of parenthesesand the equals symbol. Therefore, it does not use operator prece<strong>de</strong>nce and youmust enter the problems a little differently. For example, in a simple problem suchas 3 + 2 = , you cou Id not place the operation symbol between the 3 and the 2 an<strong>de</strong>nd with an equals symbol after the 2. IF you use an equals symbol, the CALCULA­TOR will respond with the message ERROR-NOT VALID COMMAND OR MES­SAGE .To work the simple problem in RPN,StackType Display CommentsIElIi'ID X 0 Clears the X and Y registers.YRPN 11#·'3i:,,';'Status Display now reflects RPN mo<strong>de</strong>.3 Jik·131:!'!il X 3 The 0 that was in the X register is automa-Y 0 tically pushed into the Y register.2 11~'BI;I'hl X 2 Entering the 2 pushes the 0 into the 2 regis-Y 3 ter and the 3 into the Y register.2 0+ X 5 The CALCULATOR adds the 2 to the 3 in theY 0 X register, then places the resulting sum of 5in the X register.Each time you enter a number, it is displayed in the X register and causes theprevious contents to be pushed into Y and the previous contents of Y to be pushedinto the 2 register, etc. RPN operators work only w ith the contents of the X and Yregisters. The result is always placed in the X register and the stack is alwayspopped. In the above problem, each entry was followed by a space, so that thenumber stack activity could be more clearly seen. It is not necessary to separatenumbers and operator entries with a space. In the succeeding problems, the appropriateoperator will be placed immediately following the number entry.However, in RPN a space must always separate the first two numbers.PROBLEM: 1 + 5 * 2 / 3 - 2 =22 Screen Display


TypeStackDisplayXYoCommentsClears the X and Y registers.XY1oThe X register displays your first entry andpushes the 0 that was in the X register to theY register.5+XY6oThe CALCU LA TOR adds the 5 to the 1 in theX register and stores the results in the Xregister.2*XY12oThe CALCULATOR multiplies the 2 timesthe 6 in the X register and places theresu Iting 12 in the X register.3/XY4oAgain, the CALCULATOR performs the divisionoperation using your entry of 3 and the12 in the X register. It then stores the 4 in theX register.2-XY2oThe CALCULATOR performs the last operationusing the 4 in the X register and the 2you entered. The final result of 2 is placed inthe X register ..Note that in algebraic (ALe) notation, you'd see this problem written as((1 +5)*2)3-2=. In ALe, parentheses <strong>de</strong>termine which operations are performedfirst. In RPN, you <strong>de</strong>termine the or<strong>de</strong>r by the sequence in which you enter thenumbers and operator symbols. In ALe, the equals sign performs the totaling taskand <strong>de</strong>termines when the problem is finished. The equals symbol is not nee<strong>de</strong>dbecause totaling is done continuously into the X register.If you do not want a number operated on immediately you must use a space insteadof the operation symbol. The number will be placed in the stack for futurecomputation. Using the same problem, solve for the multiplication operation first,then the division, then the subtraction, and finally the add ition.TypeStackDisplayCommentsIDl1I EBJJXY0Clears the X and Y registers.1 111·lal.!'!il XY5 '1~,!al;!'!il XY210510This problem starts out the same as the lastone.Since there have been no operation symbolsentered yet, the 1 that was in the X register ispushed down into the Y register and the 5 isplaced in the X reg ister.Screen Display 23


Type2*3/2-+Stack Displayxy2xy2xy2xy101o3.33333331o1.33333331o2.3333333oCommentsThe CALCULATOR multiplies the 5 in theX register by the 2 that you entered andstores the results in the X register. The 1 inthe Y register still does nothing.The CALCULATOR divi<strong>de</strong>s the 10 that wasin the X register by the 3 you entered andplaces the result in the X register. Noticethat the 1 in the Y register is still waiting foran operation symbol.By entering an operator symbol by itself(without a preceding number), you are tellingthe CALCU LA TOR to add what is in theY register to the number in the X register anddisplay the results in the X register.I n algebraic notation, this problem wou Id be written as 1 + ((5 * 2)3) - 2 = . Any" lone" operator symbol you enter will work with the contents of the X and Yregisters. If you want to solve another problem (or another part of a problem) andthen combine the two answers, don't clear the stack. For instance, you have a2.3333333 in the X register that we will assume is a partial answer to one part of aproblem. Now, to solve the second part; e.g., 2+16/3 (or in algebraic notation(2 + 16)/3),Type Stack Display Comments2 111·1!1:!·!il X 2 The 2.3333333 is automatically pushed toY 2.3333333 the Y register.2 016+ X 18 The 2 in the X register and the 16 are ad<strong>de</strong>dY 2.3333333 together and the resu It placed in the X regis-2 0 ter. The Y register still stores the 2.3333333.3/ X 6 The CALCULATOR performs the divisionY 2.3333333 and places the resu It in the X register. Now,2 0 to combine the X and Y registers to get afinal result, enter a " lone" operator.+ X 8.3333333 The result of adding the contents of the XY 0 and Y registers is placed in the X register.24 Screen Display


The automatic push feature of RPN can be very advantageous if you are doing aproblem in several sections or several related problems. However, it also fills yourstack more quickly. Since it takes slightly longer to display 10 numbers in the stackthan it does to display one, you might want to clear away any unwanted data occasionally.You already know how to clear the X register (CLX i.i#31:f4;') or clear theentire stack (El!II!I'!ZD or EImD I!I'!ZD). To clear all registers except the X register,you can type RPN 114M"!.!;" This leaves the content of the X register unchanged.ANGULAR MODESYour CALCULATOR program contains a variety of trigonometric functions, manyof which involve angle calculations. Angles are usually measured in <strong>de</strong>grees or radians.I n solving electrical engineering problems, it may be more convenient towork in radians than <strong>de</strong>grees. Notice that the <strong>de</strong>fault option for this mo<strong>de</strong> is RAD(radians). To change the Status Display from radians to <strong>de</strong>grees, type the commandDEG 11WWM"j'. The Status Display adjusts accordingly. Changing this option doesnot affect the X and Y registers immediately; however, it is a good i<strong>de</strong>a to checkto make sure you are in the correct mo<strong>de</strong> before solving problems or writingprograms <strong>de</strong>aling with angular measurement.NUMBER BASESSo far, all the problems and examples have been given in <strong>de</strong>cimal mo<strong>de</strong> (DEC).However, the CALCULATOR is capable of working in two other bases: octal (OCT)and hexa<strong>de</strong>cimal (HEX). Although all three number bases are stored insi<strong>de</strong> the computerin BCD (Binary Co<strong>de</strong>d Decimal) format, each number base is entered anddisplayed somewhat differently.Decimal Base and the Floating Point NotationThe most well-known number base is <strong>de</strong>cimal which uses the 10 numbers (0-9). TheCALCULATOR allows you to enter 9 digits if the exponent is odd or 10 digits if theexponent is even. Two digits are allowed for an exponent. If you try to enter moredigits the program treats the additional digits as zeroes-up to 15 numbers. If youtry to enter 15 digits, the program displays a message ERROR-TOO MANYCHARACTE RS. But there are times when you will need to work with very large orvery small numbers. Your CALCULATOR provi<strong>de</strong>s the means of entering thesenumbers using a system known as Floating Point Notation.Suppose you want to enter the number one billion two hundred thirty-four million.TypeStackDisplayXCommentso Clears the stack registers and sets the Xregister to O.Screen Display 25


TypeStack DisplayComments1234000000 EmXY1.234E + 09oThe X register displays the number infloating point notation. The 1.234 portionof the notation is the mantissa. The Estands for exponent and is the main indicatorof a number in floating pointnotation. The operation symbol alternateindicates whether you move the <strong>de</strong>cimalpoint to the right (+) or to the left (-).The 09 tells you to move the <strong>de</strong>cimalpoint 9 places..0000001234EmXY21.23 4E ~071.234E +09oThis is an example of how an extremelysmall number would appear in floatingpoint notation. Notice the operation symbolindicates that you move the <strong>de</strong>cimalpoint to the left.xoClears the stack and sets the X registerto O.Octal BaseIn this mo<strong>de</strong>, numbers are entered and displayed in base 8. In other words, you useonly the numbers 0 through 7. When the CALCULATOR is in OCT (octal) mo<strong>de</strong>, youcannot use <strong>de</strong>cimal points or exponents in the numbers you enter. If you attemptto do so, the message ERROR-NOT VALID COMMAND OR NUMBER will bedisplayed on the screen.Octal numbers can be up to 10 <strong>de</strong>cimal digits long. However, only eight digits canbe displayed in DEC mo<strong>de</strong> so 17777777777 in octal would actually be displayed as2.1474836E + 09 in <strong>de</strong>cimal. Addition, subtraction, multiplication, division, and bitmanipulation functions are accurate in the full range of octal numbers.To obtain negative numbers in octal, enter the absolute value of the number anduse the CHGSGN function. (See FUNDAMENTAL FUNCTIONS section.) Alternatively,the two's complement (see PROGRAMMING INSTRUCTIONS AND EX­AMPLES section) form of the number in either 32-bit format (BITS32) or with thenumber of bits specified by BITS may be entered (see DISPLAYING NUMBERS)To convert the number 14 from <strong>de</strong>cimal to octal,StackType Display CommentsBDlram X 0 Clears the stack display.14 111·111:!·!il X 14 Places a 14 in X register.y 0OCT 111·IBI:!;!il X 16 The <strong>de</strong>cimal number 14 is equal to 16 iny 0 octal.DEC 111·&I:!'!il X 14 Converts the number back to <strong>de</strong>cimal.y 026 Screen Display


Hexa<strong>de</strong>cimal BaseNumbers are entered and displayed in base 16. This means that you use the digits 0through 9 and the alphabetic characters A through F.Hexa<strong>de</strong>cimalDecimal0 01 12 23 34 45 56 67 78 89 9A 10B 11C 12D 13E 14F 1510 1611 17As in the octal mo<strong>de</strong>, hexa<strong>de</strong>cimal (HEX) numbers can be up to 8 <strong>de</strong>cimal digitslong. But, the same <strong>de</strong>cimal limitation exists for hexa<strong>de</strong>cimal as for octal so thehexa<strong>de</strong>cimal value 7FFFFFFF would be displayed in <strong>de</strong>cimal as 2.1474836E +09.Addition, subtraction, multiplication, division, and bit manipulation functions areaccurate in the full range of hexa<strong>de</strong>cimal numbers.In entering a hexa<strong>de</strong>cimal number beginning with A through F, you must prece<strong>de</strong> itby the digit 0 to distinguish it from a function name. Similarly, if a hexa<strong>de</strong>cimalnumber ends with A through F, you must follow it with a separator (l;liiiW' orlit'Ai:"';' )·To obtain negative numbers in hexa<strong>de</strong>cimal, enter the absolute value of thenumber and use the CHGSGN function. (See FUNDAMENTAL FUNCTIONS section.)Alternatively, you can enter the two's complement (see PROGRAMMING IN­STRUCTIONS AND EXAMPLES section) form of the number in either 32 bit format(BITS32) or with the number of bits specified by BITS.To convert the number 14 from <strong>de</strong>cimal to hexa<strong>de</strong>cimal,TypeStackDisplayX 14Y 0X EY 0CommentsYou already have the 14 in the X register.The <strong>de</strong>cimal number 14 is equal to E inhexa<strong>de</strong>cimal.DEC I'i!ztij':f.l;I X 14Y 0Converts the number back to <strong>de</strong>cimal.Screen Display 27


Be sure to check the Statu s Display before solving any problems or writing any programsto see whether or not you have entered the number base you want.DISPLAYING NUMBERSFix CommandFIX 11i-'9':1.!;'The FIX command <strong>de</strong>fines the number of digits you wish to have to the right of the<strong>de</strong>cimal point. This command applies only in the <strong>de</strong>cimal mo<strong>de</strong>, but not numbersin hexa<strong>de</strong>cimal or octal mo<strong>de</strong>s. After you enter the command, the message ENTER0-8 will be displayed as a remin<strong>de</strong>r. The number you enter is always assumed to bein the <strong>de</strong>cimal mo<strong>de</strong> and is roun<strong>de</strong>d off to the nearest integer. If it is outsi<strong>de</strong> of thespecified range, you will get another message, ERROR-NUMBER OUT OFRANGE and there will be no change to the FIX setting.If you enter FIX and then <strong>de</strong>ci<strong>de</strong> you don't really want to do a FIX after all, typeNOP for No Operation. You will get ERROR-NUMBER OUT OF RANGE since theCALCULATOR was expecting a number, but the FIX setting will not be changed.The same holds true for any command that requests that a number be entered afterthe command is entered. The numbers entered for these commands are special inthat they are always in <strong>de</strong>cimal, are always roun<strong>de</strong>d to the nearest integer and arenot placed in the X register.A value from 0 through 7 in the FIX command selects the number of digits that willbe displayed to the right of the <strong>de</strong>cimal point. Zeroes will be displayed at the endof a number as necessary to obtain the proper number of digits. The maximumnumber of digits that can be displayed, not including the exponent, is 8. This canreduce the number of places possible after the <strong>de</strong>cimal point. F!X affects thedisplay only; the internal form of the number remains unchanged. The numbers areroun<strong>de</strong>d to the number of digits to be displayed. Zero (0) through 4 rounds down; 5through 9 rounds up. FIX8 selects floating point <strong>de</strong>cimal mo<strong>de</strong>. This is the initialsetting of the CALCULATOR. Displayed numbers are always roun<strong>de</strong>d to 8 digits. InFIX8, however, zeroes are not ad<strong>de</strong>d after the <strong>de</strong>cimal point to make 8 digits.Numbers with a magnitu<strong>de</strong> less than .01 or greater than or equal to 1 E9 will bedisplayed in floating point notation.TypeX RegisterLeft Fieldof Scroll AreaFIX liP-Ai;,.,;.8 1141191:t.,;..12345678 "#MI'f.i;'FIX iiP.Wi:!,'i7 414·'9,:t.,;.FIX f14 IAi:"'1o J1i'A':"!;'1.9 Jii'Ai:!.';'X 0X 0 ENTER 0-8X 0X 0.12345678X 0.12345678 ENTER 0-8X1.2345678E-01X 1.2345678E-01 ENTER 0-8X 1 E-01X 2.28 Screen Display


TypeF I X li'431:1,';'1 'i"«hl~f.h'F I X lii'S':t,!;,4 '1t43j~M;11234.5678F I X 11k,S';',';'7 '14;$1;£,,;11.234E + 10 l~m',f;'1FIX J1i1i1i;td;j8 Jip·Ai:!·';'X Register DisplayLeft Fieldof Scroll AreaX 2. ENTER 0-8X 1.9X 1.9 ENTER 0-8X 1.9000X 1234.5678X 1234.5678 ENTER 0-8X 1234.5678X 1.2340000E + 1 0X 1.2340000E +10 ENTER 0-8X 1.234E+l0Bits CommandBITS 1#t;I,'lUIThis command is used only in hexa<strong>de</strong>cimal or octal mo<strong>de</strong>s. It selects the number ofbits for numbers in hex or octal mo<strong>de</strong>s. When BITS l'I(&I"""i' is entered, themessage ENTER 1-32 is displayed. This tells you to enter the number size you <strong>de</strong>sirefor HEX or OCT mo<strong>de</strong> displays and the bit manipulation instructions AND, OR,XOR, LSHF, and RSHF (see PROGRAMMING INSTRUCTIONS AND EXAMPLES).The number you enter must be between 1 and 32 inclusive. The range of numbersthat can be entered and displayed is:BITS Setting*81632Range (in <strong>de</strong>cimal)-128 to +127- 32768 to + 32767- 3147483648 to + 2147483647TypeX Register DisplayLeft Fieldof Scroll AreaHEX iJtMI,Z,MBITS16 111"31:14-1 11i·i3i:!·';'CHGSGNOFFFF maii"'h'OFFFFFFFF EIM""h'BITS f@S',Uii32 i.#il'Pj3!1X 0X 0X 0 ENTER 1-32X 0X 1XXXFFFFFFFFFFFFX FFFF ENTER 1-32XFFFFFFFF'There are of course other BITS settings. but these are the most commonly used.Screen Display 29


If a number to be displayed in hexa<strong>de</strong>cimal or octal is within the range allowed for<strong>de</strong>cimal numbers, but is not within the range specified by the BITS command, thenthe message ERROR- HEX/OCT OVRFLW will be displayed in the stack or memorylocation where the number was to be displayed.The number will remain unchanged internally so switching to <strong>de</strong>c imal mo<strong>de</strong> willallow it to be displayed If a program is executing without display and no bitmanipulation functions are used, then HEX/OCT OVRFLW will not occur.As mentioned before, negative numbers are displayed in two's complement form inhexa<strong>de</strong>c imal and octal mo<strong>de</strong>s. Two's complement is the complement of therepresentation of the absolute value of the number, plus one.The BITS command may be used to specify the word size or address space of thecomputer you are working with. On a byte-oriented machine, you may want to useBITS8. If the machine has a 16-bit address length, then you may use BITS16 to doaddress calcu latio ns. BITS16 is the initial (<strong>de</strong>fault) setting.FINANCIAL OPTIONSAlthough financi al options are part of the Status Display, these options are discussedin the FINANCIAL section of this manual.30 Screen Display


4CONVERSIONSThis section inclu<strong>de</strong>s the conversions that can be performed on the CALCULATORby entering a number followed by the "old" units as well as a table showing theconversions factors for all other measurements.For example, to convert 68 <strong>de</strong>grees Fahrenheit to <strong>de</strong>grees Celsius:FAHRENHEIT -TypeCELSIUSStackDisplayScrollMessagex 20TO CThe left field of the scroll area " reminds" you that you are converting to C (Celsius).To convert 100 <strong>de</strong>grees Celsius to <strong>de</strong>grees Fahrenheit:Type100C E!I!IiIStackDisplayx 212ScrollMessageTO FAgain, the left field of the scroll area " reminds" you that you are converting to<strong>de</strong>grees F (Fahrenheit)MASS, LENGTH, AND VOLUME CONVERSIONSIn mass, length, and volume conversions, an intermediate conversion is performedinternally from the old units (the one you enter) to kilograms, meters, or fluidounces. Then the message ENTER DESIRED UNITS is displayed. Suppose you wantto find out how many kilograms it takes to make 3 '.!.i pounds.Type3.25 LB I11!DKG GmStackDisplayxX3.251.4741752ScrollMessageENTER NEW UNITSConversions 31


The conversion groupings are as follows:FunctionMASSKGGMOZLBLENGTHMCMKMINFTYDMIDescriptionKil ogram sGramsOunces (Av)Pounds (Av)MetersCentimetersKilometersIn chesFeetYardsMiles (statute)Conversion Constants1 KG = 1 KG1 GM = .001 KG1 OZ = .0283495231 KG (approx.)1 LB = .45359237 KG (approx.)1 M = 1 M1 CM = .01 M1 KM = 1000 M1 IN = .0254 M1 FT = .3048 M1 YD = .9144 M1 MI = 1609.344 MYou will notice that ounces (OZ) and pounds (LB) are listed un<strong>de</strong>r the MASS grouping.(This is correct as they are units of mass and are in<strong>de</strong>pen<strong>de</strong>nt of the force ofgravity. In engineering, a pound is generally used for force or weight. The poundforceis the force that gives a standard pound-mass an acceleration equal to thestandard acceleration of gravity (32.1740 ft/sec/sec).)VOLUMEFLOZTSPTBSPCUPQTGALLFluid ouncesTeaspoonsTablespoonsCupsQuartsGallons (U.S.)Liters1 FL = FL1 TSP = .1666666667 FL (213)1 TBSP = .5 FL1 CUP = 8 FL1 QT = 32 FL1 GAL = 128 FL1 L = 33.81492266 FL (approx.)If you do not choose a " new units" entry from the same grouping, you will get amessage ERROR-UNIT MISMATCH and the result will be in the intermediateunits. To convert the number in new units to different units, you must repeat thesame process of entering old, then new units. All conversion constants given aboveare accurate to at least 9 digits. I n most cases, the exact value can be expressed infewer than 9 digits.DEGREES -RADIANS CONVERSIONSCD J1,·Ai:!.';' or CDEG lii'Si:'.!;'CR J1i·'3 ' :'·!;' or CRAD i14-'91:'.';.CDEG assumes that the X register contains an angle in <strong>de</strong>grees and returns an anglein radians. CRAD takes an angle in radians and converts it to <strong>de</strong>grees. To remindyou which is which, CDEG displays the message TO RAD and CRAD displays themessage TO DEG . CDEG and CRAD are not affected by RAD and DEG.32 Conversions


To convert from <strong>de</strong>grees to gradians (400 CRAD = 360 DEC) divi<strong>de</strong> by .9. To convertgradians (CRAD) to DEC, multiply by .9. The following problems illustratethese two conversions:TypeX Display270 CDEG 1#'3'@j' 4.712389What is the angle in gradians whose sine is .3?DEG liliY':!·';,.3ASIN '#fi!1':f.';'.9/=17.45760319.397337What is 325 gradians in radians?*.9 == 325 lii"9':I'1;'CDEG 1.1"'3,:t.,;,3255.1050881(grad to <strong>de</strong>g)(<strong>de</strong>g to rad)Appendix D gives a summary of all the weights and measurements and the factorsby which you must multiply them to convert to the <strong>de</strong>sired measurement orweight.POLAR -RECTANGULAR CONVERSIONSPolar takes an angle e (theta) in the Y register using the current angular mo<strong>de</strong> anda radius R in the X register and converts them from polar to rectangular coordinates.The y-coordinate is put in the Y register and the x-coordinate is put in the Xregister. The angle is entered first, then the rad ius. In ALC and ALC N mo<strong>de</strong>s, aPUSH (Emil [) must be performed after entering the angle to get it into the Yregister. In RPN, a push is performed automatically after each number is entered.The message TO REeT Y=ANCLE, X= R TO Y, X will be displayed to remind youwhich value goes in which register. It means that an angle in Y and a radius in Xhave been converted to x and y rectangular coordinates in the X and Y registers. Besure to set the angular mo<strong>de</strong> correctly by entering DEC or RAD.The procedure used for each calculation mo<strong>de</strong> is as follows:ALG and ALGNDEC or RADEnter ePUSH or Emil [Enter radiusPOLAR or PORPNDEC or RADEnter eEnter radiusPOLAR or POX registerY registerx-coordinatey-coord i nateConversions 33


This function uses the formula:y R*SIN (8)x - R*COS (8)Since SIN and COS are accurate to 7 digits (over most of their range), polar is alsoaccurate to 7 digits in most cases.If overflow occurs then ERROR-ARITHMETIC OVERFLOW will be displayed andthe coordinate whose value overflowed will be set to O.To illustrate th!s fu nction, convert R = 8, 8 = 60 <strong>de</strong>grees to rectangu lar coordinates.TypeStack DisplayBlmDA LG 111'!II:!'hlDEG lil+19I;I4,'60 lik·Aj;Mi X 60EmI [ X 60Y 608 ilk'Ai:"];' X 8Y 60PO:"AR IWai'mii X 4.0000001Y 6.9282033R P N li~'BI:E'~1DEG EUtAI:',';'60 i14"3':t.';' X 60Y 4.00000018 "443':!·';' X 8Y 60POLAR _rl.,(.ji' X 4.0000001Y 6.9282033To convert rectangular coordinates to polar coordinates, use the followingfunction:Rectangular takes a y-coordinate in the Y register and an x-coordinate in the Xregister and converts them to an angle 8 in the Y register using the current angularmo<strong>de</strong> and a radius R in the X register. Angle 8 ranges - Pi radians or -180 <strong>de</strong>greesto +Pi radians or +180 <strong>de</strong>grees. The x value is entered first. In ALG and ALGNmo<strong>de</strong>s a PUSH must be performed after entering the y value (see POLAR). Themessage TO POLAR Y, X TO Y=ANGLE, X=R will be displayed to remind you ~which value goes in which register. It means that values in the X and Y registers ,have been converted to an angle in the Y register and a radius in the X register.34 Conversions


The procedure for each calculation mo<strong>de</strong> is as follows:AlG & AlGNDEC or RAD "#"3I@i'Enter yPUSH or Emil [Enter xRECTxy = 0RRPNDEC or RADEnter yEnter xRECTThis function uses:oATAN (y/x)R 1 x/COS (0)1Since AT AN and COS are accurate to 7 digits (over most of their range), RECT isalso accurate to 7 digits in most cases. Errors may accumulate if RECT and POLARare applied repeatedly.To illustrate this function, convert xangle in radians.20, y 45 to polar coordinates with theType Stack Display Commentsx 0X 45X 45Y 45Y 20Y 45X 49.244289y 66.037511Radius is displayed in X register.Angle 0 is displayed in Y register.TypeStack DisplayXoXYXYX45o204549.244289Y 66.037511Conversions 35


5FUNDAMENTALFUNCTIONSThese functions plus the single-variable functions found in the next section are performedimmediately upon entry. Each (with the exception of Pi) operates on thevalue in the X register and the result is immediately placed into the X register.ABSOLUTE VALUE FUNCTIONA 114,'3, :,.1;. or ABS 11t·'3':f.!;'This function makes a number positive.Examples:TypeIB1I E!!D4 CHGSGN li@ijj,tl1!lA B S 11g,Siji:I"1OABS l.j'b'1E-10A I.N@"U;'X Displayo-44o1 E-10CHANGE SIGN FUNCTIONCH ehi':"!;' or CHGSGN I.ii@':f!i' or EmID -This function changes the sign of a number in the X register from positive tonegative or from negative to positive. However, 0 is left unchanged if it is thenumber in the X register.TypeX Display-6FRACTION FUNCTIONThis function keeps the fractional part of a number. All digits before the actual<strong>de</strong>cimal point location are removed. This function is equivalent to x-TRUNC(x).Fundamental Functions 37


TypeX Display4.50.5INTEGER FUNCTIONIN T Ci'el:!.';'This command takes the greatest integer less than or equal to that number.Type4.4 INT lii·'31=Mil4.5 INT IW.fil,¥15.6CHGSGN JiMU':f41INT 11"'31:14;'2 IN T i#SiI:tl11J1X Displayo44-5.6-62PI FUNCTIONPI 11,·!,j;M;'The value of Pi, computed to an accuracy of 8 digits, is displayed in the X register.Actually, Pi is internally computed to an accuracy of 9 digits. If you are in RPNmo<strong>de</strong>, the previous value in the X register is pushed on the stack just as if you ha<strong>de</strong>ntered a number.TypeStack DisplayI'm!iJ X 0ALG 11ilMi;t+i;i X 0PI EWi;',';' X 3.1415927RPN Lip:.!a';'·';' X 3.14159274 114·$1*,);' X 4Y 3.1415927PI 11ilMI:"'1 X 3.1415927Y 4l 3.1415927RECIPROCAL FUNCTIONRE lij#ilj,fl11 or RECIP .. 1*,,3',0;1This function replaces a number with 1 divi<strong>de</strong>d by the same number. Thereciprocal of 2 would be V2. If the number is 0, then the message ERROR-ARITH­METIC OVERFLOW is d ispl ayed on the screen and the result will appear as o.38 Fundamental Fun ctions


Type2RE lill'3':'·';'R E 114-SI.',!;'X Displayo0.52ROUND A NUMBER FUNCTIONROU 114"31:t'1;' or ROUND J1k·iji:Mi'This command rounds a number to the nearest integer. For a positive number, if thefractional part is .5 or larger, then the number is roun<strong>de</strong>d up and if the fractionalpart is less than .5, then the number is roun<strong>de</strong>d down.Type4.4ROU 11#"3':!,';'4.SROU 411,'91:(4;15.6 1&.1 -R 0 U 114"3':1,';12ROU J1tsl:!;'Stack DisplayxXXXXXo45-5.6-62SQUARE FU NCTIONThis function computes the square of a number by multiplying the number byitself. If the absolute value of the number is equal to or greater than 10 to the 49thpower, then the message ERROR-ARITHMETIC OVERFLOW will be displayedand the result will be O.Type Stack Display Comments4.7063787 maJSQ U J~4'A';f,!il5SQU '4,.'91:1";'XXX4.7063787 Note you can square a fractionalnumber easily.22.1525SQUARE ROOT FU NCTIONThis function takes the square root of a number. If the number is negative, themessage ERROR-NUMBER OUT OF RANCE is displayed and the square root ofthe absolute value of the number is computed.Fundamental Functions 39


Type25SQ 11k-WI ••22.15SQ 11iltW1:"'i'Stack DisplayxX54.7063787TRUNCATE FUNCTIONTRU I#",I ;thl or TRU NC ; ..This command removes the fractional part from a number; that is, it keeps the integerpart. All digits after the actual <strong>de</strong>cimal point location are removed. Note thatwhen floating point notation is used in the display, the <strong>de</strong>cimal point is alwaysshown to the right of the first digit. The fractional part is to the right of where the<strong>de</strong>cimal point would be displayed if this notation were not used.TypeI'i13 E!!'i!iI4.5TR U I'"lm#~·!mlllmil;!t.!!hli5.6 Emil -TRU NC 112-13I:U;12TRU 11k,Wi;!.,;,.001234567 114M""'"T R U 11k,S':!,';'Stack DisplayX 0X 4X -5.6X -5X 2X 1.234567E -03X 040 Fundamental Functionse 'm ~~CM~· ::~ __________________________ ~_


ALGEBRAIC ANDTRIGONOMETRIC FUNCTIONS6This section <strong>de</strong>scribes the algebraic and trigonometric functions inclu<strong>de</strong>d in theCALCULATOR diskette program.ALGEBRAICFUNCTIONSEXPONENTIATION BASE e FUNCTIONThis command computes the natural antilogarithm of a number where e is approximately2.7182818. If the absolute value of a number is greater than 255 (approximately),then ERROR-ARITHMETIC OVERFLOW will be displayed and the resultwill be O.EXPONENTIATION BASE 10 FUNCTIONThis commiind computes the common antilogarithm of a number. If the absolutevalue of the number is greater than or equal to 98, then ERROR-ARITHMETICOVERFLOW will be displayed and the result will be O.FACTORIAL FUNCTIONFA '12',,'4';' 0 r FACT ,-,*,,81'&1:1 0 r BIl'D !This command computes the factorial of a number using the formulax! = 1 *2*3* ... *(x-1)*x, which is the product of all integers from 1 to x (thenumber). If the number is negative, then ERROR-NUMBER OUT OF RANCE willbe displayed and the factorial of the absolute value of the number will be computed.If the number is O!, the factorial will be 1 . If the number is not an integer, itwill be roun<strong>de</strong>d to the nearest integer (see ROUND) before the factorial is computed.If the number is greater than 68, then ERROR-ARITHMETIC OVERFLOWwill be displayed and the result will be O.Allo:ebraic and Trigonometric Functions 41


LOGARITHM BASE 10 FUNCTIONLOG 11"'91:@;1 or lOGTEN 11i'Ai:!.';'This command computes the common logarithm (base 10) of a number. Error conditionsare the same as for LN (see below). Note that ATARI BASIC uses LOC andCLOC instead of LN and LOCTE N. LN and LOC are used here to be consistent withcommon mathematical notation.TypeX DisplayBIDImD X 010LOG Ii!Z!'D X 1ma l X 1Y 1NATURAL LOGARITHM FUNCTIONThis command computes the natural logarithm (base e) of a number. If the numberis less than 0, then ERROR-NUMBER OUT OF RANCE will be displayed and theresult will be the natural log of the absolute value of the number. If the number isequal to 0, then ERROR-ARITHMETIC OVERFLOW will be displayed and theresult will be o.TypeStack DisplayX 1010 Y 1LN Ii!Z!'D X 2.3025851Y 1POWER AND ROOT FUNCTIONSPOW iiitMI,t"iI or POWER '@B':tM or ma 1\RO '1"'i,:t.,;, or ROOT ","ai:!·!;1The POWER function computes a number (y) to the xth power using the formula:y I\x = EXPTE N(x* LOCTE N(y)).The ROOT function computes the xth root of y using the formula:y ROOT x = yA(1 /x).42 Algebraic and Trigonometric Functions


For both the POWER and ROOT functions, if y is negative, then ERROR-NUM­BER OUT OF RANCE will be displayed and the absolute value of y will be used tocompute the result. If x and yare both exact positive integers (not just roun<strong>de</strong>d tointegers in the display), then the result of the POWER function will always be an exactinteger. If y is an integer and x is a negative integer, then the result will be thereciprocal of an exact integer. Figure 8 shows what the result and error message (ifany) will be for various values and -y indicates numbers less than O.y x y/\x y/\x Error yROOTx yROOTx Error0 0 1 1 10 x 0 00 -x 0 1 0 1y 0 1 1 1-y 0 1 2 1 1+y +x y/\x y A(1 /x)+y -x 1/(y /\x) 1 (y/\(1 /x))-y +x y/\x 2 y A(1 /x) 2-y -x y/\ -x 2 1/( y(1 /x)) 2Note: The dashes indicate no error unless magnitu<strong>de</strong> of result is too large.Error 1 indicates ARITHMETIC OVERFLOW.Error 2 indicates NUMBER OUT OF RANCE.Figure 8Root and Power TableAs an example, raise 35 to the cube root of 5.3. I n math books this would be writtenas 350/53Type35 BmD /\(5.3 ROOT 3) 1.7435134X Displayoo35.00492.15656Since the ROOT and POWE R functions are of equal prece<strong>de</strong>nce, the computerwould perform the POWE R function first if no parentheses were inclu<strong>de</strong>d. Thisanswer is correct to 7 digits rounding up, since the eighth d igit is 6.As a second example, using the power and root functions and the exponentiationfunctions, compute 10A(LN(5) + e (-4.3)* LOC(97)).Algebraic and Trigonometric Functions 43


TypeStack DisplayI'iiD E1!D X 0ALG lii·itti:!·';' X 010 EmID 1\ X 10Y 10(5lN 11I'lal=!'!il X 1.6094379Y 10+ X 1.6094379Y 1.60943792 104.3 EmID - X -4.3Y 1.60943792 10EXPE E~'lal:I'!1 X 0.013568559Y 1.60943792 10* X 0.01 3568559Y 0.0135685592 1.60943793 1097 '1~·ml:!·hl X 97Y 0.0135685592 1.60943793 10lOG) X 1.6363955Y 10X 43.290791In RPN , you would enter the problem as follows:TypeStack DisplayC LR i1i·Ai:'·!;' X 0RPN 11#·'il:'.';, X 04.3 EmID - X -4.3Y 0EXPE lii·II':!·!il X 0.013568559Y 044 Algebraic and Trigonometric Functions


TypeStack Display97 114"91:"';' X 97Y 0.0135685592 0LOG lik·Si:',';' X 1.9867717Y 0.0135685592 0* X 0.02695763Y 05lN "'·'SI:I.';' X 1.6094379Y 0.026957632 0+ X 1.6363955Y 0EX PTE N 'id3.:f.!;' X 43.290791MODULO FUNCTIONThis function performs the MOD function using the formula:yMODx = y -(x * I NT(y/x))This function is most often used with positive integers, but x and y may have anyvalue (within range). The value returned by the function may be thought of as theremain<strong>de</strong>r of y divi<strong>de</strong>d by x. If y is greater than or equal to 1 E10, then ERROR­NUMBER OUT OF RANGE will be displayed and the result will be the originalvalue of y.An example of this function would be:Type X Display CommentsEmtIEIm 0A lG lii·WI:!·!;' 014MOD3= 25 Emil - -5MOD2= 11E10MOD500= 1E +10 ERROR-NUMBER OUT OF RANGERPN 111·111:!·hl 1 E +107.6 li4'$'="';' 7.63 Emil % 1.6Algebraic and Trigonometric Functions 45


~---------------------------- -------- -----TRIGONOMETRICFUNCTIONSSINE, COSINE, AND TANGENT FUNCTIONSCOS 114431:t.';1The sine, cosine, and tangent functions all assume that the value in the X register isan angle in radians if RAD mo<strong>de</strong> is selected and in <strong>de</strong>grees if DEC mo<strong>de</strong> is selected.If the angle is greater than or equal to 1 E + 10 (10,000,000,000), then ERROR-NUM­BER OUT OF RANCE will be displayed and the result will not be accurate. Thetangent of +90 <strong>de</strong>grees, -90 <strong>de</strong>grees, PI /2 radians, and -PI/2 radians is un<strong>de</strong>finedso ERROR-ARITHMETIC OVERFLOW will be displayed and the result will bemeaningless (not necessarily 0). Like most of the other functions in this calculator,sine, cosine, and tangent are generally accurate to 7 digits. Near extreme points,such as near 90 <strong>de</strong>grees where the tangent is un<strong>de</strong>fined, or very close to 0, there is aloss of accuracy. For example, the tangent of 89.99 <strong>de</strong>grees is only accurate to 4digits.ARC SINE, ARC COSINE, AND ARC TANGENT FUNCTIONSThese three functions are the inverse functions corresponding to sine, cosine, andtangent, respectively. They return an angle in <strong>de</strong>grees or radians, <strong>de</strong>pending on thecurrent mo<strong>de</strong>. For ACOS and ASI N, if the absolute value of the number is greaterthan 1, then ERROR-NUMBER OUT OF RANCE will be displayed and the resultwill be meaningless (not necessarily 0).FunctionSIN, COSRange of Result-1 less than or equal to x less than or equal to 1ASIN, ATANACOSDegrees-90 < = x < = 90o < = x < =180Radians-PI/2 < =x


TypeSIN 11#"3':!-!;'AS IN J1"!3':!";'RAD lii·SI:'·';'PI/6 EmID -= 11"'3 ' :'-\;'COS 112"31:!·';'ACOS fi#+Jj:r1!!1X Display0.707106784545-6-0.523598780.86602541.52359878The other trigonometric functions can be computed using the following functions:Function Abbreviation EnterCotangent COT TAN RECIPCosecant CSC SIN RECIPSecant SEC COS RECIPArc Cotangent ARCCOT RECIP ATANArc Cosecant ARCCSC RECIP ASINArc Secant ARCSEC RECIP ACOSCOMPUTINGHYPERBOLICFUNCTIONSThis CALCULATOR does not have hyperbolic functions built in; however, they maybe calculated using the other functions. If you use them a lot, you could writesubroutines to do them for you.Function Description DerivationSINH(x) Hyperbolic SINe (EXPE(x)- EXPE( -xll/2COSH(x) Hyperbolic COSine (EXPE(x)+ EXPE( -x))/2TANH(x) Hyperbol ic TANgent SINH(x)/COSH(x) or- EXPE( - x)/(EXPE(x) + EXPE( - x)) * 2 + 1SECH(x) Hyperbolic SECant 1/COSH(x) or2/(EXPE(x) + EXPE( -x))CSCH(x) Hyperbolic CoSeCant 1/SINH(x) or 2/(EXPE(x)- EXPE( -x))COTH(x) Hyperbol ic COTangent 1/T ANH(x) orEXPE( -x)/(EXPE(x)- EXPE( -x))* 2 +1ASINH(x) Arc Hyp Sine LN(x + SQRT(x * x + 1))ACOSH(x) Arc Hyp COSine LN(x + SQRT(x* x -1))ATANH(x) Arc Hyp TANgent LN((1 + x)/(1 -x)l/2ASECH(x) Arc Hyp SECant LN((SQRT( -x* x + 1)+ 1)/x)ASCH(x) Arc Hyp CoSeCant x> =OLN(SQRT(x* x+1)+1l/xx


The following two form at s illustrate a simpler method of calculating SINH(x) inboth ALG and RPN .TypeALG((EXPE(x) - RECI P(x))/2RPN EXP(x) PUSH RECIP(x) - 2/This method uses the fact that RECIP(x) = 1/EXPE(x). The value of EXPE(x) isnee<strong>de</strong>d twice, so in ALG mo<strong>de</strong> the - is entered before taking the reciprocal, to getEXPE(x) into both the X and Y registers. Parentheses are used here so that SINH maybe found in the middle of a computation. Otherwise, = could be used instead.48 Algebraic and Trigonometric Functions


ISTATISTICS FUNCTIONS7ST ATISTICALFUNCTIONSINCLUDINGLINEARREGRESSIONBefore doing statistical operations you must enter the command CLSTAT11#SI:0;' to clear memory registers 3-9 and display headings next to the memorynumbers. These memory locations must not be used for other purposes while youare doing statistical calculations. These functions operate on two sets of variables,x and y. The numbers are entered by putting a y value in the Y register and an xvalue in the X register and issuing the command SPLUS which adds to the sums invarious registers as shown below. Mistakes can be corrected by using SMI NUS toremove unwanted number pairs. Once a set of numbers has been entered, a varietyof statistical functions may be performed, including I inear regression.The Greek symbol L (Sigma) is used to indicate summation. L (x) is used here to indicatethe sum of the x values. L (x * y) indicates that each x and y pair is multipliedtogether and the resulting products are summed together.CLEA'R MEMORY REGISTERS 3-9 FOR STATISTICS CALCULATIONS MODECLS 11#al:0;' or CLST A T lidal:"';'The contents of memory locations 3, 4, 5, 6, 7, 8, and 9 are set to 0 and the followingheadings are displayed in the memory area of the screen.Memory and Heading3NWT4N5X6X * X7Y8Y*Y9X*YDescriptionN Weight. 0 means N weighting. -1 means N-1weightingN = numbers of x and y entries(x)(x*x)(y)(y*y)(x * y)Statistics Functions 49


DESCRIPTIONOF FUNCTIONSSIGMA PLUS FUNCTIONSP I\idSI,f.]:' or SPLUS lidSI:'.!;.This function takes the values in the X and Y registers and sums into memory locations5-9 as specified on the preceding page. It increments memory location 4 (N) by 1to indicate that one more pair of coordinates has been entered. The first step in usingSPLUS is to enter the number to be placed in the Y register. In ALG and ALGN thisvalue must be pushed from the X register to the Y register. In RPN, the PUSH is doneautomatically when the second value is entered. Next, enter the value for the Xregister Finally, enter SPLUS or the abbreviation SP and press IlImIm or illM""""You will see that the statistics memory locations have been changed. rhe X registervalue is removed from the stack and the original Y register value is now in the Xregister. If you wish to use the same y value for the next point, you do not need to reenterit. Simply do a PUSH (in ALG and ALGN) and enter the new value for the X register.Continue entering x and y values and using SPLUS until all of the points have been entered.Then you can use the functions <strong>de</strong>scribed below to analyze your data. If youhave only one variable, x, instead of both x and y variables, the best thing to do is to enterx, PUSH, and enter SPLUS. This uses the same value for x and y, so the value left inthe X register is the original x, making it easy to enter the same number several times.The alternative is to enter x and SPLUS. The problem with this is that you will getERROR - ST ACK EMPTY because the CALCULATOR expects two values on the stack.Also, the X register value will be x*x instead of x.SIGMA MINUS FUNCTIONThis function is commonly used to correct mistakes when entering points using SPLUS.Simply reenter the incorrect values the same way you did for SPLUS. Then enterSMINUS or SM and press or 41i1ij';ijil. The number of entries, N, will be<strong>de</strong>cremented by 1 and the sums will be changed. If you discover the mistake immediatelyafter entering SPLUS, then the y value will still be in the X register, and allyou have to do is PUSH (in ALG and ALGN), enter the incorrect x, and SMINUS.N WEIGHTING FUNCTIONThis function selects the weighting to be used for standard <strong>de</strong>viation and variance.N weighting and N -1 weighting are the ones that are commonly used. However,if you should have some reason to use a different weighting, you may do so. Thevalue in the x register is stored in memory location 3 (NWT). This value is ad<strong>de</strong>d toN to <strong>de</strong>termine the weighting to be used. Since CLSTAT initializes NWT to 0, Nweighting will be used until you issue an NWT command. A value of -1 for NWTwill select N -1 weighting.50 Statistics Functions


MEAN OF X FUNCTIONThis command computes the mean of the previously entered x values using the formula:MEAN(x) = L (x) I Nand puts the result in the X register.MEAN OF Y FUNCTIONThis command computes the mean of the previously entered y values using the formula:MEAN(y) = L (y) I Nand puts the result in the X register.VARIANCE OF X FU NCTIONThis function computes the variance of the previously entered x values using theformula:VAR(x) = (L(X * X) -SQUARE (L(X) ) I N) I (N + NWT)VARIANCE OF Y FUNCTIONThis command computes the variance of the previously entered y values using theformula:VAR(y) = (L (y *y) - SQUARE (L (y)) I N) I (N + NWT)and the result is placed in the X register.STANDARD DEVIATION OF X FUNCTIONThis command computes the standard <strong>de</strong>viation of x using the formula:SD(x) = SQRT (VAR(x) )and the result is displayed in the X register.Statistics Functions 51


STANDARD DEVIATION OF Y FUNCTIONThis command computes the standard <strong>de</strong>viation of y using the formula:SD(y) = SQRT (VAR(y) )and the result is displayed in the X register.SLOPE FU NCTIONSL i1i·Ai:'.';' or SLOPE Eg·$i:'.';'This function computes the slope of the line which has the closest fit to the x- andv-coordinates. The least squares method, which minimizes the sum of the squaresof the distance of each point from the line, is used.SLOPE = m = (L(X*Y) - L(X)*L(Y) / N) / (L(X*X) - SQU (L(X)) / N)The resu It is displayed in the X register and the scroll area.Y-INTERCEPT FUNCTIONThis function computes the v-intercept of the least squares fit line through thepreviously entered points. This is the value of y when x is O.YI NT = b = (L(y) - m *L(x))/NThe result is displayed in both the X register and the scroll area.CORRElATION COEFFICIENT FUNCTIONThe function computes the correlation coefficient, R, of the variables x and y. Thisis a measure of the linear <strong>de</strong>pen<strong>de</strong>nce of x on y. The maximum magnitu<strong>de</strong> of R is 1,which indicates complete linear <strong>de</strong>pen<strong>de</strong>nce. A value of 0 for R indicates that thereis no linear <strong>de</strong>pen<strong>de</strong>nce of the two variables. However, they may be <strong>de</strong>pen<strong>de</strong>nt in anonlinear fashion.R = m * SD(x) / SD(y)RETURN Y GIVEN X AND RETURN X GIVEN Y FUNCTIONSx 11i·Si:'."X takes the value in the X register as the x-coordinate of a point on the least squaresfit line through the previously entered points (see SLOPE and YINT). It computesthe corresponding v-coordinate using the formula:y=m*x+bX displays the message TO Y and Y displays the TO X to remind you which is which.52 Statistics Functions


The following example is a linear regression " word problem" illustrating the abovefunctions:Twenty stu<strong>de</strong>nts are given a homework assignment and are gra<strong>de</strong>d on a scale of 0to 10. These gra<strong>de</strong>s are to be converted to letter gra<strong>de</strong>s using the <strong>de</strong>finition that a B 'is from the mean to one standard <strong>de</strong>viation (SO) above the mean, an A is from oneSO above to two SO's above and an A + is anything above that. On the other end, aC is from the mean to one SO below the mean, a 0 is one SO below to two SO'sbelow the mean; and an F is anything below that. Using the test scores shownbelow, find the mean and standard <strong>de</strong>viation and the distribution of letter gra<strong>de</strong>s.Number of Correct Answerso12345678910Number of Stu<strong>de</strong>ntsoo113543111TypeEDrm!IALG 111·BI:!·!_CLST A T 11#3''''';'1 EmD [SP 11"'3':"'31EmD [SMINUS 11#H':U,2 EmD [SP li4·A':!·';'3 EmD [SP 11'-Wi:,,!;'4 EmD [SP lii"9':!,!;'EmD [SP 11i·Ai:I.';,EmD [SP J1,.f:ii:t·'i'5 EmD [X DisplayX 0X 0X 0X 1Y 1X 1X 1Y 1X 1X 2Y 2X 2X 3Y 3X 3X 4Y 4X 4X 4Y 4X 4X 4Y 4X 4X 5Y 5CommentsMistake in entryCorrect mistakeStatistics Functions 53


Type X Display CommentsSP lik·'9':'·!;' X 5BlID [ X 5Y 5SP 114,'91:1,';' X 5BlID [ X 5Y 5SP Jik·Ai:t.!;. X 5BlID [ X 5Y 5SP 41#"31:"'i' X 5BlID [ X 5Y 5SP E2Ii3':"!;' X 56 BlID [ X 6Y 6S P 414.131:',';' X 6BlID [ X 6Y 6SP 11#·'3':'·'i' X 6BlID [ X 6Y 6SP li¥A':"'j' X 6BlID [ X 6Y 6SP i14,A,;t.,;, X 67 BlID [ X 7Y 7SP J1','9':"';' X 7BlID [ X 7Y 7SP 11i,'al:',';' X 7BlID [ X 7Y 7SP ii-Ai.il ,;, X 78 BlID [ X 8y.8S P 41','9':'1';' X 89 BlID [ X 9Y 9SP 114"9':"'1 X 910 BlID [ X 10Y 10SP '1"'31:"';'X 10 Finished entering numbers54 Statistics Functions


StackType Display CommentsXMEAN + X 5.7Y 5.7XSD lil·III:!·!il X 1.9Y 5.7+ X 7.6Y 7.6XSD X 9.5XMEAN X 5.7Y 5.7XSD - X 3.8Y 3.8XSD = X 1.9To use RPN instead of ALe you can enter the number segment in the same way youdid above. But first, you need to change the Status Display to RPN.TypeR P N J1i·Ai:',!;'XMEAN111IBI:I'!ilEmIiI [EmIiI [XSD J1¥Ai:t.';'+EmIiI [XSD+XSD-EmIiI [XSD-Stack DisplayX 5.6666667X 5.6666667Y 5.6666667X 5.6666667Y 5.66666672 5.6666667X 1.8601929Y 5.66666672 5.6666667X 7.5268595Y 5.6666667X 7.5268595Y 7.52685952 5.6666667X 9.3870524Y 5.6666667X 3.8064738X 3.8064738Y 3.8064738X 1.946281CommentsType ClSTAT. Enter numbers again.The number stack will have thenumbers 10 through 1 in registers Xthrough 9.Save XMEAN for later use.Note: The PUSH (mil [) before each XSD is necessary because XSD is a function, nota number, so an automatic PUSH is not performed.Statistics Functions 55


Gra<strong>de</strong>ScoreA+ 10A 8-9B 6-7C 4-5D 2-3F 0-1The following examples allow you to apply all of the built-in statistics functions tothe set of 8 points using both Nand N -1 weighting for standard <strong>de</strong>viation andvariance. Remember to enter first the Y value, then the X value.xy- 3.5 -5-2 -4.3.1 -23 35.6 4.410.3 9.112.5 11.220.0 17.9Type Stack Display CommentsIiID ED'!i1ALG 11I'BI:I'lilClSTAT 114M',Hi'5 EmID X -5EmID [ X -5Y -53.5 EmID X -3.5Y -5SP EmID X -54.3 EmID X -4.3BID [ X -4.3Y -4.32 EmID - X -2Y -4.3SP J1I.'" :,,;, X -4.32 EmID X -2EmID [ X -2Y -2.1 J1i,'3i :!"i' X 0.1Y -2S P JikJijji;t.i;' X -23 Em1D [ X 3Y 356 Statistics Functions


Type Stack Display CommentsSP 11i,'9W:!";' X 34.4 EmID [ X 4.4Y 4.45.6 iiQ}Ai:t.j;i X 5.6Y 4.4SP iii'A':I,';' X 4.49.1 EmID [ X 9.1Y 9.110.3 SP 111·!!I:!'!il X 9.111.2 EmID [ X 11 .2Y 11 .212.5 111'IBI:!'!il X 12.5Y 11.2SP E#3',m51 X 11.217.9 EmID [ X 17.9Y 17.920 lii-W'.!.';' X 20Y 17.9SP J1k,'3i;tjJ;' X 17.9XMEAN '@M"Hj' X 5.75XSD EUtA':'·" X 7.537075XVAR 11i·'31.'·'i' X 56.8075YMEAN '#A.'U" X 4.2875YSD ,#S,:"", X 7.5618182YV A R Jii4iji:i.!;i X 57.181094SLOPE 11k,'9':'·';' X 0.99908683VI NT li4·'3':'4;' X -1.4572493R 114-'9':"!;' X 0.99581771 BIlD - X -1NWT lil·Wi:,.j;, X -1 N -1 we ightingXSD lii-Ai:,.'ij X 8.0574721XV A R 11i·'31:!";' X 64.922857YSD iik·Ai:'·!;' X 8.0839236YV AR iiR·AI:'.';. X 65.349821To enter the numbers in RPN:CLMEM '14M''''';'.. emRPN 111·IBI:!·!ilC LST AT '1#"1''''';'5 EmID - X -53.5 EmID - X -3.5Y -5Statistics Functions 57


Type Stack Display CommentsSP lil·BI:!·!.1 X -5X -4.34.3 BIll - y -52 BIll - X -2Y - '4.3SP 111·11=!·!il X -4.3Y -52 BIll - X -2Y -4.3.1 111·111:!·!il X 0.1Y -2SP 111·&I.!·!il X -2Y -4.33 111·11:!·!il X 3Y -23 lil·!!I:I·!il X 3Y 3SP 111·111:!'!il X 3Y -24.4 111·II=!·!il X 4.4Y 35.6 11·111:!·!il X 5.6Y 4.4SP 111·111:!·!il X 4.4Y 39.1 111·111=!-!il X 9.1Y 4.410.3 EI·II=!·!il X 10.3Y 9.1SP 111'IBI:!'hl X 9.1Y 4.411.2 lil·II=I·!il X 11 .2Y 9.112.5 111·&I:!·!il X 12.5Y 11.2SP 111·&1I:!-!il X 11.2Y 9.158 Statistics Functions


What is x if y is 9.8?Type9.8Y li4·Ai:I.';'X Display11.26753810.851547Reenter the above program and compute y if x is - 3.The X register should display -4.4545097.If you are entering coord inates with many digits which only differ in the last fewdigits, the variance will not be very accurate because the CALCULATOR is limitedto 9 or 10 digits when storing the sums and computing the variance. To improve theaccuracy, subtract a constant amount from each value as it is entered (or add fornegative numbers). To find the mean, add the constant which you subtracted to thecomputed mean. The standard <strong>de</strong>viation and variance are computed in the normalway.Suppose you have the following coordinates:xy3010987301390010000011000004Instead of entering all those " big" numbers, subtract 3010000 from each x and1000000 from each y.Type Stack Display Comments(lST A T lidS."'"C LX '1i·'9i .'.!;' X 0ALG 11#,'9';(,';'1 tmID [ X 1Y 1987 112·'9i:',,;. X 987Y 1S P ""'3i :'.!;' X 14 tm1D [ X 4Y 43900 J14·Ai:"';' X 3900Y 4SP Pit·'i':',';' X 45 tm1D [ X 5Y 5Statistics Functions 59


Type6706 111'!!I:lt!ilSP 111·BI:!·!ilXMEAN +3010000 =XSD lil'IBI:I'!iIYMEAN +1000000 =YSD EI·III:!·!ilStack DisplayX 6706Y 5X 5X 3864.3333Y 3864.3333X 3013864.3X 2334.9082X 3.3333333Y 3.3333333X 1000003.3X 1.6996732CommentsActual MeanAccurate SDActual MeanAccurate SDThe PROGRAMMING INSTRUCTIONS AND EXAMPLES section will show you howto write a short program that will scale the coordinates for you.Other types of regression may be performed by transforming x or y or both beforeentering them. Different variations may be obtained by using log, root, power,reciprocal, or exponentiation. A semi logarithmic curve fit is obtained by taking thelog of one of the variables.For example, population growth is usually exponential, and can be mo<strong>de</strong>led withthe equation y = ae/\ (bx). This is equivalent to LN(y) = LN(a)*bx. A plot of x vs.LN(y) should give a straight line. This is the same as plotting x vs. y on semilogpaper. Using the following population data for a town, project the population in1980 and <strong>de</strong>termine when the population will rea ch 55000. Determine the correlationcoefficient for x and LN(y) to see how close a straight line the semilog curve is.Year X19551960196519701975Population Y930512036153982080127509TypeC LST A T l.iiM',,.,;'C LX li4·Ai:!,,;1 X9305 J1i"9':I,I;' XLN BIID [StackXY1955 'WMI'W' XXSP 111·11:1'11 X12036 l.1d'I''''. XYDisplay093059.13830729.138307219559.13830729.1383072120369.3956574Comments60 Statistics Functions


Type Stack Display CommentsIN BIID [ X 9.3956574Y 9.39565741960 41"'3i:I.!;' X 1960Y 9.3956574S P iii'S';"';' X 9.395657415398IN BIID [ X 9.6419929Y 9.64199291965 114-'3'*'1;' X 1965Y 9.6419929SP li'·Ai:I.I' X 9.641992920801IN BIID [ X 9.9427563Y 9.94275631970 "#AI"·" X 1970Y 9.9427563S P Jii·Ni:!.';. X 9.942756327509IN BIID [ X 10.222268Y 10.2222681975 41i·i31:t.!;' X 1975Y 10.222268SP ii#-Ai;I.!;' X 10.222268F I X lii,'3'=!·);' X 10.222268 Computer requests ENTER 0-8.o 114-'4i:I.!;, X 10.1980 411'$1:1,'1 X 1980X 11#,'9':1,'1 X 10. Computer displays TO Y.EXPE 414·'3':',!;' X 35692 Projected population in 1980.55000 IN "14MI"";' X 11.Y lii'",:I'I;' X 1988 Computer displays TO X. Populationwill equal 55000 in 1988.FIX 4i4"9i:I,,;. Computer displays ENTER 0-8.3 IiI'S':',!;' X 1987.963R Ji4,'3i:,.!;. X 9.993E-01 R .9993Statistics Functions 61


FINANCIAL FUNCTIONS8MODE OPTIONSBefore doing compound interest and annuity calculations, enter the CLINT'#A':"';' command to clear memory registers 4-9 and to display headings, thentype ENTER I.ida.:f.i;'. Memories 4-9 should not be used for other purposes whiledoing compound interest calculations. This means that statistics and compound interestcannot be done at the same time unless the memory registers are saved andrestored.You can select the five types of interest computation: Compound Interest, FutureValue of an Annuity Due, Future Value of an Ordinary Annuity, Present Value of anAnnuity Due, or Present Value of an Ordinary Annuity. The abbreviations for theseare CMPND, FVDUE, FVORD, PVDUE, and PVDRD, respectively. Values are inputby typing ENTER I.ida.".,;. This puts the CALCULATOR in ENTER (as opposed toFIND) mo<strong>de</strong>. Type the value and enter the appropriate variable name; e.g., I. Thiscauses this value to be stored in the appropriate memory location After all thevalues have been entered, type FIND Eda':J.ij' followed by the unknown variable,e.g., PV, and the computed value will be displayed. Note that FIND I can only beused in Compound Interest mo<strong>de</strong>.CLEAR MEMORY LOCATIONS 4-9 FOR INTEREST CALCULATIONS MODEThe contents of memory locations, 4, 5, 6, 7, 8, and 9 are set to O. TheCALCULATOR is set to ENTER mo<strong>de</strong> (see ENTER and FIND) and headings aredisplayed in the memory area of the screen.Memory and Heading4BAL5FV6i7N8PMT9PVDescriptionBAlloon paymentFuture Value1/100 (interest rate per period as a fraction)Number of periodsPayMenTPresent ValueFinancial Functions &3


SELECT ENTER MODEENT li¥Ai:Mii or ENTER 11k"9 ':!";'All subsequent BAL, FV, I, N, PMT, and PV statements will be used to ENTERvalues until the next FIND command is typed.SELECT FIND MODEAll subsequent BAL, FV, I, N, PMT, and PV statements will be used to FIND valuesuntil the next ENTER command is typed.COMPOUNDINTERESTBALLOON PAYMENT FUNCTIONB Eit"iji:t4;i or BAL li4·Ai:!,'iA balloon payment is sometimes ma<strong>de</strong> at the end of a loan to payoff the remain<strong>de</strong>rof the loan. In ENTER mo<strong>de</strong>, the value of the X register is stored in memoryregister 4 (BAL). In FIND mo<strong>de</strong> (PVDUE and PVORD only), the balloon payment iscomputed using the values in the other registers and stored in the X register andmemory register 4.FUTURE VALUE FUNCTIONThe Future Value is the value of the investment or loan at the end of the lastperiod. I n ENTER mo<strong>de</strong>, the value in the X register is stored in memory location 5(FV). In FIND mo<strong>de</strong>, the Future Value is computed and stored in the X register andmemory location 5.INTEREST RATE PER PERIOD IN PERCENT FUNCTIONIn ENTER mo<strong>de</strong>, i = x/100 is stored in memory location 6 (i). I n FIND mo<strong>de</strong>, I is computedand stored in the X register and i = 1/100 is stored in memory location 6.When entering I (in ENTER mo<strong>de</strong>), if interest is compoun<strong>de</strong>d quarterly, divi<strong>de</strong> thenominal annual interest rate by 4 to get the interest rate per period. If interest is compoun<strong>de</strong>dmonthly, divi<strong>de</strong> the annual rate by 12. When finding I (in FIND mo<strong>de</strong>), reversethe process and multiply by 4 or 12 to get the annual interest rate in percent.64 Financial Functions


NUMBER OF PERIODS FUNCTIONIn ENTER mo<strong>de</strong>, X is stored in memory location 7, (N). In FIND mo<strong>de</strong>, the numberof periods is computed and stored in the register and memory location 7. Whenentering N, if interest is compoun<strong>de</strong>d quarterly for a number of years, multiply thenumber of years by 4 to get the number of periods. If interest is compoun<strong>de</strong>dmonthly, or monthly payments are to be ma<strong>de</strong>, multiply the number of years by 12.When finding N, reverse the process, multiplying by 4 or 12 to convert the numberof periods to years.PAYMENT PER PERIOD FUNCTIONPM lii,'3i:"!;' or PMT lii·Ai:!,!;'I n ENTER mo<strong>de</strong>, the content of the X register is stored in memory location B (PMT).In FIND mo<strong>de</strong>, the payment is computed and stored in the X register and memorylocation B.PRESENT VALUE FUNCTIONThe Present Value is the value of the investment or loan at the beginning of the firstperiod. In ENTER mo<strong>de</strong>, the content of the X regi ster is stored in memory location 9(PV). In FIND mo<strong>de</strong>, the Present Value is computed and stored in the X register andmemory location 9.Note that the Status Display has a FIX2 for BAL, FV, N, PMT, and PV so that dollarsand cents will be displayed. In ENTER mo<strong>de</strong>, these five variables are displayed inthe memory area. I n FIND mo<strong>de</strong>, these five variables are displayed in the memoryarea and the computed value is also displayed in the scroll area. In ENTER mo<strong>de</strong>,issuing the I command causes i = 1/100 to be displayed in the memory area in FIXBand I in the scroll area in FIX3. In FIND mo<strong>de</strong>, i is displayed first in the scroll area inFIXB.SElECT COMPOUND INTEREST MODEThis mo<strong>de</strong> is used for situations where a sum of money is invested, earns interest, andthe interest is compoun<strong>de</strong>d to the account at the end of each interest period.This interest is now part of the principal and will earn more interest in the nextperiod. Examples are a savings account in a bank or savings and loan and a sharedraft account in a credit union. Money is put in the account and left there to accumulateinterest with no <strong>de</strong>posits or withdrawals. The values that may be enteredand found are FV, I, N, and PV.This mo<strong>de</strong> uses the equation:FV = PV * (1 + 1) /\NFinancial Functions 65


The following problems illustrate the method of computing interest.1. How much money will be accumulated in a credit union share draft account if$8000 is <strong>de</strong>posited and left for 2 years at an annual interest rate of 7%, compoun<strong>de</strong>dquarterly? What if the money is placed in a bank savings account at51J.i % interest, compoun<strong>de</strong>d quarterly?TypeeLM 11"Ai:t.';'CMPND i#M'@;'eLI N T J1i"31:t.,;.8000 PV '#$';0;'2*4=7/4=I Jip·sg'¥!i'FIN D 112.$31:(-1;1FV EJi{;j9i~t.!;1EN TE R 1#$""';'5.25/4=I Ui'Wi:t,'MFIN D li#''':t.,;,FV Jii·'31¥!;'Stack DisplayX 8000.00X 2.00Y 2.00X 8.00X 8.00X 7.00Y 7.00X 1.75X 1.750X 1.750X 9191.05X 9191.05X 5.25Y 5.25X 1.31X 1.313X 1.313X 8879.62CommentsClear memory.Clear stack.FIX8 changes to FIX2 in statusdisplay. Present value also displayedat memory location 9.Number of quartersMemory location 7I nterest rate per quarterThe credit union account would have $9191.05 after two years and the bank accountwould contain $8879.62.2. Using the same data, what annual interest rate is nee<strong>de</strong>d to have $10,000.00 atthe end of the two years?TypeENTER 11#,'31:',1;110000 FV'ii·Ai:t.,;,FIN D 11#-'3'.'·'i'I i1i'Si:t.';'*4=Stack Display CommentsX 10000.00X 2.829 Rate per quarterX 2.829X 2.829X 11.314 Annual interest rate66 Financial Functions


3. If the annual inflation rate from 1979 to 1982 is 10%, what is $10,000 in 1982dollars worth in 1979 dollars?TypeStack DisplayCommentsClMEM 114,'9':'.';'CMPND 114·'91:t.';'C LI NT Iit-AI'f.j;'10000 FY l#iS'@;'10 I 1.1449,:,.1;.3 N 11i,'9,:t.,;,FIN D J1¥'3j:'·!;'PV 11k'Ai:t.,;.X 10000.00X 10.000X 3.00X 3.00X 7513.15Cl ear stack.Clear memory.Note FIX2 mo<strong>de</strong>Annual inflation rateNumber of yearsWhat if the annual inflation rate is 13%?TypeStackDisplayCommentsENTER13I "1.$9':"'1FIN 0 114·&1:',';'PV lik·$':I.';'XXX13.0013.0006930.50Annual inflation rateThe Annual Effective Rate (AER) of interest takes into account the compounding ofinterest. It tells what annual interest rate (in percent) with compounding annually isequivalent to the nominal annual rate with compounding done more often. This isbased on the assumption that the interest is left in the account. The AER is alwaysat least as large as the nominal annual interest rate. To compute the AER from thenominal annual interest rate, use the formula:FY = 1 + AER/100 = PY * (1 + 1/100) ANAER = (FV-1) * 100Plug in PV = 1, N = number of periods per year, and I = nominal interest rate perperiod. Solve for FV. Then solve for the AER . Once you know the AER, you can usethis for I and use the number of years for N, since each period is one year. The procedureis as follows:CLINTCMPNDEnter number of periods per yearN1PVEnter annual interest rate1Enter number of periods per yearIFIND FV-1= *100=Financi al Functions 67


The following problems illustrate how to solve for AER:1. If the nominal annual interest rate is 18% compoun<strong>de</strong>d monthly, what is theAER?Type Stack Display Comments1B1IE1!mCLMEM 11#9';'4;.ell 11i·Si:t.,;.CMP lii·i9i:'.';,12 'ii-Ai:',';' X 12N 114-SI:I,!;' X 12.001 lii·Ai:!l';' X 1.00PV lii!A':"';' X 1.0018[ X 18.00Y 18.0012= X 1.50I Jii·Ai:,.!;' X 1.500FIN D 41¥'Hi:t.';. X 1.500FV ii4·S91:'·';' X 1.20X 1.20Y 1.201= X 1.96E-01* X 1.96E-01Y ·l.96E-01100= X 19.56FIX 111·11:!'!il X 19.568 Iii-Ai:!.';' X 19.561816 Annual Effective Rate2. To find the nominal annual rate from the AER use the following procedurewhich is similar to the procedure used to find AER:CLINTCMPNDEnter periods per yearN1PY1+Enter AER/100 = FYFIND I (rate per period)*Enter periods per year(nominal annual rate)Reverse the calculation in the previous AER example.68 Financial Functions


Type Stack Display CommentsBmlEmICLMEM 414-'9':I.!;1ell 11,.'"1:!·!;'CMP i1p·I31:'.';.12 11i,'3':'·';' X 12.000N li4-Si:'·!;1 x 12.001 11k'S':!";' X 1.00PV lii·S':!·';' x 1.00 Stored in memory location 91+ X 1.00Y 1.0019.5618161 X 19.56Y 19.562 1.00100= X 1.20FV 114,'3':1,'8 Stored in memory location 5FIN 0 11,.'3i:'.';1I J1k'Wi:"!;' X 1.500 Rate per period* X 1.500Y 1.50012= X 18.000 Nominal annual rateNote: If your answer does not agree with your bank's answer, it may be that theyare using a different number of periods per year or are putting the interest into adifferent accou nt.The formula for continuous compounding for one year is:FV = PV * e 1\ (1/100) = 1 + AER/100where I is the nominal interest rate per period in percent. The AER may be computedfrom this and used in subsequent calculations. Continuous compoundingmay also be approximated by using a large number of periods per year.3. As an example, compute the AER if the nominal annual rate is 9.255% and interestis compoun<strong>de</strong>d continuously.Type Stack Display CommentsClMEM '1:Z~Ai:t .i;i9.2551 X 9.2555Y 9.2555100 X 0.9255EXPE li491:t.,;. X 1.0969681 X 0.09696797*100= X 9.696797Financial Fun ctions 69


ANNUITIESThe word annuity is used here for a situation where fixed payments are ma<strong>de</strong> eachperiod and interest is compoun<strong>de</strong>d at the end of each period. In an annuity due,payments are ma<strong>de</strong> at the beginning of each period. In an ordinary annuity,payments are ma<strong>de</strong> at the end of each period.FUTURE VALUE OF AN ANNUITY DUE FUNCTIONFVD ",.AI;j-';, or FVDlJE iii'Ai:t,!;.An example of an annuity due is a savings account where equal payments arema<strong>de</strong> at the beginning of each interest period. Selecting future value means that I,N, and PMT will be calculated using the value in the FV register, not the PV register(Present Value). The values that may be entered are FV, I, N, and PMT. The valuesthat may be found are FV, N, and PMT. PV may also be computed in this mo<strong>de</strong>. Inthis case, the formula for PVDUE will be used, so if BAL is notO, a balloon paymentwill be inclu<strong>de</strong>d.FV = PMT * ( (1 + i) AN - 1) * (1 + i) I iAs an example, compute how much money will be accumulated in a credit unionshare draft account after two years if $1000 is <strong>de</strong>posited at the beginning of eachquarter and the annual interest rate is 7%, compoun<strong>de</strong>d quarterly.TypeStack DisplayCommentsCLINT "'1!3':!·!;'FVDUE 1#"9I:U;12*4=N li'tS';!."1 000 Iii-Wi:'·!;'PM T 11'-MI:!";'7/4=I Iii-Ai:"';'FIN D 11#"9':!";'FV lii"3';'·';'X 2.000Y 2.000X 8.000X 8.00 Placed in memory location 7X 1000.00X 7.00Y 7.00Placed in memory location 8X 1.75X 1.750 Placed in memory location 6X 8656.41What if the money is in a bank account at 51;4 %?TypeStack DisplayCommentsENTER5.25/4=XXYX8656.415.255.251.3170 Finan cial Functions


TypeI li4·'3i:,.,;.FIN D li4·Wi:I.';.FV lip·i9i:'·!;'Stack Displayx 1.313x 8487.26CommentsNote: Compare this with the first example in CMPND.FUTURE VALUE OF AN ORDINARY ANNUITY FUNCTIONAn ordinary annuity is similar to an annuity due except that payments are ma<strong>de</strong> atthe end of each period rather than at the beginning. An example is a sinking fundwhich is a savings fund that will accumulate a specific amount of money at afuture date. The values that may be entered are FV, I, N, and PMT. The valueswhich may be computed are FV, N, and PMT. PV may also be computed while inFVORD mo<strong>de</strong>. However, the equation will be the one used by PVORD, which inclu<strong>de</strong>sa balloon payment.FV *5 PMT * ((1 + i) J\N -1) / iExamples:1. Using the same example as for FYDUE on the preceding page, this time makethe <strong>de</strong>posits at the end of each quarter.TypeStack DisplayCommentseLM 11k'Ai:!.';'ell 11i,iii:!.';'FVO lii,igi:I.!;'2*4=10007/4=I li4·Ai:'.,;.FIN D J1¥Ai:t.!;'FV 11i·i3i:',';'ENTER5.25/X 2.00Y 2.00X 8.00Stored in memory location 7X 1000.00 Stored in memory location 8X 7.00Y 7.00X 1.75X 1.750X 8507.53 Future value stored in memorylocation 5X 5.25Y 5.25Financial Functions 71


TypeStack DisplayComments4=I 11#·'31:,.,;'FIN D Jii·A':',';'FV I1P"9':!";'xXX1 .311.3138377.312. What do the monthly payments have to be to accumulate $100,000 in 25 yearsat 9% annual interest?TypeStack DisplayCommentseLM "k-Ai:"';'ell i1#·i31:'.!;'FVO 1.14IA1;',';'100000 .. 1d9',,.,MFV iii"3':"';'25*12=9/12=I lii,Si:','IFIN D liP-Ai:,.,;.PM T 11:1.$I:t.,;,X 100000X 100000.00X 25.00Y 25.00X 300.00X 9.00Y 9.00X 7.50E-01X 7.500E-01X 89.20Automatic FIX2 : contents of Xregister stored in memorylocation 5.Stored in memory location 7i computed and stored inmemory location 6Stored in memory location 8PRESENT VALUE OF AN ANNUITY DUE FUNCTIONThe difference between this mo<strong>de</strong> and FVDUE is that PV is used in the calculationsrather than FV. This is an annuity where payments are ma<strong>de</strong> over a fixed period oftime. A balloon payment may be ma<strong>de</strong> at the end of the last period. The valueswhich may be found are BAL, N, PMT, I, N, PMT, and PV. FV may also be found inPVDUE mo<strong>de</strong>, however you will use the formula from FVDUE, which does not inclu<strong>de</strong>a balloon payment.PV = PMT* (1 - (1 + i) AN) / i * (1 + i) + BAL * (1 + i) A - NThe following problem solves for monthly payments using PVDUE mo<strong>de</strong>:A company leases its equipment, which costs $52,000, to a customer for 3 yearsand then sells it for $15,000. An annual yield of 25% is <strong>de</strong>sired. What should thelease payments be (paid at the beginning of each month)?72 Fin ancial Functions


TypeStack DisplayCommentselM i14"3i:,.1;'ell i14·Ai=',';'PVD i1k·iiiM:!.,;,52000 iiP·'3 ':!·';'PV iitAi:!.';'3*12=X 52000.00X 52000.00X 3.00Y 3.00X 36.00Automatic FIX2Stored in memory location 9Stored in memory location 715000 BAL25/12=FIN D IiI'S':!,';'PM T '1k'A':!";'X 150000.00X 25.00Y 25.00X 2.08X 2.083X 1747.21i computed and stored in memorylocation 6Stored in memory location 8What should the monthly payments be if they sell the equipment for $12,000?Type Stack Display CommentsEN TE R 1#9.,'·';'12000 1#9''''';'BAL lii·'ii:';';,FIN D 114,,31;',';'PM T 111'$';"';'XX12000.0012000.00 Stored in memory location 4X 1802.83PRESENT VALUE OF AN ORDINARY ANNUITY FUNCTIONPVO "*-9',1,'1 or PVORD 114M."'!;'This mo<strong>de</strong> is useful for doing computations involving loans. The Present Value isthe amount of the loan, PMT is the amount of money to be paid each month (orother period of time), N is the number of periods, and 1 is the interest rate perperiod. A balloon payment may be ma<strong>de</strong> at the end to payoff the remain<strong>de</strong>r of theloan. The values that may be entered are BAL, FV, I, N, and PMT. The values thatmay be found are BAL, FV, N, and PMT. PV may also be completed, however, theformula from FVORD will be used so no balloon payment will be consi<strong>de</strong>red.PV = PMT*(1 -(1+i)AN) / i + BAL*(1+i)A-The following problem solves for monthly payments using PVORD mo<strong>de</strong>.Financial Functions 73


What will the monthly payments be on a $150,000 loan for 25 years if the annual interestrate is 13 %? What if the loan runs for 50 years?TypeStack DisplayCommentseLM lii·iai:,,';'eLI .. iI'S':"!;'pvo liP-Ai:"!;'150000 "i#Y':'·!;'PV Ji4·A':II';'25*XXXY150000.00150000.0025.0025.00Stored in memory location 912=13[XXY300.0013.0013.00Stored in memory location 712=I 11i·Ai:I,';'FIN D lii·Ai:'.';.PM T 11:1.$1:1.';.ENTER50*XXXXY1.081.0831691.7550.0050.00i computed and stored in memory location625-year loan payment is stored inmemory location 8.12=N lii·SI:'·I;'FIN 0 i1iI13':I.,;'PM T JiP·A'.,·,;,XX600.001627.53Stored in memory location 750-year loan payment ismemory location 8.stored inThe payments for the 25-year loan, although it runs for half the time of the 50-yearloan, are not very much larger. This is because most of the money for the 50-yearloan goes into interest payments rather than reducing the principal.74 Financial Functions


PROGRAMMING INSTRUCTIONSAND EXAMPLES9MODE SELECTNow that you are at least acquainted with the functions of the CALCULATOR program,you are now ready to learn the instructions that will allow you to use thesefunctions in programs. A program is a series of logical instructions to be executedor " run" later. A program is said to be entered in indirect mo<strong>de</strong> because the instructionsare not performed immediately as they are entered. Until now, all of your exampleshave been executed in direct mo<strong>de</strong> because each operation was performedimmediately.I n program (or indirect) mo<strong>de</strong>, most instructions are stored in the program memory,which contains 3072 locations (bytes). The address of the first location is 0000 andthe last is 3071.Note: This address is not the same as the real RAM address. The real RAM addressvaries.A pointer, called the Program Counter (PC), displays the location that is currentlybeing accessed. After you enter each instruction, the program counter is advanced.When you finish entering your program by typing the END instruction you enterdirect mo<strong>de</strong> and can execute your program. But right now you need to know the instructionsthat allow you to write a program.ENTER PROGRAM MODE INSTRUCTIONWhen you enter this instruction, the entire display scrolls upward, expanding thescroll area from 7 lines to 21 lines. This allows you to display 20 lines of your programat a time.COPYRIGHTLINESTATUSDISPLAY LINEPROGRAM---AREA(22 lines)LAST ENTRYLINEFigure 9Program Mo<strong>de</strong> Screen DisplayProgramming Instructions and Exa mples 75


In the programs inc lu<strong>de</strong>d in this section, the format will be shown as follows:SCROLL AREATypeAddressLocationOldContentsNewContentsCommentsiiiii,:fil ;ht1i'Clears number stack, scroll area, and returnsstatus display line to <strong>de</strong>fault options.Emil #0000 STPEnter program mo<strong>de</strong>. Scroll area is now21 lines and the first location 0000 is displayed.The STP instruction is in the " OldContents" field as it is for every locationbefore you enter an instruction.This PRO instruction is not stored in the program memory and is only executed inthe program mo<strong>de</strong>. Other instructions that have the same limitation are listed inFigure 10.InstructionBack StepClear ProgramDeleteDisk Operating SystemEnd ProgramI nsert CharactersInsert NumberList ProgramLoad ProgramLoad MemorySingle StepResetSave ProgramSave MemoryAbbreviationBSTCLP or CLPROGDELDOSENDINSINSNUMLISTLOADLOADMSSTRSTSAVESAVEMTokenEmil "OEt'ETE SACllt SFigure 10Instructions Not To Be Stored in MemoryThese instructions are discussed in the succeeding paragraphs.CLEAR PROGRAM MEMORY INSTRUCTIONCLP I.14M"'·';' or CLPROG "1d3':O;'Use this instruction when you are ready to enter a new program. It fills the entireprogram memory with STP (stop) instructions and sets the program counter to 0000,so you can begin a new program.76 Programming Instructions and Examples


Note: If you want to keep a previous program, make sure you have saved it on adiskette or cassette tape before entering a ClPROG instruction (see PERIPHERALINPUT/OUTPUT COMMANDS).Write a program to solve the problem 3 + 2Use ALC mo<strong>de</strong>.SCROll AREATypeC LP 111·&I:!·!ilC LR lilAi:!,,;,A LG 111·BI:!·!il3 EI·EI:!·hl+2 Jik·i3M:'.';.Address Old Newlocation Contents Contents Comments0000 STP CLPROC0000 STP CLR Clears program of accumulated results.0001 STP ALC An instruction uses only one location sothe next address will be 0002.0002 STP 3 A number entry uses eight locations sothe next address will be 0010.0010 STP +0011 STP 20019 STP0020 STPEND PROGRAM MODE INSTRUCTIONThis instruction returns the screen to the direct mo<strong>de</strong> in which commands are executedimmediately. (Refer to Figure 2.)Note: If you press IIl.'tII immediately after entering an END instruction, thedisplay will be messed up. If this does happen, enter PROG .. #"9""';' and END.. #"3,:0;. to straighten out the display.SCROll AREATypeAddresslocationOldContentsNewContentsComments0020STPThis in struction is not stored in programmemory. It takes you back to directmo<strong>de</strong>.Now you are back in direct mo<strong>de</strong>.Programming Instructions and Examples 77


PROGRAMMINGINSTRUCTIONSThis instruction clears the Call Stack (See CALL SUBROUTINE AT LOCATION n) an<strong>de</strong>xecutes the current program in memory beginning with address location 0000. Youcannot enter ordinary commands while the program is running, but you can press theED key to stop your program. If an error occurs during program execution, you' llsee an error message and your program will stop.Typemil 'You should have a 5 in the X register and in the scroll area.LIST PROGRAM INSTRUCTIONLIST 11i"9i:',';'This instruction lists the requested address locations and contents of those locations.SCROLL AREATypemil #LIST Jii·Ai:!.';.ENTER 0-3071ENTER 0-3071CommentsReturn to program mo<strong>de</strong>.Enter the first location to be listed.Enter the last location to be listed.You should now see your program listed on the screen in program mo<strong>de</strong>. The programcounter is at location 0020-the last address location you requested. Notethat this line is displayed twice.On larger programs, you may only want to list part of the program. Make sure youdo not enter a starting location that is in the middle of a number entry. If you do, youwill get several locations listed and then the message ERROR-NOT VALID COM­MAND OR NUMBER. If the ending location is in the middle of a number, then theprogram will display all the locations of the number and the program counter willpoint to the next instruction. In program mo<strong>de</strong>, the last requested location is listedtwice. This happens because the current location is always displayed after each command.If you want to list only one instruction, enter that instruction's location as thefirst and second requested addresses. Or YOLl can type that instruction's address as thefirst requested address and 0 as the second requested address.78 Programming I nstructions and Examples


PROGRAMMINGINSTRUCTIONSBACK STEP INSTRUCTIONEntering this instruction moves the program counter back to the previous instruction'saddress location and displays the location and its contents. However, it neverexecutes the instruction in either direct mo<strong>de</strong> o r program mo<strong>de</strong>. If the programcounter is at address location 0 and you enter a SST instruction, the screen willdisplay the message ERROR-END OF MEMORY and the program counter will remainat address location O.SCROLL AREATypeAddressLocationOldContentsNewContentsCommentsI'iil1I t002000200019STPSTPSSTThe preceding location is displayed withits contents on the current entry line. Thisinstructio n is not placed in programmemo ry.SINGLE STEP INSTRUCTIONIn program mo<strong>de</strong>, this instruction moves the program counter to the next instruction'slocation and displays both the address location and its contents, but does notexecute it. If the content is not a number, the program counter moves ahead o neaddress location.If the content is a number, the program counter moves ahead eight locations. Indirect mo<strong>de</strong>, entering SST 1.14"91"');1 will both display and execute the instruction.If the program counter is pointing to the last location in memory and you try toenter a single step instruction, the screen will display the message ERROR-ENDOF MEMORY and the program counter will not move.SCROll AREATypeAddressLocationOldContentsNewContentsComments001900190020STPSSTThe next location and its contents are displayedon the current entry line. This instructionis not placed in program memory.In direct mo<strong>de</strong>, it is possible to execute your program one step at a time using thisinstruction.Programming I nstruct ions an d Examples 79


PROGRAMMINGINSTRUCTIONSINSERT CHARACTER(S) INSTRUCTION (ONE BYTE)This instruction is used to make room for a new instruction to be inserted in themiddle of a program. When you enter an INS, all the instructions from the currentprogram counter location move ahead one address location (one byte). This instructionalso inserts an STP (stop) instruction at the current address location. Theinstruction at the last address location (3071) is lost.Suppose you want to enter a PUSH command to put a 3 in both the X and Yregisters.SCROLL AREATypeAddress Old NewLocation Contents ContentsCommentsBID tBID t0020 STP0020 STP BST00190019 BST0011 2Moves back one address locationMoves back eight address locationsSCROLL AREATypeBID tINS fli·Ai:I.';.BIID [Address Old NewLocation Contents Contents0011 2 BST0010 +0010 + INS0010 STP0010 STP PUSH0011 +CommentsClears address locationNow, to see the change, enter:LIST Ji:z.W';'·'i'ENTER 0-3071oENTER 0-307120The screen should show the following:0000 CLR0001 ALG0002 30010 PUSH0011 +0012 2002080 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSWhen you execute this program, you will have a 5 in the X register and a 3 in the Yregister.INSERT NUMBER INSTRUCTION (EIGHT BYTES)INSN 11,.,,''''';' or INSNUM 11'l'f:I':Ui' or BiD -+Use this instruction to make room for a number to be inserted in the middle of aprogram. All succeeding instructions w ill be moved eight address locations.Therefore, if you have an instruction that requires a number entry (like a CALL orGOTO), but you do not know what the number will be, go ahead and enter a 0 sothe program will leave room for a number entry. This will save you many latermodifications.In your current program, you <strong>de</strong>ci<strong>de</strong> to add another number so the problem willread 3 +2*6=.SCROLL AREATypeAddressLocationOldContentsNewContentsComments0020INS 111'!BI:I'!1 00200020* 00200021INS N 111·BI:!'!il 002100216 111'!BI:!'hl 00210029STPSTPSTPSTPINS*INSNUM6Clears address locationClears address locationNow list the changed program:TypeAddressLocationOldContentsNewContentsENTER 0-30710029LISTENTER 0-3071Programming Instructions and Examples 81


PROGRAMMINGINSTRUCTIONSThe program now looks like the following:0000 CLR0001 ALC0002 30010 PUSH0011 +0012 20020 *0021 600290030 STPTypeC lR G4·AI;I.';,RUN lip·H':'·';'You should have a 15 in both the X register and in the scroll area and a 3 in the Yregister.NO OPERATION INSTRUCTIONThis instruction is used in a program to allow room to add commands later or to<strong>de</strong>lete commands without moving the address locations of the rest of the instructions.In direct mo<strong>de</strong>, you can use a NOP command to terminate a commandwhich requires an input. If, for instance, you have entered FIX and <strong>de</strong>ci<strong>de</strong> not tochange the current option, type NOP. You'll get an error message, but the StatusDisplay line remains unchanged.I n some cases, however, using a NOP instruction does not just take up space andleave everything as it was. For instance, in ALC mo<strong>de</strong>, you cannot use two binaryoperations in a row or you get an error. If you want to repeat the value that is in theX register, you can substitute a NOP command as in the problem 3 + (3 + 2)*6 =.This is the same as writing 3 + (NOP + 2)6 =. To program this change:SCROLL AREATypeENTER 0-307112 Iii-Ai:',';'Address Old NewLocation Contents Contents0031 STPCommentsDisplays address location12 and its contents82 Programming I nstructions and Examples


PROGRAMMINGINSTRUCTIONSAddress Old NewType location Contents ContentsENTER 0-307112 "4-Ai:"';'0012 2INS lii·Ai:'." 0012 2 INS0012 STPEDI ( 0012 STP0013 2INS 114·'31:,.1;' 0013 2 INS0013 STPNOP 11i,'3i:I·'1 0013 STP NOP0014 2INS lii,'9i:!.!;' 0014 2 INS0014 STP+ 0014 STP +0015 2SS ",.ei:!·!;' 0015 2 SST0023 *INS 11#"3':1,';' 0023 * INS0023 STPEDI ) 0023 STP0024 *Now, list the program to make sure you have the same data on your screen as islisted below:TypeLISTENTER 0-3071ENTER 0-30710000 CLR0001 ALG0002 30010 PUSH0011 +0012 (0013 NOP0014 +0015 20023 )0024 *0025 60033Programming Instructions and Examples 83


PROGRAMMINGINSTRUCTIONSNow, run the program.Type&& $CLR 11tS':!-!;'R lJ N ei<strong>de</strong>':'·!;1You should have a 33 in the X register and in the center field of the scroll area, anda 3 in the Y register.DELETE CURRENT INSTRUCTION COMMANDDEL IlkM.'Oi' or BDIIThis instruction <strong>de</strong>letes the current instruction pointed to by the program counter.The succeeding instructions each move back one address location. If the <strong>de</strong>letedinstruction is a number, succeeding instructions move back eight locations (eightbytes). STP instructions will be automatically ad<strong>de</strong>d at the end of memory.Remember that the numbers referring to address locations following a COTO orCALL command will not be automatically modified to reflect the address locationchange. You must remember to change it manually (see CALL and GOTO instructions).To <strong>de</strong>lete the PUSH command from your program, enter the following:Address OldType Location Contents0035 STPThe PUSH instruction is at address location 0010, so list that line and <strong>de</strong>lete it.SCROLL AREATypeLIST 114-'9i:I.';,ENTER 0-3071Address Old NewLocation Contents ContentsCommentsENTER 0-30710010 PUSH0010 PUSH0010 +DELDeletes PUSH instructionThe + that was in address location 0011 is now in 0010 and the rest of the instructionshave moved up accordingly.List the program from 0 through 32.84 Programming I nstructions and Examples


PROGRAMMINGINSTRUCTIONSSTOP PROGRAM INSTRUCTIONSTP 114"3':t.';'As you have seen, the program memory is initially filled with STP instructions. Asyou entered the new instruction, it appeared in the right field. When you I isted theprogram, the STP instruction had been replaced by the new instruction. But thisSTP instruction has other uses. If on a CALL or GOTO instruction you make amistake and enter an address location outsi<strong>de</strong> your program, the STP instruction inthat location will prevent your program from becoming a "runaway." The programwill simply stop.This instruction is also used in the middle of a program to stop execution and waitfor you to input data (a number, in most cases). When you execute the program andit reaches the STP instruction, you will hear a " beep" (pitched higher than the errorbeep) and the prompt symbol appears.You've used specific numbers in your program until now. Your program is onlygood to solve the one specific problem 3 + (Nap + 2)*6. By using STP instructionsin place of the numbers, we can generalize the program to accommodate anynumbers written as a general equation:A+(NOP+B)*CBack to the program and begin by I isting location 2.SCROll AREATypeAddressLocationOldContentsNewContentsCommentsLIST Jii·'9i:',';.ENTER 0-3071ENTER 0-30710002300023DELYou must <strong>de</strong>lete the number with aDELETE command before doing an INS.INS J1¥'3i:t"i'000200020002++STPINS0002STPSTPPuts a STP command in place of 3.S5 li4·Ai:'.';'000300030004000400050005++((NapNapSSTSSTSST000600060007++2SSTProgramming Instructions and Examples 85


TypeDE l Jik·Ai:!·';'INS Jii43,:t.j;'STP iiiijoAi:M;i55 lit,Ai.'.';1S5 '14,'3':',';'DE L 11i'Ai.huMINS 1.1#9I,flii'STP 41#119';"'155 'ii·'ai:'.';'AddressLocation000700070007000700070008000800090009001000100010001000100010001100110012OldNewContents Contents Comments2)STP)STP))**66STPSTPSTPDELINS Puts a STP command in place of 2.STPSSTSSTDELINS Puts a STP command in place of the 6.STPSSTThis completes the changes in the program. But before you can execute it, youneed to know how to restart it after you have entered a number.CONTINUE PROGRAM FROM CURRENT LOCATION INSTRUCTIONCON 11#a,:,.,;' or CONT I1M9'",,1 or BIl'D @When the program counter reaches a stop (STP) instruction, it stops executing theprogram. After you have entered your number, press BIl'D @ to continue execution.List the first 12 locations to verify your program matches the above example.TypeENTER 0-3071ENTER 0-307112 ""'3';14;'END fiR-xi':',!;'RUN lii·'il.t.!;,Enter the following set of numbers: 2, 4, 8.Note: Don't forget to press BIl'D @ after you enter each number. Otherwise, youcould spend hours won<strong>de</strong>ring why the program accepted the numbers, but didn'tsolve the problem.When your program finishes executing, the answer of 50 appears in the X registerand in the scroll area.86 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSGOTO INSTRUCTIONlhis instruction, followed by an address location number, is called an unconditionalbranching instruction. In your program, when the program counter comes toa COlO instruction, it immediately jumps to the address location specified by thelocation following the COlO statement. When you enter a COlO instruction indirect mo<strong>de</strong>, the screen displays the message E NTE R 0-3071. You enter an addresslocation and press the 41#3',0;'. I n program mo<strong>de</strong> you of course do not get theprompt message. By putting a COlO 2 at the end of your program, you can createan endless loop. lhe program will execute, waiting for you to supply the values andpress mID @. If you insert a PUSH command before the COlO command, youcan push your answers down into the stack.SCROLL AREATypemID #mID [GOlD 1",'31;',';'Address Old NewLocation Contents Contents Comments0013 SlP Puts you in program mo<strong>de</strong>0013 SlP PUSH Each progr.am solution will be saved inthe stack.0014 SlP0014 SlP COlO Program will return to address location00020015 SlP0015 SlP 20023 SlPRun the program three times using the following sets of numbers:1) 27,16,322) 1E +08,2006,1 E +063) 3.456, 76.1, .0037Answer is 1403Answer is 1.0000211 E + 14Answer is 3.7503572When you have run the program three times, press mID # to return to the programmo<strong>de</strong>.CONDITIONAL BRANCHING INSTRUCTIONSXE f.1¥'ii;t 1j;, or XEQ Ji4-Aj:t,'1XG ""Ai:!.';. or XGE 114"91:"';1Xl 111"3':1.';1 0 r Xl T J1¥Ai:t"i'XN fiP"9':"';' or XNE J1¥Ai:t.';'In a conditional branch, the COlO portion of the instruction is not performedunless the first part of the instruction is true. For instance, the first conditionalbranch listed above is XE. It simply means if the number in the X register is equal toa number in a specified memory location, then you jump (or branch) to another addresslocation.Programming Instructions and Examples 87


PROGRAMMINGINSTRUCTIONSExample:XEQ122Testing to see if number in the X register is the same as thenumber in memory location 1. If it is, the program branches toaddress location 22.To modify your program to incorporate this change, make the following changes:SCROLL AREAType58 11i,19i:'.';'INS N iik-@i:iJ;1Address Old Newlocation Contents Contents Comments0003 + Use back step instructions to get backto location 0000.0003 + SST0002 STP0002 STP SST0001 ALG0001 ALG SST0000 CLR0000 CLR INSNUM INSN used to insert number (58)0000 STP0000 STP 58 Now you've got a number to store Inmemory0008 CLR0008 CLR INS Use INS to enter STORE instruction.0008 STP0008 STP STO Enter STORE command.0009 CLR0009 CLR INSNUM Use INSN to enter which memory location.0009 STP0009 STP 10017 CLRSingle step to the STP instruction at address location 0029.SCROLL AREATypeDE L 11q.Ai~t·'15S Ef1.Ai:W;'INS Ji4·NI:t.);,Address Old Newlocation Contents Contents Comments0029 STP0029 STP DEL0029 PUSH0029 PUSH SST0030 GOTO0030 GOTO INS0030 STP88 Programming I nstructions and Examples


TypeXE 11#491:!";1INS N 11iB9j'!!i'1IN SN Jim.,u ••OI!m'U,'Address Old NewLocation Contents Contents Comments0030 STP XEQ Conditional branchi ng instructions0031 COTO0031 COTO INSNUM0031 STP0031 STP 10039 COTO0039 COTO INSNUM0039 STP0039 STP 0 Enter a 0 because you don't know theprogram's last location yet0047 COTONow that the address locations have changed, you' ll have to change t he locationafter the COTO instruction; otherwise, the program will loop back in the middle ofa number and you' ll get an error.SCROLL AREATypeSS 11~,!al:!'!il17 Mal;t.",Address Old NewLocation Contents Contents Comments0047 COTO SST0048 20048 2 17 Enter new COTO address location (17)0056 STPNow you know exactly where the program ends. You can now back step to address40 and put in the correct number.SCROLL AREATypeAddressLocationOldContentsNewContentsComments0056STPBSTRemember, BST's are not stored in programmemory. This is the number youneed to chan ge.004817004817BST0047COTO0047COTOBST003900039056Entering 56 puts it in the new contentsfield and, on the next LIST, it will appearin place of the O.0047COTOProgram m ing Instructions and Examples 89


PROGRAMMINGINSTRUCTIONSType LIST '1"'9':f.!j' and the numbers 0 and 56 upon request. The listing shouldlook like this:0000 580008 STO0009 10017 CLR0018 ALC0019 STP0020 +0021 (0022 NOP0023 +0024 STP0025 )0026 *0027 STP00280029 PUSH0030 XEQ0031 10039 560047 COTO0048 170056 STPNow you have a program that stores a number into a memory location, checksyour totals against that number and, if they don't match, loops back for another setof values. If the result in the X register does match the number in the memory location,the program stops. You can now put in a "test" to make sure the program doesstop.SCROll AREAType22222 '1#9,,0;.o li,.'3i:I.!;'Address Old Newlocation Contents Contents Comments0056 STP0056 STP 22222 Enter a test number to store in memorylocation.0064 STP0064 STP STO0065 STP0065 STP 00073 STPNow press EmID $ to return to direct mo<strong>de</strong>. Run the program using the followingsets of values when the prompt symbol appears.6, 9, 32, 5,8(First run)(Second time through the program)90 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSThe first set of numbers did not total 58, so the program counter ignored the addressof the XE instruction, dropped through to the COTO instruction and loopedback.The second time through, the total is 58. Therefore, a 22222 appears in memorylocation 0 and the X register.The other conditional instructions work very much the same way.XGE states that if the number in the X register is greater than or equal to thenumber stored in a specified memory location, the program counter will go to theaddress location you have specified.XLT states that if the number in the X register is less than the number stored in aspecified memory location, the program counter will go to the address locationyou have specified.XNE states that if the number in the X register is not equal to the number stored in aspecified memory location the program counter will go to the address location youhave specified.The format for entering these three conditional branching instructions is the sameas for the XEQ instruction.CAll SUBROUTINE AT LOCATION n INSTRUCTIONThis instruction is very similar to a COSUB instruction in BASIC in that it calls asubroutine. It requests that a program memory address (n) from 0-3071 be entered(if you're in direct mo<strong>de</strong>). If you're in program mo<strong>de</strong>, you enter the CALL instructionand at the next address location enter the number for the program memory addresslocation.When the program is executing and the program counter reaches a CALL instruction,the address of the instruction following the CALL's n is stored in a specialstack known as the Call Stack. This Call Stack holds this number as a return addressso that when the subroutine has completed execution, the program counter willknow what location to go back to in the program. This Call Stack can contain up to64 return addresses, so you can have 64 subroutines, each calling another. If youtry to enter a 65th return address, you'll get an error message, ERROR-STACKFULL. The Call Stack is not visible on the CALCULATOR display.RETURN FROM SUBROUTINE INSTRUCTIONRET l#t+li,l1i' or RETURN "1d3"O;'This instruction is used to let the CALCULATOR know when it has reached the endof a subroutine. When the CALCULATOR "reads" this instruction, it pops the lastCALL instruction off the Call Stack and stores it in the program counter. In directmo<strong>de</strong> the program counter is simply restored to the value it had before the CALLwas issued. A message ERROR-STACK EMPTY is displayed if the Call Stack isempty when a Return is executed. In other words, you entered an RET instructionwithout a matching CALL instruction.Programming Instructions and Examples 91


PROGRAMMINGINSTRUCTIONSYou can change the first three lines of your program so that it will become asubroutine.SCROll AREATypeAddresslocationOldContentsNewContentsCommentsLIST i1#·'9i:!.!;'ENTER 0-3071o lii·Ai:t.,;.ENTER 0-3071o Jii'A':"';'DE L J1k·'9i:!,';'000000005858DELEnter program mo<strong>de</strong>.Delete number entry.000000000001STOSTO1CALLMoves contents up.000110Enter a 0 because you don't know wherethe subroutine is going to be yet.0009CLRNow list the program from 0 to 70. If everything is where it should be, then go on. Ifnot, recheck your entries.Now list line 65.SCROll AREATypeBIlD lBIID [Address Old Newlocation Contents Contents Comments0065 STP0065 STP POP This gets the 22222 out of the X register.0066 STP0066 STP PUSH This pushes your total into the X register.0067 STPSingle step to location 70 to begin subroutine entry.SCROll AREAAddress Old NewType location Contents Contents0070 STP58 I:II'II:I-!;I 0070 STP 580078 STP92 Programming Instru ctions and Examples


PROGRAMMINGINSTRUCTIONSAddress Old NewType Location Contents ContentsSTO IilI'm!iH~1 0078 STP STO0079 STP1 11#';':'4;1 0079 STP 10087 STPRET 11~1:!'!il 0087 STP RETURN0088 STPSince your address locations have changed, you must change the addressreferences on your CALL and COTO instructions.List location 1 and make the necessary changes.SCROLL AREAAddress Old NewType Location Contents Contents Comments0001 070 11m,,,,!;, 0001 0 700009 CLRLIS T 11#"3':t'1;' List address location 31 .ENTER 0-307131 111"9';1.';'ENTER 0-307131 11k·jal'MiI0031 5648 flmlHhl 0031 56 480039 COTOSS 111'II:E'!il 0039 COTO SST0040 1711 '1f4;1@;1 0040 17 110048 22222List 0 through 90 to ensure you ma<strong>de</strong> the corre ct changes by typing the LISTcommand.LIST 'iW,¥fjIENTER 0-3071ENTER 0-307190 114"31=M;IProgramm ing Instru ctions and Examples 93


PROGRAMMINGINSTRUCTIONSThe listing on your screen should match the following.0000 CALL0001 700009 CLR0010 ALG0011 STP0012 +0013 (0014 NOP0015 +0016 STP0017 )0018 *0019 STP00200021 PUSH0022 XEQ0023 10031 480039 GOTO0040 110048 222220056 STO0057 00065 POP0066 PUSH0067 STP0068 STP0069 STP0070 580078 STO0079 10087 RETURN0088 STP0089 STP0090 STPTo run the program:TypemD $CLMEM 11InSI;z.!1RUN lii·Si:!.';iUse the values 2, 5, and 8. If a 22222 appears in memory location 0, the programworked perfectly.POP CALL STACK INSTRUCTIONThis instruction is similar to the POP instruction. It pops one return address out ofthe Call Stack and discards it. Use it when you have more than one subroutine in aprogram - if one subroutine is insi<strong>de</strong> another subroutine.94 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSIf your program counter is working through the steps of an "inner" subroutine andyou don't want to go back to the "outer" subroutine, then you program a POPCand the counter will discard the return to the first (outer) subroutine address andthe program counter will go directly to the main program. If you have threesubroutines " nested" one within another, the POPC will discard the address to thesubroutine immediately preceding the one on which the program counter isworking.To see how this instruction works, you'll have to enter another subroutine. This secondsubroutine will allow you to test a number against a number in a memory locationto see whether or not the program counter should return to the first subroutineor to the main program.SCROll AREATypeAddresslocationOldContentsNewContentsCommentsENTER 0-3071ENTER 0-3071INS 'il·A':"';'55 11#"31;t'1;'55 11i·'31 :t.,;.RET litA':f.!;'+007800780078007800790079007900790087008700880088009600960097009700980098STOSTOSTPSTPSTOSTOSTPSTPSTOSTO11STPSTPSTPSTPSTPSTPINSCALLINSNUMoSSTSSTRETURNSTP+Beginning of second (inner) subroutine.Put a 0 in to hold eight bytes (actualnumber to be inserted later).Store 58 + contents of address 0107 inmemory location 1.End of first (outer) subroutine.Put a STP to keep subroutines from"running into" each other.Will add a number you enter to the numberin the X register.0099STPI n execution, insert number you want toenter at address 0107.Programming Instructions and Examples 95


TypeAddresslocationOldContentsNewContentsComments0099STP11111Indicator to show you must enter a numberafter the next instruction.0107STP0107STPSTPYou will enter a number here that will<strong>de</strong>termine whether the subroutine goesback into first subroutine or main program.01080108STPSTPThis adds the numbers in the X and Y registers.01090109STPSTPSTOStores the sum of those 2 numbers inmemory location 3.01100110STPSTP30118STP0118STP65Puts a 65 in X register.012601260127STPSTPSTPXLTTests to see if the 65 in the X register isless than the number stored in memorylocation you specify.01270135STPSTP3Specify you want to compare X registerwith memory location 3. Must be thesame location specified at 0110.RETURN ii4Mi:f.1;'STP 11p·Ai:',';'0135014301430144014401450145STPSTPSTPSTPSTPSTPSTPoRETURNSTP85If true, you'll send the program counterto a location further in the program.If false, return to first subroutine.Separator.Put 85 in X register. This is the jumppoint for procounter.0153STP0153STPSTOStore 85 in memory location.01540154STPSTP1Specify memory location 101620162STPSTPPOPCPops the Call Stack which will skip thefirst subroutine and go back to main programwhen RET is executed.RET 8',Ai:I.';.01630163STPSTPRETURN0164STP96 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSBefore you can run this program, you still have to insert the proper number entriesat 0079 and 0135. List address location 0079.SCROLL AREATypeAddressLocationOldContentsNewContentsCommentsLIST lik,'3I;1.I;'ENTER 0-307179 114·Ai:!·!;'ENTER 0-3071ENTER 0-3071135 ii·Wi:I.I;'ENTER 0-3071135 li4-AI:!";'145 IUtWI:"!;'LIST Jii·Ai:!.';,ENTER 0-3071007900790087013501350143oo5TOooRETURN98145List address location 135.List the entire program.ENTER 0-3071Your list should look like this.00(1£1 CALL0001 70(1009 ClR001£1 ALG(1011 STF'0012 +0013 (0014 HOP0015 +0016 STf'0017 )00180019 STF' *0020 =0021 PUSH0022 X£Q0023 10031 48002'Q'-'GOTO0040 11Programming Instructions and Examples 97


PROGRAMMINGINSTRUCTIONS0048......................l.t!.&....c.tC.0056 STO0057 00065 POP0066 PUSH0067 STP0068 STP0069 STP0070 580078 CALLOO'"'Q0087 STO008'-'IJ 98·0 10096 RETURN009'"' J ISTP0098 +(1099 1111101(17 STP0108 =0109 STO0110 30118 650126 >-~ T0127 30135 1450143 RETURN0144 STP0145 850153 STO0154 10162 POPC0163 RETURN0164 STP0165 ONDISPLAY PROGRAM TRACE INSTRUCTIONThis instruction displays the program memory address location, the contents ofeach location, and all results in the scroll area during execution. It also updates thestack and memory displays continuously. As the program you have entered nowcontains subroutines and the counter is going to be jumping around a bit, you canuse the Trace Instruction to see exactly where you are in the program.TypeBIIiJ $TRACE I#Wi:U;'RUN 11t19l;t.';'If you enter a number less than 7 at address location 0107, you'll see a 65 inmemory location 1 and 58 plus the number you entered at memory location 3. Theprogram compares the two, and "sees" that the 65 is larger.98 Programming I nstructions and Examples


PROGRAMMINGINSTRUCTIONSThen the program counter returns to the first subroutine at line 87, completes thatpath, then returns to the main program at address location 0009. Now, you areready to enter your three entries. If they total 65, you will see 22222 in memorylocation O. If not, the program performs the COTO and returns to address location0011 . Then you enter the second set of numbers.Example:Type6 1!D1D @ at address location 01073 1!D1D @ at address location 00112 I!DID @ at address location 00167 IDI!D @ at address location 0019This does not total 65, so the program returns to address location 0011.Type5 II'ID @ at address location 00111 I!DID @ at address location 001610 I!DID @ at address location 0019This does total 65, so the 22222 appears in memory location O.Now, to see if the other path works properly, you'll enter a number larger than 7 ataddress location 0107.ClM:::Type12 @ at address location 0107This causes the program counter to jump from address location 0135 to 0145 and tostore 70 (58 plus the 12 you entered) in memory location 3 and an 85 in memorylocation 1. It then performs the pope which skips the first subroutine and returnsdirectly to address location 0009, but remember, the number set must now total 85.Type9 @ at address location 00112 @ at address location 001614 1!D1D @ at address location 0019This total is too large, so the program counter loops back to wait for anothernumber set to be entered.Type5 em @ at address location 00113 em @ at address location 001610 mD @ at address location 0019This totals 85, so 22222 appears in memory location O.Programming Instructions and Examples 99


PROGRAMMINGINSTRUCTIONSTURN OFF TRACE (NO TRACE) INSTRUCTIONThis instruction turns off the Trace function and the program will run at normalspeed. When the computer is initialized, it is in No Trace.TypePAUSE INSTRUCTIONThis instruction causes the program to stop for '12 second. You can use this instructionto see what is happening in your program without stopping it completely. Forinstance, you cou Id put a Pause I nstruction at address location 0126 to look at thetotal of the number you entered and the 58 in the program.SCROLL AREATypeAddressLocationOldContentsNewContentsCommentsB1liI #LIST Em.'!DENTER 0-30710067STPEnter program mo<strong>de</strong>.ENTER 0-3071LIST 1.14.ijl,:t'i;iENTER 0-307101260126012601260127XLTXLTSTPSTPXLTINSPAUSEThe insert causes the rest of the addresslocations to move down one location.You can single step to the 0136 addresslocation if you choose.ENTER 0-3071146 114M':!";'013614501361450144 RETURN146100 Programming Instructions and Examples


PROGRAMMINGINSTRUCTIONSRESET INSTRUCTIONRST "'-Ai:'.';' or Emil "This is one of the instructions (Figure 10) that is not held in program memory. Youuse this instruction to set the program counter back to address location 0000 andclear the Call Stack.SCROLL AREAAddress Old NewType Location Contents Contents Comments0144 RETURNEmil II0144 RETURN RST You still have a RETURN atthis location, not a RESET.0000 CALLIf you put a CLM instruction at location 0000, you won't have to type it in eachtime you restart the program. Then, so you won't have to change any more addresslocations, <strong>de</strong>lete the STP from location 68 as shown below:SCROLL AREAAddress Old NewType Location Contents Contents0000 CALLINS lil·I!I:!·!il 0000 CALL INS0000 STPeLM lil·lal:!·!il 0000 STP CLMEM0001 CALLLIST 111·11:!·!ilENTER 0-307168 I1P·'3i:t.'"ENTER 0-307168 li4·Ai:'.!;'0068 STPDE L 'i¥iai~t.!;i 0068 STP DELETE0068 STPProgramming I nstructions and Examples 101


PROGRAMMINGINSTRUCTIONSThe final program should look like the following listing. Check yours against thelisting by pressing ,,1 to stop and start the program.OOf10£«1100(\200lf10011001200130014001500160017001:::0019002f100210022002300240032004f1004100490057005:::00660067006:::0069007f1007800790087008:::009600'37009800'39010701080109011001180126012701350143014401450153015401620163£116401650166£1167Clt1Et1CALLelF:AlGSTP+(HOPt~;TP;.STP=PUSH!•48GOTO11'-1'-1'-"-"-"';;'l...;;.~c.STO\1POPPU:3HSTPSTP58CALL98STO1F:ETUR~jSTP+11111STP=STO .,.,)653145RETURHSTPSTO1POPCF:ETU~jSTPSTPSTPSTP102 Programming Instructions and Examples


The next part of this section contains program examples <strong>de</strong>monstrating the instructionsyou have learned in this section plus the functions and commands in theprevious sections.PROGRAMMINGEXAMPLESUSINGFUNDAMENT ALFUNCTIONSEXAMPLE 1. IN SUMMATION ...This program does no more than add a string of input numbers and subtotal it tomemory location O. You can use it to balance your checkbook, compute totalresistance, or just add long columns of numbers with a little less effort.This program will add whatever plus or minus numbers you enter to memory locationO. It will keep track of how many numbers you have entered in memory location1, and will total to memory location 3 and clear the accumulated amount outof memory location 0 anytime the number "99999" (five 9's) is entered. To continuea new accumulation to memory location 0 after subtotaling, type in:CONT fi"·A':t.!i' or CON l.iiI,,"''''';' or BID @.I H SUf1f1AT I ot-lTypeComments00000001000·-' .t:.000300110012002(1002100'-'·-' .t:..!..00230031003900470048ooc-·- .Jt·005?0058006600670fr'ct',_I00760077OOt,C- ,,_,008600'94009500960104010501060114ALGCLF~CLt1Etl99999STO9'j Jt------i[ Set terminator recognitionin memory 99.STP ------- Wait for inputPUSH:~E~J9~761SUt'11POPSUr'10GOTSI]211 1-------LoopSTPRCL]0SU~J~.CL::-::STO0STPGOTO20STPDiscontinue1------1 [ accumulation tomemory 0 ifinput is 99999.'-----Add 1 to entry count.[Get accumulated sum1--------1 memory location O.1--_____ Add it tomemory location 3fromProgramming Instructions and Examples 103


EXAMPLE 2.IN ALL PROBABILITY, I'M READY FOR VEGASThis problem calculates the probability of your rolling two 4's in five tries usingone die (a half of a pair of dice). To do this, the program uses the factorial andpower functions and is written in RPN.The equation you use to solve this problem is:P (r) - _ --- r! (aubvcw --- )u!v!w! nrr!u!v!w!where r is the number of rolls of the die-in this case 5,n is the number of faces or si<strong>de</strong>s on the die (6),a is the number of faces you're interested in -only one, because you'retrying for a 4,b is the remaining number of faces in which you' re not interested -this case, the other 5,inu is the number of possible outcomes for all rolls (within your pre<strong>de</strong>finedinterest range): You want to know the probability of rolling two4's, so this number is 2,v is the number of other outcomes for all rolls (3),c and ware 0 since in this problem we are not interested in any thirdpossibility.So, the probability of rolling two 4's and three of anything else in a total of fiverolls would be:P (r) = ( 2~~!) (~y (~y120(125)12(36)(216)1500093312.16075102As you can see, the probability is NOT in your favor.104 Programming Instructions and Examples


The example that follows illustrates how to program this problem.I N ALL PROBAE: I l I TY .'TypeI I r'l FBtOY FOF: UEGASComments000000010002000300110012001300140022002300310032004f100480049005700580059006f1006800690077007800790080RPt·~ClMEMelR5 Number rollsPUSHCopy into Y registerFACTAlso generate factorial:'~CHG'lSwap X & Y regi sters~~calculate (5/6)33pm·JEF.:~}- Calculate (1 /6)'pm~ER:~ J Calcu late 5! (1 /6)' (5/6)3:~3 JI------- 3!FACT.... JI-------2!FACT:l~ ------ (2!) (3!)./ -------ResultSTP -------Calculation completePROGRAMMINGEXAMPLESUSINGALGEBRAIC ANDTRIGONOMETRICFUNCTIONSEXAMPLE 3.OFF ON A TANGENTThis program illustrates the trigonometric function, tangent.One of the things that many people say about mathematics above add, subtract,multiply, and divi<strong>de</strong>, is " Sure, trigonometry (for example) is fine in school, but whatdo you do with it in everyday I ife?" Unless you are an engineer or scientist, youprobably haven't seen a sine or cosine since then - not that you thought of them astrig, anyway.Suppose you have a house, and nearby is a large (and heavy) tree that must beremoved. Your problem is that no matter which way it falls, if it is tall (long)enough, it could land on something-like your house, or your neighbor's house.You could hire someone to remove it for you, but that is expensive and they alsocharge by the size of the tree.But you can measure the ground distance from the tree to the closest structure inany direction. Say you measure the distance and it is 50 feet, give or take a fewinches.Programming Instructions and Examples 105


But how tall is the tree? It's not too practical to climb it with a tape measure inhand.You walk a distance of 38 feet from the tree (for example). From where you arestanding, use a level, a protractor and a ruler to measure an angle of 46 <strong>de</strong>greesfrom your sight line to the top of the <strong>de</strong>ad tree.You know you are 6 feet tall, so all you need to use is the tangent function oftrigonometry to solve your problem.tH+,--d, .1~d2:1.. dH ?ftd d,+d2d 2 ?h 6ft8 46 <strong>de</strong>greesd, 38 feetThe tangent of the angle, called theta (8), which you carefully measured is <strong>de</strong>finedas:tan 8 = H/dBut, how do you find d 2 if you don' t know what d 2 is?d= d, +d 2You can compute d 2 using the following equation.tan 8 = h ,and d 2 = h/tan 8d 2tan 461.035530361.03553035.7941327 feet106 Programming Instructions and Examples


d = 38 + 5.79 feet = 43.7941327H = d tan 8 = (43.7941327 ft). 1.0355303 = 45.350152 feet or = 45.35 feetSince the tree height is less than 50 feet, you can safely cut it down without sectioningit.OFF ON A TANGENTfJOOe0001000'-' t:.000300110012002000210022003f1003100'7'=4"'-'004000480049005f100510052006f10061006'-' •.c,0063006400""-' it:.00""''"] I .• 10081008'-' .c,00900091009'-' •• C,..01£100101910291£1301£14010591130114£111501160124TypeALGCLF~CU1EM11111STO5CommentsSTP -------Wait for h entryST~]PUSH·-.....·-1·-'·-.~l.c..c.~STO7STPDEGTANSTO]f-------Store h entry in location 4-------Wait for angle 8 entry-------Compute tangent of


EXAMPLE 4.PUTTING A ROUND "PEG" IN A THREE-CORNERED HOLEThis program illustrates the Reverse Polish Notation Mo<strong>de</strong>, and the square rootfunction.Suppose you want to place an above-ground swimming pool (or hot tub) in a cornerof your yard, and you don't know and can't readily measure the angle at which thefences meet at the corner. You want to know how big a circular pool will fit intothat corner without sticking out past a chosen line (c).b = 27'//'/',/'Pool must not protru<strong>de</strong> past line "c" into yard.What is the largest possible diameter (d) of a circular pool that will fit this space?Find the area (A) using the following formula.A = a+b+c2To find the diameter, use the following.d = 2rSince you don't have a number for d or r, you can use the following equation to find d.d = {2 V A(A - a) (~ - b)(A - c) }d = 15.727668 feet, or = 15 feet, 8'l4 inches.The following program stops three times; once each for a, b, and c, to be entered. Itwill then compute d and display it in memory location O.108 Programming Instructions and Examples


PlITT ING A ROUND PEG IN A THREE -CORt·£F:ED HOLEooeeType~f'HComments0001 CLR000·-' .t:..Ctt1EM0003 STF' Wait for "a" entry00f14 STilJ Save "a" in memory 1000C" ...'0013 STF' Wait for " b" entry0014 STOJ Save " b" in memory 2."\0015.!..0023 STF' Wait for " c" entry0024 Save "c" in memory 3ST~J0025 oJ0033 + Add b to c0034 + Add a to sum in X register0035.-.0043 ~J Divi<strong>de</strong> by 2 to calculate A0044 PUSHPush A into stack for future use0045 PUSH:J0046 k'CL0047~JCalculate A-a term00550056 :>~CHGY0057 PUSH0058 RCL0059~JCalculate A-b term0067~,-,c· ;:


EXAMPLE 5.PUTTING A ROOF OVER YOUR HEADThis program illustrates RPN and DEC mo<strong>de</strong>s and the cosine, arc cosine, power,and square functions.Suppose you want to build a doll house (or a real one, for that matter). You 've readsomewhere that to <strong>de</strong>termine the roof pitch, the amount of rise should be aboutequal to or greater than one-half the run of the rafter (see diagram). Your problem iscomplicated because on the reverse slope the pitch will have to be steeper. Theproblem is that you don't know exactly how steep it will have to be.b = 15'You know you want the peak of the roof to be 8 feet (or inches, on a smaller scale)and that the longest run for your rafters will be 14 feet. Knowing this, you canfigure out what angle alpha (a) is using the following:La = arcsine hlc = 34.849905 <strong>de</strong>greesNow, since 15 feet is the longest board that you have, you can use 15 for length balso. Now you need to know the following:How long is a? What's the peak angle phi (~), and what's the pitch of the reverseslope, angle beta ({3).There is a way to find all of this with only the information you have. The law ofcosines gives us the following three equations:a 2 b 2 + c 2 - 2bc cos ac 2 a 2 + b 2 - 2ab cos {3b 2 = a 2 + c 2 - 2ac cos ~Using these equations, you can find the length of si<strong>de</strong> a, and angles ~ and {3:a = V b 2 + c 2 - 2bc cos a = 8.7364889arccos( a 2 + C 2 -b 2 )2ac= 78.844813 <strong>de</strong>greesL{3 ( a 2 +b 2 -c 2 )arccos = 66.3052842ab110 Programming Instructions and Examples


The following program will cal culate any si<strong>de</strong> if the other two si<strong>de</strong>s and the angleat which they meet are given, or it will calculate the angle when the two si<strong>de</strong>s adjacentto the angle and the opposing si<strong>de</strong> are given.When you run the program it will come to a stop with 11111 in the X register. Whenthis happens and you want to calculate an unknown si<strong>de</strong>, enter in <strong>de</strong>grees the anglethat is opposite the unknown si<strong>de</strong>. At stops 22222 and 33333, enter the two si<strong>de</strong>sthat form this angle.If you want to calculate an angle, enter 99999 and type CON li#yl".1;1 or BDI @to continue. The program will go into the second part of the program and stopagain with 11111 in the X register. At this stop, enter the values for one of the si<strong>de</strong>swhich form the angle to be calculated. At the second stop, enter the value of thesecond si<strong>de</strong> which forms the angle.PUTT I NG A F:OOF Ot!£F: 'lOUR HEADooee0001000'''' .t;,000300040012te130021002'-' .t;,003(10031~F·'" .J.t;,004(100480049005(100510059006000680069007(100710072008(100810089009f10091009·-' w.t;,009301(110102010301110112TypeCommentsCLMEM~'F'~~CLROEG99999STO99CL>~11111STP -------Enter angle or '99999'XEQ]99201I------If entry is 99999, jump to line 201.:~CHGYPOPsm0COS -------Calculate cosine of angle"''-,'-,.-,.-.,-~c.~c..STP -------Enter si<strong>de</strong>:>{CHGYPOPsm1PUSH33333STP -------Enter adjacent si<strong>de</strong>>{CHGYPOPSTO....c.>~CHGY~:C~J 1------Recall adj acent si<strong>de</strong> from location 2~~ -------Multiply the two si<strong>de</strong>s together.-,.c.Programming Instructions and Examples 111


"- ----Type01200121 STO*0122 980130 POP01310139pm.JE~J0140 >~CHG'lCommentsSquare one si<strong>de</strong>01410149POl.JE~J015(1 + Add squared si<strong>de</strong>s0151 :>~CHf"1Square second si<strong>de</strong>'4,-,0152JC'·1··016(1 ."0161 RCL0162 98017(1 >~CHGY01710172 SQRT Computes si<strong>de</strong> a0173 STO] Display result in memory 30174 30182 RCL0183 990191 GOTO0192 32502(1(1 STP Enter si<strong>de</strong> of unknown angle0201 POP0202 STP020""' , .!.l :i~CHGY0204 POP0205 STO0206 1,-,,-,'-1'-1'-'0214 &.&.&.~'-,.t:. STP Enter other si<strong>de</strong> of unknown name022·-'022"7 , ~. >{CHGY0224 POP0225 STO....0226.t:.0234 20242 :*0243 :t0244 333330252 STP Enter si<strong>de</strong> opposite unknown angle0253 :}::CHG'l0254 POP0255 STOJ Display result in memory 30256 30264 RCL0265 .-..::.0273 RCL0274 1.....0282.::.8290 POl·JEF~0291 :>{CHGY0.t:."Q.;. .-.J_ .::.112 Programming Instructions and Examples


TypeComments03(1(1 pm~ER0301 +0302 :>{CHG'y'0303 .-.t..0311 POt·JER03120313 >{CHG'l0314J"0315 ACO::;0316 STO0317 00325 STP0326 Gam03'-'''' t..( 20335 STPEXAMPLE 6.DIVIDE AND CONQUERThis example program uses Algebraic Notation With No Operation Prece<strong>de</strong>nceMo<strong>de</strong> and the Tangent function.I n electricity or electronics the use of resistance ratios to <strong>de</strong>rive a particu larvoltage at a particular point is fundamental. A simple resistive network consists oftwo resistors connected in such a way that one is in series with, and one is in parallelwith the electrical load. More complex networks can usually be reduced mathematicallyto this same form:+R2This fundamental network is referred to as a voltage divi<strong>de</strong>r or just divi<strong>de</strong>r. R, is thetotal resistance in series with the voltage source and the load, and R2 is the totalresistance in parallel with the source and the external load. If the net resistance ofthe external load is high, relative to the resistance of R 2 , then the voltage at point 1becomes for the most part, a function of the ratio of R, to R 2 . Expressed as an equation,it would be:Eout =EinR 2R, + R2Programming Instru ctions and Examples 113


The following program calculates Eout for any combination of R" R2 and Ein .DIllIDE ANDooee0001000'-' .!..0003081108120013002108290030083100390047004'-' c'00490857005800590067006800690070087100790080088100890090009100920100010101020110CONOUERType~GNCLRCLMEM11111CommentsSTP -------Wait for R, entryST?]1"\ ...... - •• -,.-,~&.c.c.c..STPSTO233333STPSTO3:~RCL.-..!..=.~.,(RCL1+RCL2)=STO0STPGOTOSTP1------Display R,-------Wait for R2------- Display R2-------Wait for Ein Entry-------Display Ein------- Calculate R2 * Eint------l[ Loop0JDivi<strong>de</strong> bythe quantityR, + R2(R, + R 2 )Resultant EoutDisplay EoutprogramEXAMPLE 7.PERMUTATIONS!This example illustrates the factorial function and is programmed in RPN mo<strong>de</strong>.When any group of objects is consi<strong>de</strong>red, there are often two areas of interest:1. How many possible sub-groupings can be ma<strong>de</strong> of this number of things if theor<strong>de</strong>r of the objects in each sub-group is not consi<strong>de</strong>red (pE RMUT A TIONS)?2. How many sub-groups are available if or<strong>de</strong>ring within each sub-group is consi<strong>de</strong>redand not allowed to repeat (COMBINATIONS)? (See Example 8.)114 Programming Instructions and Examples


The equation for Permutations is:Pn!(n-r)!P = Number of Permutationsn Number of total itemsr = Number of items in each sub-group.For example, if you have five letters (a, b, c, d, e), how many three-letter groups canyou make of these five, using groups that can contain the same letters, but in a d ifferentarrangement?P n!5!12060(n-r)!(5-3)!2The following program illustrates this problem, allowing you to choose nand r.When the program stops with 11111 in the X register, enter n. When it stops againwith 22222 in the X register, enter r.When the program completes execution, memory location 0 will contain the result.PERt1UTAT IOHS !TypeComments0000 RPN0001 CLMEM000'-' ~ CLF~0003 111110011 STP Enter n0012 PUSH Push entry into stack....0013,..-..-..-...-,l.t:.I:-t:..rC0021 STP Enter r00 ~~ ....·-· >~CHG\'J [ Get rid of0023 POP 222220024 n-r0025 FACT Calculate <strong>de</strong>nomination0026 >~CHGl Swap X and Y register contents0027 FACT Calculate numerator002f: >::CHG·.,-' Swap back X and Y0029 ./ Perform divi<strong>de</strong>0030 [ DisplayST~J0031 result in Memory 00039 STP OnCONT0040 GOTS~J [ Loop0041 .::. Program0049 STPProgramming Instructions and Examples 115


EXAMPLE 8.COMBINATIONS!This problem also uses the factorial function and is programmed in RPN.This example is based on a similar premise. You want to know how many subgroups,each containing a specified number of items, you can make from a largegroup. This time, however, you cannot use the same number twice. The equation tofind the number of possible combinations is:cn!r! (n-r)!where C is the number of combinations,r is the number of items in each sub-group, andn is the total number of items.Using the same data from the last problem (a, b, c, d, e), how many non-repeatedthree-letter combinations can you make from these five letters?C 5!3! (5-3)!1206 (2)10You can substitute your own values for rand n in the following program, or you canuse the above values 3 and 5.When 11111 appears in the X register, enter 5 (or the number you want) and when22222 appears in the X register, enter 3 (or the number you want).CIl'l1:: I NAT IOt-lS !TypeComments0000 RP~~0001 CLMEM000· .c. ...CLI':0003 111110011 STp ·.-------Wait for n0012 PUSH~,-"-,, ,-, ,-,0013&..&.~&..t:..0021 STP -------Wait for r002· .c. ...XCHG'l0023 POP0024 PUSH0025 FACT -------r!0026 STO0027 980035 POPn-r0036-----~[(n-r)10037 FACT0038 RCL116 Programming Instructions and Examples


TypeComments0039 980947 :~ r! (n-r)!004B :>~CHGV Get n0949 FACTn!005(1 n!:~CHG:~: ]0051 r! (n-r)0052 STO0053 0 Display result in memory0061 STP Stop execution;006· .c. ... GOTO [ On continue, loop program.-,0963t:.(Do not clear Memory)0071 STPPROGRAMMINGEXAMPLES FORRADIO NUTSEXAMPLE 9.I CAN'T HEAR YOU-GET A BIGGER ANTENNAThis sample program <strong>de</strong>monstrates a practical use for the following CALCULATORfunctions:Clear Memory (CLM)PUSHPOPGOTOIn ham radio (or CB radio), it may be necessary to calculate the length of a halfwavedipole antenna if you are going to install one. The formula below is for acenter-fed, harmonically-operated doublet with a 5% correction for "end-effect" forfrequencies un<strong>de</strong>r 30 megahertz.0111(10111(ANTENNAIIL = (K - .05K)*492fwhere L is in feetf is in megahertz, andK is the number of half-waves on the antenna.Programming Instru ctio ns and Examples 117


The following program calculates L for any number of half-waves (K) at any frequency(f) for this type of antenna.I CAN' T HEAF~ YOU. GET A B I GGm At'ITH~NATypeComments0000 ALG Set ALe mo<strong>de</strong>0001 CLR Clear stack000'-' .t:.. CLMEM Clear memory0003 11111 Set input K indicator0011 STP Wait for K input0012 PUSH Push entry into stack0013Multiply by 0.050014 0.0;J0022 =End-effect and total0023 Subtract end-effect0824 pop POP to get entry out of stack0025 =Total0026Multiply by 492002749~J0035 =Total0036 PUSH Push-Save partial resulttm7.-........-..,.-.t:.~~,-t:.Set input f input0045 STP Wait for f input,;'0046 Divi<strong>de</strong> by f0047 POP POP stack to divi<strong>de</strong> correctly0048 Total=0049 [ Save L result in memoryST8]005~1 location 00058 33333 Set run end indicator0066 STP0067[ End of run; If CONT typed,GOT?J0068 loop program.0076 STPEXAMPLE 10.FASTER THAN A SPEEDING BULLETThis example program illustrates a practical use for the Mean of X CALCULATORfunction.Many times in radio, you need to find the transmission frequency when the band orwavelength is known or, conversely, to find the band or wavelength when the frequencyis known. Radio waves travel at the speed of light. The equation is a simpleone, but for some reason many people have trouble remembering the form andunits so it is presented here:ccwhere f is the frequency in kilohertz, andA is the wavelength in meters.118 Programming Instructions and Examples


FASTER THAN00000001000'-' .t:..000300040005000600070008001600240025003300410049005(10058006600740075007600840085008600940095010301110112011301140115012301240125013301340135014301440152A SPEED I t·le; BULLETTypeCommentsALe;CLRCU1EtlSTP -------Enter value for f or APUSHCLI., .. ~ -------Clear X registerSTP -------Enter a 1 if A value was entered; 2 if fvalue was entered9BXCHM:~dJProgram checks to see if you enteredI-------value for A9886 -------If true, then jumps to line 0086.>~Q'~JProgram checks to see if you enteredI-------value for f.98135 -------If true, then jumps to line 0135.If number other than 1 or 2 entered at[ line 0006, program displays 33333 In Xregister and stops.33333STPGOT~JL..---TypeBl!D @ to restart program.STPSTP11111STO1300(100 -------Light speed in kilometers per second../POP=ST~JSTPGOTO1STPSTP..., .... .-.. -, ....f-£'~t:..t1:..GOTO94STP1-------Result stored in location O.If you are on a boat with a radio and its maximum range is 300 miles, how far fromthe shore can the boat travel and still maintain contact if there are shore radio stationsalong the coast every 225 miles?EXAMPLE 11.SOS ... I THINK I'M LOSTThis program illustrates a practical use for the foll owing trigonometric functionsavailable in the CALCULATOR:• Arc Cosine• SineProgram m ing Instructions and Examples 119


You can solve this problem easily using trigonometry.r = range of boat radiod = distance between shore stationsx = unknown maximum distance from shoreObserve that the distance to be computed (x) forms one si<strong>de</strong> of a right triangle. Theother two si<strong>de</strong>s of the triangle are r, the boat's radio range, and d/2, or half thedistance between shore stations.If we can find angle theta (e), we can use the trigonometric relationship:sin e = ~ or x= r(sin e)rto find the unknown distance (x). However, we don't know what angle e is-yet.We can find angle e if we remember that we do know the values of d, d/2, and r.The trigonometric cosine function will give us angle e. Using the ratio,cos e = d/2, andCOS-Ie (or arc cosine e)will give the required angle e, which you ca n then use to find the sine of e. You thenuse sin e to calculate the unknown distance, d.S. 0 . S. ... I TH IHK I I M LOST.0000000100020e{13001100120020002100220030TypetLGCLF~CLMHlComments225 ------- Distance between shore stations, d../2 -------Calculate one-half of d.=./ -------Calculate the cosine value.=120 Programming Instructions and Examples


TypeComments0031 DEG Set <strong>de</strong>grees0032 OCOS Find the arc cosine.0033 PAUSE Pause to display the angle.0034 SIN Calculate the sine.003t= ,.' :r, Multiply by the boat's radio range, r.0036 300[ This is the maximum offshore0044 =004t= distance, x.,.'STPEXAMPLE 12.DECIBElS, SHMECIBElS. TURN IT DOWN!This program illustrates the use of the logarithmic base 10 function to calculate thegain in an amplifier.Cain in an amplifier is often measured in <strong>de</strong>cibels to allow plotting a gain/frequencyresponse curve on logarithmic graph paper. The equation for this calculation is:C(db) = 20 (log (Eo) )~ where Eo is the output voltage andE i is the input voltageNote: Eo and E i must be measured across the same impedance.For example, if you measure 20 volts at the output of the final stage of an amplifierand you measure 10 millivolts of the input to its first stage, then the voltage gain is:A = Eo 20 =2 X 10 3 = 200010 X 10- 3This gain expressed in <strong>de</strong>cibels is:Gdb ~ 20 ([Og (:~) ) ~ 20 ([0.[2000]) ~ 660206The following example illustrates how to program this problem:DEC I BEL::;.' SHt"1EC I BEL :;. TUF.:r-iIT Dm·jt·l lTypeComments00000001OO(r2f&J300110012002(10021002'-' £.£.00230031003'-' £.FLGCLMEt1CLR2e -------Eo.•' -------Ratio0.01 -------E,=LOGTE~~J20=STP-------Voltage gainI--------Convert to <strong>de</strong>cibels[Result-------1 completeProgramm ing Instru ctions and Examples 121


EXAMPLE 13.THE EVER-POPULAR OHM'S LAWIn electronics, there are several formulas that are used often. The most general isOhm's Law which <strong>de</strong>scribes the relationships of voltage, current, and resistance ina circuit. It is usually stated:rAMMETERBATTERY+RESISTANCEVOLTMETERE IR where E is electromotive force (or voltage in volts,) I is the current inamperes and R is the resistance of the circuit where the voltage is observed.Knowing any two variables allows you to <strong>de</strong>termine the third by simply rearrangingthe form of the equation.E=IR1= E/RR = EllThis program will calculate anyone of the variables, if the remaining two are supplied.E is entered followed by an i<strong>de</strong>ntifier of 1.I is entered followed by an i<strong>de</strong>ntifier of 2.R is entered followed by an i<strong>de</strong>ntifier of 3.The answer will be stored in memory location 0, with its i<strong>de</strong>ntifier number (1, 2, or3) stored in location 1.A 33333 value appearing in memory location 7 means that the same i<strong>de</strong>ntifier wasentered twice.THE EUEr;:-POPUlAR OHt'l'~;lAl·JTypeComments0004OOttS00130014001500230024RPt·jelF.:CU1Ei'1 ~Type value for E, I, or Rand 1ilIDI, thenSTP ~~ type 1 for E, 2 for I, or 3 for R and EmIlI @.STOSave and display the3 i<strong>de</strong>ntifier number>::C:HGYSwap X and Y registersST~~I, ] [ Save and display thePOPSTP:.. variable value enteredPOP stackWait for second entry122 Programming Instructions and Examples


002e' '..J003300340042004300440052OO£f10061006':'007f10€17100"":'( -'008f100810€182009(100'3100'3.-, . .::..01f1f1010:::0116011701250133013401420143015101520153f11610162016301640172017301740182019f10198019902070208020902170218022602'-1-:''':;'(02350236023702450246TypeComments€IST£J I-------Save and display the i<strong>de</strong>ntifier number.(POP .--_-![Check for mistake same>=:EQ -----' I D entered twice.-------If yes, go to Error Stop.3236STOC"~,::::CHG\'STO4POP+PU::;HC"~,:;::EI]99312,:Hi7~,284pr" ........ L.4RCL.-,.::....STO€IPOPpopPOP7~,:';EQ9'32182STO1STPGOTO0STP3GOm19:::STPSTO5>::CHG'y'STO-------Is this calculator E?(I =2, R=3)-S=O-------Check for zero result.[ If yes, go do multiply,-------1 else do divi<strong>de</strong>1[ Is voltage variable in-------1 memory location 2?If yes go get it.[-------i Else it is in memorylocation 4 .Programming Instructions and Examples 123


TypeComments0247 4(1255 33333f1263~;TO0264 70 .....,·-'~ j ':' POP(1273 POP0274 GOTG0275 240283 STP0284 F,"-"·.'-·L028r:~I 2ff:~3F:Cl0"294 403f12GOTO0303 1510311 STP0312 PCl.-,0313Lfl321PCl0322 4'.'1f(?:3fl.\"0331 STO0332 0034fl 1f134~:GOTO0349 1980357 STPEXAMPLE 14.CHARGE ITThis program illustrates how to use the function of Pi and Reciprocal.The reactance of a capacitor acts I ike a resistance that changes. This change inreactance is inverse to the frequency; i.e. , as the frequency goes higher, thecapacitive reactance gets smaller unlike inductive reactance. The formula forcalculation of capacitive reactance (Xc) is:Xc = 1 ,where f is the frequency in hertz and c is the capacitance in farads.2rrfcFor example, Xc for a capacitive of 1 microfarad at a frequency of 7.14 megahertz is:Xc = 1/(6.28) (1 X 10- 5 ) (7.14 X 10 6 ) = .002290608 ohmsCHARGE ITTypeComments00020003001100120013RP~~elRClMHl11111STP-------Wait for frequency input:>~CHGY11111124 Programming Instructions and Examples


TypeComments0021002'-' ~~00"2300240025003300340€f,e~_'0036002-:>·ff~PO:' v '_'00390047fll55005600570065+STP -------Wait for capacitance input:>(CHGYPOP....t..PI:r.:l~:r.RECIP -------Generate reciprocal1-------Display result, Xc' in memory O.ST~J33333STPGOTO0STP-------l[ Indicate completion. To loop program,press Em @.EXAMPLE 15.PERSONAL MAGNETISMCoils of wire or inductors as they are called, exhibit a form of resistance whichchanges its value when the frequency of the voltage and current appl ied to themchanges. This property of coils is called reactance and the equation to calculate itsvalue is:I nductive reactance, XL = 2rrfL, where f is frequency in hertz and L is the inductancein henriesThe following program will calculate XL for any inductance at any frequency.For example, the reactance of a coil having an inductance of 7 millihenries at a frequencyof 300 kilohertz is:XL = 2rr (7 X 10- 3 ) (300 X 10 3 ) = 6.28 (2100) = 13194.689 ohms or13.194689 Kohms.PERSONAL t'1AGt'~ET I St1TypeComments0000 F-'Pr~CLF.~OO€H000'-' ~ CU1Hl0003 111110011 STP -------Wait for frequency entry0012 :>(CHG'y'0013 1111100:-'. t..! +0fr"-'£~23 :>;CHGYf1l::124POPoo·-·e /:'._1..2- .......t1I!f~,,;,PI~~ STP -------Wait for inductance inputProgramming Instructions and Examples 125


TypeComments0034 :~~OO"7C" """, ._1 t:..,0036·1··0037 STI~IJ f------Oisplay result, XL in memory0038 110046.,.,.,77--,,_:,-,-,,/'-'-------Indicate end of runOOC"·


TypeCommentsefr2900300031f{132SQUARE ------- Square net reactance+ Add R2SG!F:TTake square root of sumSTPComplete, result in X registerEXAMPLE 17.SAY IT WITH VECTORSThis example also illustrates the square and square root functions and is solvedusing the RPN mo<strong>de</strong>.The case of impedance calculation, when resistance and reactance are connectedin parallel, is given by the equation:Z=RXI n this case, the net impedance must be consi<strong>de</strong>red as inductive or capacitive to<strong>de</strong>termine the sign of the X term in the numerator, which is not squared.The following program calculates the total impedance for a parallel circuit shown as:Xc = 50XL = 150R = 75Remember that the formula for Xc and XL in parallel isX = XLXCXL -XCProgramming Instructions and Examples 127


So this must be substituted for X in the equation for Z. The resultant equation is:This is the equation used by the program.SAY IT HITH UECTOF~STypeComments000(1000100020£1€f300110012001300210022((123002400250£133£10340£1350043£10440£1450046004700480£149£105700580069007(1007E!0079008(1£108100'c:20083~H'iCU"lHlClF~l1111-------Set enter XL indicatorWait for entrySTPSTC 11Jf--. ------Store XL entry in location 1PoP------Get rid of 11111PUSHS\)UAF~E -------Square XL entry22222 -------Set enter Xc indicatorSTP -------Wait for entrySTL:...-~_I,J I------Store Xc entry in location 2>(CHG'r'POP -------Get rid of 22222PU:3HSOUARE -------Square Xc entry:'(CHGlpel 1 Jt-----Get memory location 1 content.-------SubtractXL -XCSOUAF~E33333 -------Set enter R indicatorSTP -------Wait for entrySTOJ 3 I------Store R entry in location 3POP ------Get rid of 33333SfJUARESquare R entryt -------Multiply R' times (XL - Xcl'STl 4-IJI------Store R' (XL -XC)' into location 4POP128 Programming Instructions and Examples


TypeComments0fr920(193009401(f2(11£13(1104£111201130121(1122€1123(1124£1132(11330134(1135(1143014401450153t -------Multiplies to get XL'XC'SU~JPOP);,,-.,,·.L.L2rll-"r:.'.L.,.'.J.'.\'.I-------Adds this product to contents of location 4'J,-.\",------R(XL XC)F~CL4SClF.:TSTO0 -------z, the total impedanceSTPGOTO(1STPEXAMPLE 18.SIDE BY SIDEYou can solve for the net reactance of series and parallel connections of reactiveelements, inductors, and capacitors by using the equations:Series:Where XL = inductive reactanceXc = capacitive reactanceParallel:XL XcXL -XCThe following program will calculate the parallel circuit case since it is the morecomplex.When executive stops with 11111 in the X register, enter Xc- When the programstops again with 22222 in the X register, enter XL The third stop is completion ofthe calculation and the result is displayed in both the X register and in memorylocation O.Both XL and Xc entries must be in compatible units; i.e., ohms (or both in Kohms, orboth in megohms, etc.)If XL = 150 ohms and Xc = 50 ohms, the series case is simply 150 - 50 = 1 00 ohms.What is the parallel solution?X =(150)(50)150-5075 ohmsProgramming Instructions and Examples 129


SIDE BY SIDE(1~)f10£1£1(11£1(f~12(1003£lOll(1012(102(10£1210(122f1(r,23(1024£1£132£1£133£1(141£1042£1£143TypeCommentsCU1Ei1 AlGJ 1------Set-u pCLR150 -------XLt:~ Xc=,..150 -------XL50 -------XC;.= -------Net reactanceSTF'EXAMPLE 19.WIRING YOUR PADIn electrical or electronics work, calculation of total resistance, RT, can be a pain ifthere are more than two resistors to consi<strong>de</strong>r. RT is <strong>de</strong>fined as the reciprocal of thesums of the reciprocals of the parallel resistances. If you didn't quite catch that,look carefully at the following equation.1RT= ------------~+~+~+R, R, R3R,The program that follows calculates the total resistance for any number of parallelresistors and displays RT (total resistance) in memory location O.As you enter resistances, memory location 1 keeps t rack of the number. Since thestack is being used, duplicate entries require only PUSH (Emil [) and a CaNT(Emil @).You can get out of the loop by entering a O.130 Programming Instructions and Examples


The counter value in memory location 1 is then used to keep track of how many inputresistor reciprocals must be calculated and summed.A sample run might be to calculate the total resistance of a parallel network ofthree resistors.R, = 5000 ohmsR2 = 25000 ohmsR J = 100000 ohmsRT= ______ 1 ______ 4000 ohmsNotice that RT is less than the smallest; this is always true of parallel-connected circuitelements (except for capacitors.) This same program can be used for inductorsin parallel and capacitors in series.TypeComments£«1000fl1£1£1£12£«13£1004000530130021(11.322003(1(103::::0039(1£14(100480(149(1£15(1005E:(1059(1(16(1(1061(1(162(1(17(1(lf171€1l179ff0E:7(108::::(1(IE:90£1970135(11363114(11150116RPtielF.:CU1Er-1STP -------Wait for resistance input>::m If input is 09959 -------Co to calculate RTF.fl11+STC!1Count inputsf-------- into memorylocation 1POP -------POP out counter valueLoop, accepting3 inputs~;TPGOmPOP -------POP out input ending O.RECIPSUi'1 ][ and add it to memory£1 location O.RCl_ 11 Jt--------t[ Reduce resistor inputTake reciprocal of a resistancecounter by 1::O::EI) -------AII resistances input99 summed?125 If yes, go take rec iprocalsSTOof the sum for RT1 else, save new counterPOPvalue andGOTOloop till done59Programming Instructions and Examples 131


0124(1125£112601340135£11360144£1145TypeSTPRCLCommentsGet summed reciprocals of(1 resistance andF.~ECIP[ calculate reciprocal ofSTO ~ sum for RT·Display RT inputoSTP memory location O.STPEXAMPLE 20.HEAT WAVEA transformer with a resistance of 1.3 ohms when it is cold experiences a rise intemperature after some period of operation. The warm temperature of atransformer is proportional to the change in its resistance. The equation is:234.5 + T h Where Rh, Rc are the hot and cold resistances, and T h, T c234.5 + T c are the hot and cold temperatures.Rearranging the equation to isolate T h gives:T h = Rh(234.5 + T c) - 234.5 = 40.96923 <strong>de</strong>greesRcThe program that follows calculates Th for a transformer, which has been in operationin a room with an ambient temperature of 25°( long enough for its resistanceto rise from 1.3 ohms to 1.38 ohms.Type(((lll(10(11((1(12((103£1(111£1(112(10130021(10"22£103(10031(1039£1040(1041(1(142((143AlG~iCU1Et'1elF.:234,5PUSH+1.38, "'].1 ..... 'POP=STP132 Programming Instructions and Examples


EXAMPLE 21.THE AIR IS GETTING THICKThis program, written in RPN, uses the Natural Logarithm Function.The work done during an isothermal energy change in a gas is given by equation:W = w*R*T*LN(r) W work in foot-poundsR gas constant in foot-pounds compatible unitsT temperature in <strong>de</strong>grees Fahrenheit, absolutew weight of gas in poundsratio of expansion, i.e., final volume divi<strong>de</strong>dby initialLN natural logarithmIf 3 pounds of air at 32°F and at atmospheric pressure are compressed to 4 atmospheres,what is the work done during compression?r = V, = PI 1P, 4W = w*R*T*LN(V.)= (3) (53.3) (460+32) (LN(V.)= -109060.89, the minus sign indicates compression.The following program calcu lates this resu It:THE AIR IS GETTING THICK .TypeComments000200(13£1011001900270035€1036€1f1440052£1053£10540055€1056£1£157RF'~~CLt1EMCLR3-------Number of pounds of air (w)53 . 3-------Gas constant (r)46"-~"'J ..x:.. 1-. ------460 + 32 equals absolute temperature+l-------New volume4 Old volume.' -------Formation of ratio (r)U~-------Natural log of ratio:i::Multiply by temperature:l;Multiply by R:\; -------Multiply by wSTF'Run completeEXAMPLE 22.WINDING IT UPRadio equipment and other electronic equipment use inductors in filters,solenoids, coupling circuits, and in other applications The inductance of a givencoil <strong>de</strong>pends on several factors; the mean radiu s of the coil (a), the winding length(b), the winding <strong>de</strong>pth (c), and the number of turns (n). The equation for the inductanceof a multi-layer, air core coil is:Programming Instructions and Examples 133j


• ~b~ ~cat----t~FORM0.8a 2 n 2L = ____ _6a+9b+10ca,b, and c in inchesL in microhenrysFor example, an air core coil with 36 turns and dimensions of a = .5 inch, b = Ainch, and c = .5 inch with a form radius of .25 inch will have an inductance of:L(0.8) (.5)2 (36)2= 22.244828 microhenrys6(.5) +9 (A) +10 (.5)The program solves this problem for an a,b,c, and n. When it stops with 11111,enter a. On each successive stop (22222, 33333, etc.), enter the next variable inor<strong>de</strong>r (b,c,n). Remember, these units are in inches, except for n, which is in turns.l~HmINGIT UP.Type00(1(1f«'1O€102£10030011(1012£10130£r,21(1022£1£13(1(1031£1£132£1l14(10041£10420050£1f151£1059Of16f1ALGHCU1Et-lelF.:11111STP~;TO16=PUSH22222STPSTO29=PUSHl134 Programming Instructions and Examples


Type(1061 '"1---- ....,.j':',.j':;0(169 STP0(17f1 STO00717oJ•• t~(1(179 ,';',(1(18(1 10(1(18€: =(1(189 +(1(19(1 POP(1(191 +(1(192 POP(1(193 =(1(194 PUSH£1095 ~:CL(1fr361 •£11(14 SQUARE.j,(11(15 .".(1106 o .:.. V(1114 =(1115 PUSH0116 44444(1124 STP(1125 STO0126 4(1134 SQUAF.:E0135'l' .\,£1136 POP0137 =(113::: STPf1139 >:CHGY(114f1 ,(1141 POP(1142 =(1143 ~;TOf1144 (10152 STP(1153 GOTO(1154 (10162 STPPROGRAMMINGEXAMPLESUSINGSTATISTICSEXAMPLE 23.HOW MANY MILES PER GALLON DOES YOUR CAR GET?This example problem <strong>de</strong>monstrates a practica l use for the following CALCU LA­TOR functions:• Correlation Coefficient• Slope• Standard Deviation of Y• Mean of Y• Clear Statistics Mo<strong>de</strong>• Absolute Value• POPProgramming Instructions and Examples 135


In these days of energy consciousness and high gasoline prices, it might be advisableto keep track of how efficient your auto is with the fuel it uses. It is simpleto do, but does require that you keep track of how many gallons of gasoline youpurchase and the mileage from your odometer at each purchase. Knowing whatthis usual number is can alert you to potential problems too; many problems showfirst as a drop off in fuel use efficiency. To calculate your usage, you must fill thetank each time you buy fuel and use this number of gallons (g) as a divisor into thecurrent mileage (M 2) minus the mileage reading at the previous fill up (M,). The formulayou need to use is shown below.e = M 2 -M,gObviously, this value is not exact, since the <strong>de</strong>gree to which your tank is filledvaries with the cut-off point of the particular gas pump used each time, but it is anindicator in that it should not be radically wrong. When all of these values areaveraged over a period of time, the average value is close to a true value.When this program has completed execution, the following information will bedisplayed.Y register = Correlation CoefficientThis is an indicator of how well the data fits the straight line or linear curvewhich is its trend line. The nearer this value is to 1, the better the fit and themore meaningful the result. If this value is less than .5, then you should probablyplot each point on graph paper and see what the curve actually lookslike.Memory location 0 = The median or average value of all y terms.For our specific problem, this is the average miles per gallon value.Memory location 1 = The slope of the trend line, or linear curve.This number represents how the Y values (miles/gallon) tend to change in respectto the X values, or number of entries, in this case. A 0 value means thatthere is no trend; that the average from beginning to end is the same. Any positivevalue indicates an increasing trend for fuel efficiency and any negativenumber indicates that fuel efficiency is worsening; i.e., miles per gallon is failingoff. The larger this number is, the steeper the trend (the faster it's gettingbetter or worse).Memory location 2 = The standard <strong>de</strong>viation of the data from the trend line.If this is a large value, it means that some data values, at least, were very farfrom the general trend line, and the data points should be plotted on graphpaper and exam ined for entry errors or actual sign ificant <strong>de</strong>viation. Eithersomething very good or very bad happened, or you ma<strong>de</strong> a mistake.~ twfy' MILES PER GtLLON DOES YOUR CAR GET?TypeComments00(10(1(1(11t1l::.102(1l::.""(13(1(1040(112(1(113(1(121flfJ22(1(123CU1Et'l-------Clear MemoryeLF.:Clear StackRPHSet RPN mo<strong>de</strong> to use StackCL~;TATClear statistic counters and set9'9999 statistic mo<strong>de</strong>STC!Generate and save an input terminator99 recognition character in memorySTP location 99:x:~9---, L-___ Type in mileage, M,.;:1;:1 ! Check to see if this is end of entries.136 Programming Instructions and Examples


1--. ------iTypeComments~1f131~1039~1~140~1I~14:::0056~1057~fJ5:::~1f166(1067(1(16:::~1069~1f170((171~1079(1(18(10081((182(109~1~10'.3:::OC199(lW70115~11160117~1l25(1126~1127~1135(11360137(113:::01460147014~:0156(1157(1158(116601670168(11690177(117~:0179(1180018801:::9019(1(1198019902f17(12(180216((:17(r225~12260227(123580 -------If yes, go to ending sequenceR~~ ]otherwise use memory location=-'098 to count the number of1 periodic fuel efficiency+ -------Terms computed will use as statisticSTO"X" term of X, Y pairs93POP ------- POP stack, get rid of counter in X-------Compute M ,-M,~;TP -------Type in ga ll ons (G) of gasoline/_---, purchased at mileage M,.GOTO I '--___ Divi<strong>de</strong> M , -M, difference by gallons:21 generate e term.STP '----- Loop to get next M " M ,POPEnding sequence-POP stack:-::EOCheck for terminator value from stack.99136 If yes, go do final totaling and displaying.F,':l ~Else now use memory location98 98 as a " down" counter to keep1 " X" terms and " Y" (computed) terms- in proper or<strong>de</strong>r.STO98SPLUS ------- Do statistic pair .summingGOTO ]Loop to get next X, Y pair.80STP'It·~At:.l ] [ Final totaling and displaysTuDisplay median or overall averageo value miles per gallon In memory location O.SLOPE ][ Get slope of linea r curve and display it inSTO memory location 1.1'lSD JI--------i[Get standard <strong>de</strong>viation value andSTO display it in memory location 2.-.,:;.F.: -------Get correlation coeffic ientAS::;RClSTPClF: -------Put 99999 in X register to indicate endF,'C~ ] [ Get calcu lated median value\:.1 from memory location O.cC~~~~ ]Clear memory and reset statistics counters1~;TO --------l[ Set memory location 9898 with 1 for median value.POP -------POP stack, get rid of 1.99999 ------t[ Put terminator value in~;TO X register and memory location 99.99::::CHG''t' --------l[ Exchange X and Y registers to getGOTO ----, terminator first in stack .'-----Loop back to stop for first new input M,.. -, i':;'1STPProgramming Instructions and Examples 137


EXAMPLE 24.IS Si>EED COSTING YOU MONEY?This program illustrates the following statistical functions:• Clear Statistics Mo<strong>de</strong>• Mean of Y• Slope• Standard Deviation of Y• Correlation CoefficientIt also makes use of the Absolute function.You might want to check out what happens to your auto's fuel efficiency as a functionof your average speed of travel. It does require more effort to gather the rawdata than just religiously making notes of travel duration for every trip (even if thecar is not moving, but has the motor running). If the car is using fuel, it counts! Collectall of the data in groups associated with each time period between fill-ups.Find an average speed for each period by adding all of the trip times together anddividing this number (expressed in hours) into the mileage between this fill-up andthe last. This gives you an average miles-per-hour value for each interval betweenrefuel ing stops.Use this value as the X term in the following statistics program, and use the milesper-gallonvalue as the Y term, for each interval pair. The resultant Y median inmemory location 0 will be your averag.e fuel efficiency for the range of speedsused.The slope in memory location 1 will indicate that fuel efficiency falls off at higherspeeds if it's minus, and its magnitu<strong>de</strong> will be an indication of how fast the efficiencychanges as a function of speed. If, however the slope is plus, then you actuallyimprove your fuel efficiency at higher speeds for your auto.The standard <strong>de</strong>viation value in memory location 2 and the correlation coefficientare indicators of how well a straight line or linear curve actually fits the data; if thefit is less than .5 or the standard <strong>de</strong>viation is large, you may actually want to plotthe data on graph paper and see what the real curve looks like. You can also <strong>de</strong>terminehow much scattering there is of the plotted points.As an example, the program was run using the following as data:YXMPH656055504540353025MPC242628303131 .531.331.231 .1vsThe entries can be entered in any sequence aslong as the pairs are kept associated.138 Programming Instructions and Examples


The resu Its were:Y Median (average MPG) 29.34Slope ( ~~) .1875YSDR.98757.00E- 01IS SPEED COSTIHG YOU r·1l1·lE'"(?TypeComments(10(1.) F.:PH(10(11 CU1Et"10002 CLR(1(103 CLSTAT0(104 99999(1(112 STO(1(113 99(1(121 11111 ------- Set indicator for Y term entry({129 STP -------Wait for miles-per-gallon entryf103~1 >~EG!(1(131 99-,.,",\(1039Ie..(1(147 >~CHG'i004t: 111110'a56+ -------Set indicator for X term entry(~J57STP -------Wait for speed (miles per hour) entry005t: :)~CHGYo;;J59POP -------POP out indicator(1(16(1 SPLUS -------Sum term pairs.(1(161 CD((1(162 GOTO0063 4'"' 0(1(171 STP(1(172 'It'1EAN-------Generate median value, miles per entry0073 STO -------Display in memory 00(174 0£1082 SLOPE -------Generate slope, MPG vs. speed~1f183 STO ------- Display in memory 1({184 1(10'32YSD -------Generate MPG standard <strong>de</strong>viation(1(193 STO ------- Display in memory 2(10'34 .-.e..f11(12 R -------Get correlation coefficient01(13 ABc .J"';,-'-..1",'-.) -------Indicate run end.0104 77""7'"0112 STP -------Loop program by typing CON INA,:O;I(1113 GOTOf1114 0l1122STPProgramming Instructions and Examples 139


EXAMPLE 25.IF JOHNNY GOT AN "A," WHY CAN'T HE READ?This problem is a variation of the gra<strong>de</strong>s problem presented in the Statistics Section.Thirty-five stu<strong>de</strong>nts in a class are given an examination and gra<strong>de</strong>d on an absolutescale of 0 to 10. The entire class did very poorly on the exam ination and the instructor<strong>de</strong>ci<strong>de</strong>d that perhaps the test was too hard. The instructor <strong>de</strong>ci<strong>de</strong>d to modifythe gra<strong>de</strong>s by applying a "curve" to the gra<strong>de</strong>s. He figured that by taking the classmedian gra<strong>de</strong> and then making a grading scale relative to it, he could assurehimself that most of the class would pass. He <strong>de</strong>ci<strong>de</strong>d that a " B" gra<strong>de</strong> would befrom the mean to one standard <strong>de</strong>viation above, an " A" wou Id be from one standard<strong>de</strong>viation above the median (mean) to two standard <strong>de</strong>viations above, and anA + would be anything above two standard <strong>de</strong>viations above the median. Coingdownward, he <strong>de</strong>ci<strong>de</strong>d that a "C" would be anything below the median to one standard<strong>de</strong>viation below it, a " 0 " would be anything below one standard <strong>de</strong>viation totwo standard <strong>de</strong>viations below, and an " F" would be anything below that. The testscores and the original gra<strong>de</strong> assignments looked I ike the table below:Number of Number of Original Gra<strong>de</strong>Correct Answers Stu<strong>de</strong>nts Scale0 01 42 63 124 515 7 F6 0 07 1 C8 0 B9 0 A10 0 A+Where is the median?What does the new scale look I ike?The program below illustrates a solution for this problem. The new scale will looklike this:Number ofCorrect Answerso12345678910Number ofStu<strong>de</strong>ntso461257o1ooNew Gra<strong>de</strong>ScaleFoCCBAA+j140 Programming Instructions and Examples


The actual results are:X mean - 2 SDs = .45539411X mean - 1 SDs = 1.8562685X mean = 3.2571429X mean + 1 SDs = 4.6580172X mean + 2 SDs = 6.0588916FDCBAA+IF JOHNt'N GOT AN A J ~.JH'y' CAW T HE F~EAD?TypeComments(1000 A'I...G€l(1(11CU1H1((l€l2ClF.:(1303 CL~;TAT0((14 1 ------ Score level 1(1012 PUSH0013 SPLLrs ------1 stu<strong>de</strong>nt~X1l4PUSH[1015 SPlU~; ------2 stu<strong>de</strong>nts(1016 PUSH€l017 SPLUS ------3 stu<strong>de</strong>nts(1018 PU~;H0019 ~;PLUS ------4 stu<strong>de</strong>nts.-.~X120"-------Score level 2(1(128 PUSH((f29SPLUS ------1 stu<strong>de</strong>nt0030 PUSH(1031 SPLUS ------2 stu<strong>de</strong>ntsf1032PUSH[1(133 SPLLrs ------3 stu<strong>de</strong>nts0f134PUSH:,)035 SPLU~:; ------4 stu<strong>de</strong>nts(1(136 PU~;H0037 SPLUS ------5 stu<strong>de</strong>nts€l03:::PUSH(1(139 ~:;PLUS ------6 stu<strong>de</strong>nts0f14f1 3 ------Score level 3(1048 PUSH(1049 SPLUS ------#1 stu<strong>de</strong>nt(105(1 PUSH(1051 SPLUS ------#2 stu<strong>de</strong>nt01352 PUSH~1053 SPlUS ------#3 stu<strong>de</strong>nt(1054 PUSH(1055 SPlUS ------#4 stu<strong>de</strong>nt(1056 PUSH(1[157 SPlUS ------#5 stu<strong>de</strong>nt[105:3 PUSH(1059 SPLUS ------#6 stu<strong>de</strong>nt006€l PUSH0061 ~;PLUS ------#7 stu<strong>de</strong>nt0062 PUSH~1063 ~;PLUS ------#8 stu<strong>de</strong>ntProgramming Instructions and Examples 141


TypeComments0064 PUSH~X165 SPLUS #9 stu<strong>de</strong>nt0066 PUSH0067 SPLUS #10 stu<strong>de</strong>nt00f'=' ''-'PUSH(1069 :;PLU; #11 stu<strong>de</strong>nt€1(17(1 PU:3H(1(171 :;PLUS #12 stu<strong>de</strong>nt(1072 4 Score level 4(1(18(1 PU::;H00E:i SPLUS #1 stu<strong>de</strong>nt(1082 PUSHf)(183 SPLU:; #2 stu<strong>de</strong>nt(10f:4PUSH~1085 SPLUS #3 stu<strong>de</strong>nt0(186 PU:;H(1087 SPLU:; #4 stu<strong>de</strong>nt(108E:PU::;H0089 SPLIJ::; #5 stu<strong>de</strong>nte(109€1 Score level 5-'0098 PUSH(1099 SPLlIS #1 stu<strong>de</strong>nt€l10(1PU~;H(1101 SPLUS #2 stu<strong>de</strong>nt0102 PU:::H€1103 SPLlIS #3 stu<strong>de</strong>nt(11(14 PUSH01(15 SPLIJ:; #4 stu<strong>de</strong>nt(11£16 PUSH01£17 SPLUS #5 stu<strong>de</strong>nt(11(18 PUSH(1109 SPLUS #6 stu<strong>de</strong>nt011(1 PUSH0111 SPLUS #7 stu<strong>de</strong>nt(1112 7 Score level 7(112(1 PU:;H~)121 SPLUS # stu<strong>de</strong>nts€1122 ;.::r1EA~1 X mean£1123 PU:;H Save it(11240125 :>::SD X mean - 1 SO€l126 =(1127 PU:::H0128£1129 :>::SO X mean - 2 SO's(113(1 =(1131 :1~CHGY Put them in ascending or<strong>de</strong>r0132 PUSH(1133 :1::t1EAN X mean(1134 PUSH(1135 +(1136 ::-::SD X mean + 1 SO(1137 =(1138 PUSH142 Programming Instructions and Examples


TypeComments0139 +0140 :i::SD X mean + 2 SD's~1141 =~1142 STF' Execution complete0143 GOTO On continue, loop and0144 kl restart program~1152 STPEXAMPLE 26.ITERATIVE-AGAIN AND AGAINThe preceding example took quite a few steps. However, with a little forethoughtand some knowledge of the looping capability of the CALCULATOR Diskette Program,you can reduce the number of steps consi<strong>de</strong>rably Using the same problemregarding the stu<strong>de</strong>nt's poor test results, you can reduce the number of steps involvedusing an iterative loop and the test function.The program, on execution, shows a 11111 in the X register and waits for you toenter the first number of correct answers-in this case, 1. Then press EmD @. A22222 then appears in the X register. When it does, enter the number of stu<strong>de</strong>ntswho only got one question correct- in this case, 4. Then press mil @. When11111 again appears in the X register, enter the second score (2) and press mil @.Continue entering until you have all the test scores and the number of stu<strong>de</strong>ntsthat ma<strong>de</strong> each. (If no stu<strong>de</strong>nts ma<strong>de</strong> a score, you don't enter it.) When you finishyour entries, 11111 will again appear in the X register. Enter 99999. This notifies theprogram that there are no more entries. The program will display the results of itscalculations in the stack in <strong>de</strong>scending or<strong>de</strong>r.When you have completed this program's execution, compare the results withthose in the preceding problem. They should be the sa me.RESUL TS: X Mean - 2 Standard Deviations 45539411X Mean - 1 Standard Deviation = 1 .8562685= 3.2571429X Mean + 1 Standard Deviation = 4.6580172X Mean + 2 Standard Deviations = 60588916I TERAT I I)E --AGA I NAND AGA I ~iTypeComments(1000 HLG00(11 CU1Et1 Clear memory~10(12 ClSTAT Clear and set statistics(1003 99999 Rem ember entry termination0011 STO character(1012 9S(10"2(1 ClF.:£10"21 11111 Set entry i<strong>de</strong>ntifier0029 STP Wait for score va lue003(1 >~Q Is this 99999, t he entry(1031 98 loop terminator?£1039 119 If yes, go calculate result(1047 PUSH else, save entry in stack.Programming Instructions and Examples 143


((1480049005700580059((16(10(16100620063£1071007200730074£1(175£1£176£100400050093£10'94£110"2£111001110119012£1£1121€1122f1123012401~'5(11260127£1128£1129013(1(11310132013301340135£11360137£11380139(114(1£1148TypeCommentsPUSH22222 -------Set entry i<strong>de</strong>ntifierSTP -------Wait for number of stu<strong>de</strong>nts attthis score.POPForm a calculation loop counter.= Counter = (X*n)CHGSGNSTO -------Save counter value1POP-------Get counter off stackPUSHPropagate X value into stackSPLUSStatistical summationPUSHPUSH X value into stackSLrr'lCount down counter1~'CL -------Get current counter value1>~EG! -------Check if counter is zero9920 [ If yes, loop back forGOTO,-------- L- next Input71 ~Else, loop-keep summing>~t'lEAt-lX meanXSD -------X mean -1 SO=PUSH:.{SD-------X mean-2 SOs=:.~CHGY-------Swap places, XM-2 SOs on bottomPUSHPUSH into stack:.{t1EAt·lX meanPUSHSave it+){SD-------X mean + 1 SO=PUSH+:":SO -------X mean + 2 SOs=STP -------Stop, all doneGOTOOn CONT, rerun program£1STPPROGRAMMINGEXAMPLESUSINGINTERESTEXAMPLE 27.BEFORE YOU BUY THAT FURNITURE ON TIME...This program illustrates the use of the CLINT function.Whenever you buy anything on time via an installment credit plan, you shouldknow exactly what your true interest rate is . The CALCULATOR cartridge has financialcalculations built into it. so you don't have to know the equations to use them.144 Programming Instructions and Examples


For those who are interested, however, the following program makes use of theequation:i=2nfA(p+1)i = interest raten = number of payments per yearf = finance chargeA = Amount actually financed (price minus down payment)p = Total number of scheduled payments.The program example operates on a problem which supposes a $6000 price with$550 paid down and $5450 financed. The term of the contract is 5 years and thepayments are $114.50 per month - every month. The true interest rate on the creditamount is 10.25 per cent (approximately).BEFORE YOU BUl THAT FUF:t·HTlIF.:E ON THE ...TypeComments000(1 ALG(1001 EHTEF:00tf2CLINT0003 STP ------- Enter full cash price00040005 STP ------- Enter down payment ma<strong>de</strong>(1006 =00(17 STO000::: 10016 STP -------Enter total number of months of contract0017 :~(101 f: PliSH(1019 STP ------- Enter monthly payment amount002(1 =002100'-"-' t:..c..RCL0023 10031 = -------Total finance charge0032 :!~0033 STP ------- Enter number of payments per year(1034 =00~t::"..!r ... 1 :1:0036 ....t:.0044 =0045 STO."\(1046 t:.(105400€'"\ 't:. +006'.'7POP0064 =0t165:i:0066 RCL(1067 1 •(1075 =(1076 PU~;H0077 RCLProgramming Instructions and Examples 145


TypeCommentsOO~1-1IC> 2(1086 .'r·(1£187 pop POP stack back out.0088 :>;CHGY Rearrange for correct divi<strong>de</strong>.0089 =(109(1*(1091 100 Express as percentoo.~.~J_'=010(1 STO True interest percentage is0101 0 in memory location O.0109 STP(111(1 GOTO Loop back on CONT; rerun program(1111 00119 STP0120 STPEXAMPLE 28.WHAT Will IT BE WORTH?This program uses the following financial functions:• Clear Interest Mo<strong>de</strong>• Present Value• Number of Periods• Interest• Find and Enter Mo<strong>de</strong>s• Future ValuesAnyone who is still able to have money invested in this time of high inflation isnaturally very interested in how fast it is growing. This program takes any amount,over any number of months using any specified annual percentage rate (consi<strong>de</strong>redto be compounding periodically) for any stated interest compounding period (inmonths), and calculates the future value at the end of the investment period andthe earned amount.This example uses an amount of $8000 invested for a period of 24 months, at a 7percent annual interest rate, compoun<strong>de</strong>d quarterly (every 3 months).l~HA T l-H LL IT BE l·jORTH?TypeComments(10000001(


TypeComments0£117 =£1018 STO0019 30027 12OOj'C' .....,, 0036 STP -------Enter compounding period (in months)0037 =0038 STO...0039~./,0047'~"004':' ...' RCL70049 -'OOS"' . ( =0\:15::: N0059 STP£1060 ..£1061 RCL00f·-·.-.,~~0070 =0071 I0072 FUm00-- i .:'FU0074 STO0075 0~10f:30004 PI)f~J85 =0(186 STO.. 1-------Set FIND mo<strong>de</strong>oot'70095 STP0096 GOTO -------Loop program£1097 £10105 STPPROGRAMMINGEXAMPLEUSING BITMANIPULATIONSEXAMPLE 29."SOME" CHECKThe Exclusive OR function (Section 10) is often used to generate check charactersin digital equipment; e.g., a tape unit or telephone interface. If you need to checkthe validity of information contained in a serial stream of digital bits, you can exclusiveOR each character with each succeeding character in the stream. (Acharacter is nominally 8 bits.) This accumulated character is then written at the endof the information stream as a "check" character. Then, when you read the databack, you again exclusive OR each character. The fi nal result should be all zeros. Ifany bit in the accumulated check character remains 'on' (=f. 0) after it has been exclusiveORed to the end result, then you know you've got an error.The following example illustrates the Exclusive OR function using 5 datacharacters and a generated check character. The data characters will be displayedin memory locations 1 through 5 and the generated check character will be inmemory location O. The program halts when the check character is displayed sothat you can inspect it. When you type CON "1b31",,;' or EmID @, the programrecalls the data from memory and performs the check using the check character.This result is stored in memory location 6.Programming Instructions and Examples 147


Note: If you want to create an error, change one of the characters in memory whilethe program is halted and before you press EmD @.This method of checking does have some weaknesses. The check character maynot maintain its integrity during transmission or writing. In addition, it will not<strong>de</strong>tect an error which involves 2 or any even number of characters changed in thesame way; i.e., the same bit "on" or "off." That's why this method is rarely used byitself. It is usually combined with other <strong>de</strong>tection methods.The following example illustrates how to write a program for this checking problem:SOt1E CHECKTypeComments00£1£1000100020f10300040012£1020002;::00360044£1045£104600470€148004900570058OC159£10670075(1003flfr.31OOQ·=t J_'01(1001080109011 f10111(11120113RPHCU1Et-1ClF~HD::1'(' J(163501·-·"':'::" 1'93mRXOR>mRmF~STO1PAUSEelF.:lQ"':'-' (1635f11'-'-' C,.(Q7J'.JPCl1:~::OR:}::or;~:)~OH>~OF~:>::o~~STP-------------Set RPN-------------Hexa<strong>de</strong>cimal mo<strong>de</strong>Generate check character byexclusive OR'ing 5r----------- Hex characters insuccession-------------Save check character1----------Read back data character stream------------- Add check characterto stream------------- Last result should be O.PROGRAMMINGEXAMPLESUSINGCONVERSIONSEXAMPLE 30.HAVE YOU CONVERTED YET?While some conversions are built into this CALCULATOR program, it is still worthwhileto review the logic of the process. For instance, what steps must you performto convert miles per hour to feet per second?148 Programming Instructions and Examples


You might know that there are 5280 feet in a mile. You might also know that thereare 60 minutes in an hour. So how can you use this knowledge? A process of logicalcancellation of units is one of the simplest ways.For example: Convert 30 miles per hour to feet per second.( 30 mi * 5280 ft / 60 min) / 60 ~echr ml hr min30 mi-- *5280 ft*hrhr mi 60 min*min60 secNow you can cancel out I ike units.30.mf *W5280 ft *pr(W60 o:rm*o:rm60 secThis leaves you with 44 feet per second.Using this process will not only help you think logically, but it will also provi<strong>de</strong> acheck to make sure that you are really going to end up with the units you want. Forthe conversion units, refer to Appendix D.The following programmed example performs the same type of conversion asabove.I .. IAUE 'tOU Cot·f.)EF:TED YET?TypeComments£1(1£1(1 RPt·j RPN mo<strong>de</strong>(1(101 elF: Clear stack00f12 CU1EM Clear memory£1003 11111 Set ind icator for entry - in meters£1£111 STP Wait for entry0012 :>;CHGY Get rid of 11111 indicator£1013 POP Meters to centimeters£1014 10£1£1(122 :~;0023 2.54 Centimeters to inches((131.t'00032 12 I nches to feet(104(1 .' .£1041 STO]Display result in0042 0 memory location 0'-1'-\'-1'-"-'£1050.:..c.~c...c.Set end indicator and£105::: STO display it in memory£1fj59 1 location 1£1067 STP£1068 GOTg]Loop to beginning of program£10690£177 STPProgramming Instructions and Examples 149


EXAMPLE 31.CIRCLES AND OTHER PLOTSWhen you have a series of corresponding points of data, there are at least twocoordinate systems in which to plot them. There is the Cartesian (or X vs. Y) coordinatesystem, and the Polar (or r, 0) coordinate system (r = radius; 0 = angletheta).Which one you use is largely a matter of individual choice, but sometimes theequation you need to use contains trigonometric functions. Depending on thefunction, you might want to convert from one coordinate system to the otherbecause the data would be better represented.The equations to translate from one form to the other are relatively simple, but ofcourse they must be applied repetitively to all of the data pairs. For convenience,the transformation process has been programmed into your CALCULATOR program.For your information, however, here are the equations:From Cartesian to Polar ...0= atan (~)From Polar to Cartesian ...X = r (cos 0)Y = r (sin 0)The program that follows converts the X, Y point 3,5 to polar (r = 5.8309517, 0 =59.036243 <strong>de</strong>grees) and then converts Polar r, 0 point 7, 35 <strong>de</strong>grees to Cartesian (X= 5.7340644, Y = 4.0150351).CIRCLES At·[J OTHER PLOTSTypeComments0I-)fKlALG~~f1OC11CU1Et1000'-' .::. CLR00f13DEG0f1f14 5 ------Y 50f112PUSH0013 3 ------X 3f102100,-,0-1c..&..STO -------Save R0023 00031 >~CHGY007 ._It:.. .-'STO -------Save L 00033 10041 PAUSE ]0042 PAUSE01-343 CLRRECT -------Convert to polar~-----Idle a while150 Programming Instructions and Examples


004400520f1530061£1£1620063£10640072TypeComments35 ConvertPUSH 35 <strong>de</strong>grees = L °7 R = 7POLARto rectangularSTPGOTO ~0~LoopSTPcomplete, X register contains X-coordinate;Y register contains the V-coordinateEXAMPLE 32.A 3-D PLOTThis problem is similar to the last except that this problem <strong>de</strong>als with three dimensionsinstead of two.To represent a point in real space requires a coordinate system that is three dimensional.Just as there are equations to convert from Cartesian to Polar and viceversa,there are equations to convert between these three-dimensional coordinatesystems. Take a point (X, Y, Z) in real space:~ __ r;~(X'Y'ZJz/'/'f=-----.II III~----+_--~----~~ XThis point may also be represented as:;- P(V,0,ct»•Xp (V, 0,~)Where V is the magnitu<strong>de</strong> of the straight line from theorigin to the point.Programming Instructions and Examples 151


This system of representation is called the Spherical Coordinate system.Conversion between these two systems is done via the following equations:e = acos~ = atan(~)These translate from an exten<strong>de</strong>d Cartesian to SPHERICAL.Use the following to translate back.X = V*sine * sin~y = v*cosez = V*sine * cos~The following program will perform this translation from spherical to exten<strong>de</strong>dCartesian on rectangular coordinates for a point in space observed as V = 7.2,e = 53°, ~ = 71 °X = (7.2) sin (53) sin (71)Y = (7.2) cos (53)Z = (7.2) sin (53) cos (71)A 3-0 PLOTTypeComments000000010002£1003£1004£101200130014£1022£10230024003300340042005£1£10510052£1060£1(161£10620070ALGCU1EtlCLF~OEG53 -------e = 53 <strong>de</strong>greesSH~:~71 ------- = 71 <strong>de</strong>greesSIH7.2-------V = 7.2 miles=STg JI-------Save Xcos~~7.2=STi' JI-------save y71152 Programming Instructions and Examples


Type0078 COSoo""q I.".-,*Commentst1OO0 "" i .t:...tit188:l::c:.,£n389,J~,t1t197SW(1f198 = Save Z(1099 STOt1l0fl 20108 STF' Run completeProgramming Instructions and Examples 153


10BIT MANIPULATION FUNCTIONSThese functions are used mostly by programmers working in assembly language. Indirect mo<strong>de</strong>, they are useful if you are reading a storage dump to calculate the addressesin octal or hexa<strong>de</strong>cimal and also to track the logical operation of instructionsexecuted by the computer that produced the dump. I n <strong>de</strong>bugging a computer,you place the program into the ca lcu lator in the same sequence with Traceand Pause commands to display what is happening in the program.The five bit manipulations are AND, OR, XOR, LSHF, and RSHF . The numbers involvedin these functions first must be truncated (automatically), then convertedfrom their normal BCD internal format to a binary number of the length specifiedby the last BITS command. If the magnitu<strong>de</strong> of a number is too large the ER­ROR-HEX/OCT OVRFLW will be displayed and the number will be set to O. Therequested operation is performed and the res ult is converted back to BCD. Thesefunctions are inten<strong>de</strong>d for use in OCT and H EX mo<strong>de</strong>s, but may be used in DEC aswell.LOGICAL AND FUNCTIONThis command computes the logical AND of two numbers, x and y.EnterA LG i1i·'3i:I·'1HEX ""AI.!;'IOFFF5 AN lid9.:f.ji'OF=X DisplayFFFS5LOGICAL OR FUNCTIONOR iii·tii:j,'1 or IIIiI IThis command computes the logical OR of two numbers, x and y.EnterX DisplayRPN lii·iii:I·'i'OCT ii·ii':'·i'13 ",.tg.:f.ji' 135 OR lii'A."·!;' 17Bit Manipulation Functions 155


EXCLUSIVE OR FUNCTIONThis command computes the logical exclusive OR of two numbers, x and y.EnterX DisplayA LG l.1i·i3i:t.,;.5 XOR 3 = 6The following table illustrates the binary bit patterns for each of these functions:y x y AND x y OR x y XOR x0 0 0 0 00 1 0 1 11 0 0 1 11 1 1 1 0Figure 11Binary Bit PatternLOGICAL LEFT SHIFT FUNCTIONIf x = 0 then y is not changed. Otherwise, y is truncated and converted to a binarynumber of the length specified by the BITS command. ERROR-HEX/OCTOVRFLW will be displayed if y is out of range. Y is shifted left x bits. Zeroes areshifted into the right of y, x is assumed to be in the current base. If x


LOGICAL RIGHT SHIFT FUNCTIONIf x = 0 then y is not changed. Otherwise, y is truncated and shifted right x bits.Zeroes are shifted into the left of y. If x


11INPUT/OUTPUT COMMANDSFOR PERIPHERAL DEVICESThe following commands may be used to do I nput and Output (I /O) if you have anATARI printer, disk drive, Program Recor<strong>de</strong>r. If an I/O error occurs, the messageERROR-followed by a number will be displayed. The meanings of these numbersare listed un<strong>de</strong>r ERROR MESSAGES in Appendix A.PRINTERFUNCTIONSPRINTER ON COMMANDON Iii'S':',';'This command causes the printer to print everything that is displayed in the scrollarea of the screen until the OFF command is issued . There are some cases wherethe printer output will not exactly match the display. If you make an error whileentering a command, the characters you entered will be scrolled up in the display,prece<strong>de</strong>d by the> prompt. However, they will not be printed on the printer. In programmo<strong>de</strong>, the next command issued after an error will be further to the left onthe printer than it is on the screen.To print a program listing, you must enter the TRACE command before enteringON and the LIST commands.PRINTER OFF COMMANDOFF Ji:z.Wi:t"j'This command turns off the printer. The printer is always off when the CALCULA­TOR is turned on and after ".fi.i'UI;lMii.When you have completed a program listing, enter OFF and the NOT (NO TRACE)command.PRINT X COMMANDPR "d"''''';' or PRINT .. ii·A"'·" or PmiJ ?This command causes the printer to print the value of any number in the scroll areafollowed by *** even if the printer is OFF. It also displays that number in the scrollarea. This is useful for printing values computed by programs.ADVANCE PRINTER COMMANDThis command puts one blank line on the printer even if the printer is OFF.Input/Output Commands for Peripheral Devices 159


USING THEDOS MENUIf you are not familiar with the items listed in the Disk Operating System (DOS) Menu,you should read the Disk Operating System <strong>Manual</strong> that was inclu<strong>de</strong>d with your diskdrive. However, you need to know that you can call up and display the DOS Menuonly as the first operation you perform after you insert the CALCULATOR diskette. Soif you want to format a blank diskette on which to save your programs, type the DOScommand before doing anything else.DISPLAYING THE DOS MENUDOS IiI.iI!DDFigure 12DOS MenuWhen you type DOS 1iI.D'.IllI, the television screen goes blank for a second or twobefore the DOS Menu appears. You should see a prompt message, SELECT ITEM. Typethe letter for the operation you want and press 1iI.iI!DD. For example, to format a blankdiskette, you would take the following steps:1. Remove CALCULATOR diskette from disk drive.2. Insert blank diskette and close drive door.3. Type 11iI.iI!DD.4. When prompt message reappears, remove the now formatted diskette and insertthe CALCULATOR diskette.You now have a formatted diskette on which you can store programs.REDISPLAYING THE CALCULATOR SCREEN DISPLAYTo reload the CALCULATOR program, use the Binary Load option on the DOS Menu.1. Make sure CALCULATOR diskette is inserted in disk drive.2. Type LIiI.iI!DD.3. Prompt message LOAD FROM WHAT FILE? appears.4. Type AUTO.SYS IiI.iI!DD.5. After a short wait, the CALCULATOR screen display appears.160 Input/Output Commands for Peripheral Devices


CASSETTE ANDDISK DRIVEFUNCTIONSSAVE AND LOAD COMMANDSSAVE filespecLOAD filespecSAVEM filespecLOADM filespecThe message ENTER FILESPEC will be displayed when you enter any of these fourcommands. The format for a filespec (file specification) is the same as for AT ARIBASIC:Format: Device Name Device Number: Filename.ExtensionExamples: D1 : CALCZ.I NSC:Then <strong>Atari</strong> Program Recor<strong>de</strong>r requires only the <strong>de</strong>vice name. Consult the Operator'smanual for the <strong>de</strong>vice you wish to use for more information. Enter a C for the ProgramRecor<strong>de</strong>r and D for disk drive <strong>de</strong>vice names. If you have more than one disk drive, youmust specify <strong>de</strong>vice number. The CALCULATOR will check for E:, S:, and K:, infilespecs and display ERROR-NOT VALID COMMAND OR NUMBER if they areused. Other errors in the filespec will be caught by the Operating System built into thecomputer and an I/O error number will be displayed.Save Program in File InstructionS filespec or SAVE filespecThis instruction allows you to save all 3072 bytes of program memory in thespecified file. Saving on the printer (P:) will produce an unintelligible listing. Stop itby pressing 1!Im3.Load Program From File InstructionLO filespec or LOAD filespecThis instruction allows you to load 3072 bytes of program memory from thespecified file.Save Memory in File InstructionSAVEM filespecThis instruction allows you to save all 100 memo ry registers (600 bytes) in thespecified file. Saving memory on the printer (P:) will produce an unintelligiblelisting. Stop it by pressing 1!Im3.Load Memory From File InstructionLOADM filespecThis instruction allows you to load al1100 memory registers from the specified file.A beep (the same as the beep at the end of a program) will sound when SAVE,LOAD, SAVEM, or LOADM is done and the prompt symbol will reappear.Input/Output Commands for Peripheral Devices 161


The LOAD and LOADM commands do not check the files they load from to see ifthey contain valid data, so it is up to you to keep track of what is stored where. Fordisk files, it is a good i<strong>de</strong>a to use file extensions such as ".MEM" for memory and".PRG" for programs. If the wrong file is loa<strong>de</strong>d, the program or memory will probablycontain garbage and should be cleared using CLPROG or CLMEM. An errormessage such as ARITHMETIC OVERFLOW or NOT VALID COMMAND ORNUMBER is displayed when incorrect data is displayed or a garbage program is executed.If the file is too short then ERROR-136 (End of File) will be displayed.The following examples show how to enter these instructions:EnterSAVE C:LOAD D:FACT.PRGSAVEM D:TEMP.MEMLOADM C:CommentsSave program on cassetteLoad program (FACT. PRG) fromfloppy disk fileSave memory (TEMP.MEM) infloppy disk fileLoad memory from cassetteData can be passed between CALCULATOR programs and AT ARI BASIC programsusing the SAVEM and LOADM commands in the CALCULATOR and the GET,POKE , PEEK, and PUT commands in BASIC (see the ATARI BASIC Reference<strong>Manual</strong>). The internal 6-byte BCD representation of each number is stored in theSAVEM file. This is not the format used by PRINT and INPUT in BASIC, so PUT andGET must be used. An example of how to read a SAVEM file into a BASIC array andthen write a BASIC array into a file to be loa<strong>de</strong>d with LOADM is given below. TheBASIC program could generate data for the CALCULATOR or it could format dataproduced by the CALCULATOR and print it in some fancy way.10 DIM A$(20),A(99)20 A=ADR(A$)+20:REM ADDRESS OF ARRAY A100 REM PROGRAM FRAGMENT TO READ110 REM CALCULATOR SAVEM FILE INTO ARRAY A120? "ENTER INPUT FILESPEC";: INPUT A$130 OPEN #1 , 4, 0, A$140 FOR I =0 TO 599:GET #1,B:POKE A + I,B:NEXT I150 CLOSE #1200 REM PROGRAM FRAGMENT TO WRITE210 REM ARRAY A OUT TO CALCULATOR SAVEM FILE220? " ENTER OUTPUT FILESPEC";: INPUT A$230 OPEN #1 , 8,0, A$240 FOR I =0 TO 599:PUT #1, PEEK(A+ I):NEXT I250 CLOSE #1162 Input/Output Commands for Peripheral Devices


APPENDIX AERROR MESSAGESThe following error messages are all prece<strong>de</strong>d by a "beep" sound and the message ERROR- If ERROR-isfollowed by a number, then it is an I/O (Input/Output) error and the number is the same as the ATARI BASIC errornumber.MessageARITHMETIC OVERFLOWEND OF MEMORYHEX/OCT OVRFLWNOT VALID COMMAND OR NUMBERNUMBER OUT OF RANGESTACK EMPTYSTACK FULLTOO MANY CHARACTERSTWO OPS IN A ROWUNIT MISMATCHCauseResult of a calculation is outsi<strong>de</strong> of the range allowed for<strong>de</strong>cimal numbers.Attempt to access program memory outsi<strong>de</strong> the range0-3071. When the computer is turned on, this error indicatesthere is not enough RAM (Random Access Memory) in thesystem.Number is within range allowed for <strong>de</strong>cimal numbers, but isoutsi<strong>de</strong> the range allowed by BITS setting.Entry of one or more characters that are not valid in thecurrent CALCULATOR state. Most common errors of thistype:(1) Using an equals symbol in RPN mo<strong>de</strong>.(2) Using a <strong>de</strong>cimal point in OCT or HEX.(3) Entering FIND I when not in CMPND mo<strong>de</strong>.Number is not in correct range for BITS, FIX, CALL, STO, etc.Attempted to POP an empty Number Stack.Attempted to RETURN to an empty Call Stack.ALG mo<strong>de</strong> has an empty Operator Stack.Attempted to PUSH into a full Number Stack.Attempted to CALL a full Call Stack.Operator Stack full. (This error is unlikely because theNumber Stack fills up first.)Attempted to enter number or filespec name that is morethan 14 characters long.Two binary operators in a row in ALG or ALGN mo<strong>de</strong>.Mixed units in conversion; e.g ., attempted to convertkilograms (KG) to miles (MI).Appendix A 163


I/O ERRORSMessage128130136138139140142143144146CauseBREAK key abortNonexistent <strong>de</strong>viceEnd of file (file too small)Peripheral <strong>de</strong>vice time out (<strong>de</strong>vice disconnected)Device does not acknowledge commandSerial bus framing errorSerial bus data overrunSerial bus checksum errorDevice done error (operation not complete)Function not implemented in handler (LOAD from Printer,for example)DISK I/O ERRORSMessage160162163164165167169170CauseIllegal drive numberDisk fullFatal I/O error: system errorFile number mismatch. Disk may be damaged.File name error: system errorFile lockedDirectory fu IIFile not found164 Appendix A


APPENDIX BNON-ERROR MESSAGESThe following messages are given by the computer either to remind you what to enter or to give helpful information(usually during conversions). They are always displayed when the indicated commands are executed.MessageENTER 0-8ENTER 0-99ENTER 0-3071ENTER 1-32ENTER FILESPECENTER NEW UNITSTO CTO DEGTO FTO POLAR Y, X TO Y = ANGLE, X = RTO RADTO RECT Y = ANG LE,X = R TO Y,XTO XTO YDisplayed byFIXAll commands that require a memory register (like STO,RCL, etc.)All commands that require a program memory addressBITSLOAD, SAVE, LOADM, and SAVEMMass, volume, or length commandsF (Fahrenheit)CRAD (Convert Radians)C (Celsius)RECT (Rectangular to Polar)CDEG (Convert Degrees)POLAR (Polar to Rectangular)Y (Statistics)X (Statistics)Appendix B 165


APPENDIX CFUNCTION SUMMARYCommand T oken(s)mD (mD )*+mD &mD -DELETE BACK SCommandA or ABSAC or ACOSAD or ADVAl or AlGAlGNAN or ANDAS or ASINAT or ATANB or BAlBI n or BITS nBSTCCA n or CALL nCD or CDEGCH or CHGSGNCl or CLINTClM or ClMEMCLP or CLPROGCLRCLS or CLST A TCLXCMCMP or CMPNDCO or COMPCON or CONTCOSCR or CRADCU or CUPD or DECDEGDELE or ENDENT or ENTEREX or EXPEEXPT or EXPTENDefinitionLeft parenthesisRight parenthesisMu Itipl icationDivisionAdditionSubtractionEqualsAbsolute valueArc cosineAdvance printerAlgebraic notation with operator prece<strong>de</strong>nceAlgebraic notation with No operator prece<strong>de</strong>nceLogical ANDArc sineArc tangentBalloon paymentNumber of BITS in hex and octal numbersBack stepCelsius to FahrenheitCall subroutineConvert <strong>de</strong>grees to rad iansChange signClear memory for interest calcu lationsClear all of memoryClear program memoryClear stackClear memory for st atistics calculationsClear X registerCentimetersCompoundComplementContinueCosineConvert rad ians to <strong>de</strong>greesCupsDecimal baseDegree mo<strong>de</strong>DeleteEnd program mo<strong>de</strong>Enter mo<strong>de</strong>Exponentiation base eExponentiation base 10Appendix C 167


Command T oken(s) Command DefinitionEmil !FFahrenheit to CelsiusFA or FACT FactorialFI or FINDFind mo<strong>de</strong>FIX nFix number of digits to right of <strong>de</strong>cimal pointFL or FLOZFluid ouncesFR or FRACTake fractional partFTFeetFVFuture valueFVD or FVDUEFuture value, Annuity Due mo<strong>de</strong>FVO or FVORDFuture value, ordinary annuity mo<strong>de</strong>G or GALGallonsGMGramsGO n or GOTO n Go to line numberH or HEXHexa<strong>de</strong>cimal baseIInterest per period in percent&lEDINInchesINS Insert&1 - INSN or INSNUM Insert numberINTTake integer partK or KGKilogramsKMKilometersLLitersLBPoundsII n1 n2 or LIST n1 n2 List programlISTM r1 r2List memoryI.NNatural logarithmLO filespec orLOAD filespecLoad program from fileLOADM filespecLoad memory from fileLOG or LOGlE N Logarithm base 10LS or LSHFLogical left shiftMMetersEmil %MIMilesMO or MOD ModuloNNumber of periodsNO or NOPNo operationNOT or NOTRCNo traceNW or NWTN weightingo or OCTOctal baseOFFTurn printer offONTurn printer onEmil i OR Logical inclusive OROZP or PAUSEPIPM or PMTPO or POLAROuncesPause for 1;2 secondPiPaymentPolar to rectangularEmil ] POP Pop number stackPOPCPop call stackEmil " POW or POWER ExponentiationEmil ? PR or PRINT Print x on printerEmil # PRO or PROG Program mo<strong>de</strong>Emil [ PU or PUSH Push X register contents on number stackPVPVD or PVDUEPresent valuePresent value, annuity due168 Appendix C


Command T oken(s)EmIiI "EmIiI 'EImI -CommandPVO or PVORDQTRRA or RADRCL rRE or RECIPRECTRO or ROOTROU or ROUNDRP or RPNRS or RSHFRSTRU or RUNS filespec orSAVE filespecSAVEM filespecSI or SINSL or SLOPESM or SMINUSSP or SPLUSSQ or SQRTSQU or SQUARESS or SSTST r or STO rSTPSU r or SUM rT or TANT8 or TBSPTR or TRACETRU or TRUNCTS or TSPXXC or XCHGYXCHM rXE r n or XEQ r nXG r n or XGE r nXL r n or XL T r nXM or XMEANXN r n or XNE r nXO or XORXS or XSDXV or XVARYYDYI or YINTYM or YMEANYS or YSDYV or YVARDefinitionPresent value, ordinary annuityQuartsCorrelation coefficientRadian mo<strong>de</strong>RecallReciprocalRectangular to polarTake root of a numberRound off a numberReverse Polish NotationRight shiftReset program counterRun programSave program in fileSave memory in fileSineSlopeSigma minusSigma plusTake the square root of a numberMultiply a number by itselfSingle stepStore in memoryStopSum to memoryTangentTablespoonsTrace programTruncate numberTeaspoonsX to YExchange X and Y regi stersExchange X register and memoryIf X equals memory (r) then goto nIf X is greater than or equal to memory (r) then goto nIf X is less than memory (r) then goto nMean of XIf X is not equal to memory (r) then goto nLogical exclusive ORStandard <strong>de</strong>viation of XVariance of XY to XYardsY-interceptMean of YStandard <strong>de</strong>viation of YVariance of YAppendix C 169


APPENDIX DCONVERSION FACTORSThe customary units of weight and mass are avoirdupois units unless <strong>de</strong>signated otherwise. The symbol (§)represents the <strong>de</strong>nsity of a material expressed as a <strong>de</strong>cimal fraction; g equals 980.7 centimeters per second persecond.MULTIPLYabamperesabamperes ....... . .abamperes per square centimeterabampere-turnsabampere-turnsabampere-turns per centimeterabcoulombs ....... . . . .abcoulombsabcoulombs per square centimeterabfarads ........................ .abfarads ...... . .abfarads ....... .abhenriesabhenriesabhenriesabmhos per centimeter cubeabmhos per centimeter cube ... . .. . .abmhos per centimeter cubeabohrms .... . .................. . .abohms . ......... . .. . .abohms ............. . .abohms ..... . .abohms per centimeter cubeabohms per centimeter cubeabohms per centimeter cube ...... . .abvolts .... . ... . . . .abvolts ... . .. .acresacresacresacresacresacre-feetacre-feetamperes ....... . ....... . ...... . .amperes .... . ................ .. . .amperes per square centimeteramperes per square inch ...... .. . . .amperes per square inch .. . . . . . . .. . .amperes per square inch ......... . .BY103x10'O64.521012.5725.40103 X 10'064.5210 910' 59 X 10 2 010- 910-61/9 X 10- 2010 5 /§1.662 X10 210 310-1 510-310- 91/9 X 10- 2010-36.015 x 10- 310-5 §1/3X10- 1010-·43,5606,272,64040471.562 X 10- 3484043,5603.259 X1051/103 X10 96.4520.015500.15504.650 x10·TO OBTAINamperesstatamperesamperes per square incham pere-tu rnsgilbertsampere-turns per inchcoulombsstatcou 10m bscoulombs per square inchfaradsmicrofaradsstatfaradshenriesmillihenriesstathenriesmhos per m eter-grammhos per mil footmegmhos per centimeter cubemegohmsmicrohmsohmsstatohmsmicrohms per centimeter cubeohms per mil footohms per m eter-gramstatvoltsvoltssquare feetsquare inchessquare meterssquare milessquare yardscubic-feetgallonsabamperesstatamperesamperes per square inchabamperes per square centimeteramperes per square centimeterstatamperes per square centimeterAppendix D 171


MULTIPLYam pere-tu rnsampere-turnsampere-turns per centimeterampere-turns per inchampere-turns per inchampere-turns per incharesares ... . ....... .atmospheresatmospheresatmospheresatmospheres ..... . .atmospheresatmospheresbarsbarsbarsbars . .... . . ... .. . .bars ...... . . . .board-feet ....... . .. . ... . .British thermal units (Btu)British thermal units . . .... .British thermal units . . . . . .. .British thermal units ... . . . . .British therm al unitsBritish thermal unitsBtu per minute . . . . .. .Btu per minute .. .. .. .Btu per minuteBtu per minute ... . .. . ...... . . .Btu per square feet per minutebushels .... . .. . . . ...... . .bushels .. .. . . .bushels . . . . . . . .bushelsbushelsbushels .. .... .centares ...... .centigramscenti liters . .... . . . ....... . . .centimeterscentimeterscentimeterscentimeterscentimeterscentimeterscentimeters ....... ... .centimeter-dynes . . . .... . . .centimeter-dynescentimeter-dynes ... ... . .centimeter-gramscentimeter-gramscentimeter-gramsBY1/101.2572.5400.039370.39370.49500.024711007629.9233.9010,33214.701.0580.986911.020 X 10'2,08914.50144 sq. in. x1 in.778.23.930 X 10-'10550.2520107.62.930 X 10-'12.970.023580.0175817.580.12211.24421500.035244643210.010.013.281 X 10- 20.39370.016.214 X 10- 61039 3.71.094 X 10- 21.020 x 10- 31.020 X 10- 87.376 X 10- 8980.710-57.233 X 10- 5TO OBTAINabam pere-tu rnsgilbertsampere-turns per inchabampere-turns per centimeterampere-turns per centimetergilberts per centimeteracressquare meterscentimeters of mercuryinches of mercuryfeet of waterkilograms per square meterpounds per square inchtons per square footatmospheresdynes per square centimeterkilograms per square meterpounds per square footpounds per square inchcubic inchesfoot-pou ndshorsepower-hoursjouleskilogram-calorieskilogram-meterskilowatt hoursfoot-pounds per secondhorsepowerkilowattswattswatts per square inchcubic feetcubic inchescubic meterspeckspints (dry)quarts (dry)square metersgramslitersfeetinchesmetersmilesmillimetersmilsyardscentimeter-gramsmeter-kilogramspound-feetcentimeter-dynesmeter-kilogramspound-feet172 Appendix D


MULTIPLYcentimeters of mercury . ......centimeters of mercurycentimeters of mercurycentimeters of mercurycentimeters of mercurycentimeters per secondcentimeters per secondcentimeters per secondcentimeters per second . .. . . . .centimeters per secondcentimeters per second ........... .centimeters per second per secondcentimeters per second per secondcentimeters per second per secondcircular mils ............ .circular milscircular mils ...... . .cord-feet ..... . . . . . .cordscoul0 mbscoulombs ................ .. .. .coulombs per square inch ... . .. .coulombs per square inchcoulombs per square inchcu bic centimeterscu bic centimeterscubic centimeterscubic centimeterscubic centimeterscubic centimeterscubic centimeterscubic centimeters .. . .. . . . . . .. .cubic feet ............ .cubic feetcubic feetcubic feetcubic feet ..... . .cubic feetcubic feetcubic feet . . ........ . .. . .cubic feet per minutecubic feet per minutecubic feet per minute ..... . .cubic feet per minute . . . . . ........ .cubic inches ........... . ...... . . .cubic inchescubic inchescubic inchescubic inchescubic inchescubic inchescubic inchescubic inchescubic meterscubic metersBY0.013160.4461136.027.850.19341.9680.032810.0360.60.022373.728 X 10-'0.032810.0360.022375.067 X 1 0- 67.854X10- 70.78544 ft x 4 ft x 1 ft8ftx4ftX4ft1/103 X 10 90.015500.15504.650 x 10 83.531 X 10- 56.102X10- 210- 61.308 X 10- 62.642 X 1 0-'10-32.113 X 10- 31.057 X 10- 32.832 X 10'17280.028320.037047.48128.3259.8429.92472 .00.12470.472062.416.395.787X10-'1.639 X 10- 52143X10- 54.329 X 10- 31.639 X 10- 21.061 X 10 50.034630.0173210 635.31TO OBTAINatmospheresfeet of waterkilograms per square meterpounds per square footpounds per square inchfeet per minutefeet per secondkilometers per hourmeters per minutemiles per hourmiles per minutefeet per second per secondkilometers per hour per secondmiles per hour per secondsquare centimeterssquare inchessquare milscubic feetcubic feetabcoulombsstatcoulombsabcoulombs per square centimetercoulombs per square centimeterstatcouls, per square centimetercubic feetcubic inchescubic meterscubic yardsgallonsliterspints (I iqu id)quarts (I iqu id)cubic centimeterscubic inchescubic meterscubic yardsgallonsliterspints (I iqu id)quarts (liquid)cubic centimeters per secondgallons per secondI iters per secondpounds of water per minutecubic centimeterscubic feetcubic meterscubic yardsgallonslitersmil-feetpints (liquid)quarts (I iqu id)cubic centimeterscubic feetAppendix D 173


MULTIPLYcubic meterscubic meterscubic meters . ..... . .cubic meterscubic meterscubic meterscubic yardscubic yardscubic yards . . . . . . .cubic yards . . . . .. . .cubic yardscubic yardscubic yardscubic yards . . .. . .. . ... .cubic yards per minute ... . . . .... . .cubic yards per minute ..... . .cubic yards per minuteBY61,0231.308264.210 3211310577.646 X 10 52746,6560.7646202.0764.61616807.90.453.36712.74TO OBTAINcubic inchescubic yardsgallonsliterspints (liquid)quarts (liquid)cubic centimeterscubic feetcubic inchescubic metersgallonsliterspints (liquidquarts (liquid)cubic feet per secondgallons per secondI iters per seconddaysdaysdays . . ..... . .<strong>de</strong>cigrams<strong>de</strong>ciliters ....... . .. . ...... . .<strong>de</strong>cimeters . . ...... . . ... . .. . . .<strong>de</strong>grees (angle)<strong>de</strong>grees (angle) ...... . . .<strong>de</strong>grees (angle) . . ... .. .<strong>de</strong>grees per second ...... .. .. .<strong>de</strong>grees per second .... . . . .<strong>de</strong>grees per second . .. .. . .<strong>de</strong>kagrams ..... . ... . . .. .<strong>de</strong>kaliters<strong>de</strong>kameters .... . . .dramsdramsdynesdynesdynesdynes per square centimeter24144086,4000.10.10.1600.0174536000.017450.16670.0027781010101.7720.06251.020 X 10- 37.233 X 10- 52.248 X 10- 61hoursminutessecondsgramslitersmetersminutesrad ianssecondsradians per secondrevolutions per minuterevolutions per secondgramslitersmetersgramsouncesgramspoundalspoundsbarsergsergsergsergsergsergsergs .. .......... . . .ergs per secon<strong>de</strong>rgs per secon<strong>de</strong>rgs per secon<strong>de</strong>rgs per secon<strong>de</strong>rgs per secon<strong>de</strong>rgs per second9.480 X 10- 1117.378 X 10- 81.Q20 X 10- 310-72.389 X 10- 111.020 X 10- 85.688 X 10- 94.427 X 10- 67.378X10- 81.341 X 10- 101.433 X 10- 910-10British thermal unitsdyne-centimetersfoot-pou ndsgram-centimetersjouleskilogram-calorieskilogram-metersBritish thermal units per minutefoot-pounds per minutefoot-pounds per secondhorsepowerkilogram-calories per minutekilowatts174 Appendix 0


MULTIPLYfaradsfaradsfarads ...... . .fathomsfeetfeetfeetfeet ..... . ....... .feetfeet of waterfeet of waterfeet of water . .. . . .. . .. .feet of waterfeet of water .. .. . . . . .feet per minutefeet per minutefeet per minutefeet per minutefeet per minutefeet per secondfeet per second ..... . .feet per second ..... . .feet per secondfeet per second . . . . . . . . . .... . .feet per second .... .. .feet per 100 feet .......... .feet per second per second .... .. .feet per second per secondfeet per second per secondfeet per second per second . ... . .. .foot-pou ndsfoot-pou ndsfoot-pou ndsfoot-pou ndsfoot-pou ndsfoot-pounds ....... . .foot-pou ndsfoot-pounds per minutefoot-pounds per minute ...... . .foot-pounds per minutefoot-pounds per minutefoot-pounds per minutefoot-pou nds per secondfoot-pou nds per secondfoot-pou nds per secondfoot-pounds per secondfurlongs ............... . . .. .. . . . .BY10-910 69X10"630.48120.30481.894 X 10- 41/30.029500.8826304.862.430.43350.50800.016670.018290.30480.0113630.481.0970.592118.290.68180.01136130.481.0970.30480.68181.285 X 10- 31 .356 X 10'5.050 X 10- 71.3563.238 X 10- 40.13833.766 X 10- 71.285 X 10- 30.016673.030 X 10- 53.238 X 1 0- 42.260 X 10- 57.712 X 10- 21.818 X 10- 31.943 X 10- 21.356 X 10- 340TO OBTAINabfaradsmicrofaradsstatfaradsfeetcentimetersinchesmetersmilesyardsatmospheresinches of mercurykilograms per square meterpounds per square footpounds per square inchcentimeters per secondfeet per secondkilometers per hourmeters per minutemiles per hourcentimeters per secondkilometers per hourknotsmeters per minutemiles per hourmiles per minutepercent gra<strong>de</strong>centimeters per second per secondkilometers per hour per secondmeters per second per secondmiles per hour per secondBritish thermal unitsergshorsepower-hoursjouleski logram-calorieskilogram-meterski lowatt-hou rsBritish thermal units per minutefoot-pounds per secondhorsepowerkilogram-calories per minutekilowattsBritish thermal units per minutehorsepowerkilogram-ca lories per minutekilowattsrodsgallonsgallonsgallonsgallonsgallonsgallons37850.13372313.785 X 10- 34.951 X10- 33.785cubic centimeterscubic feetcubic inchescubic meterscubic yardslitersAppendix D 175


MULTIPLYgallonsgallonsgallons per minutegallons per minutegausses ............... . . .gilberts . . ... .. .gilberts ... . ... .gilberts per centimetergills .... . ............ . . .gillsgrainsgrainsgrainsgramsgramsgramsgramsgramsgramsgramsgrams ........ .. .. . . .gram-calories (IT)gram-centimetersgram-centimetersgram-centimetersgram-centimeters . ... . . . .. . ... . . .gram-centimetersgram-centimeters ...... .grams per centimetergrams per cubic centimeter .. . .. . .grams per cubic centimetergrams per cubic centimeter ..... . .hectareshectares ... .. . . . . . . .. . .. . . . . . . . . .hectogramshectol itershectometershectowatts ............. .hemispheres (solid angle)hemispheres (solid angle)hemispheres (sol id angle) . .. . . . .henries . . ............ . .henrieshenrieshorsepowerhorsepowerhorsepowerhorsepowerhorsepower . . .. . . .. . ... .horsepower ........ . .horsepower ...... . .. . .horsepower (boiler) . . . . . . . .horsepower (boiler)horsepower-hours . . . .. .. . ... . . ... .BY842.228 X 10- 30.063086.4520.079580.79582.0210.11830.2510.064800.04167980.715.4310-310 30.035270.032150.070932.205 X 10- 33.968X10- 39.297X10- 8980.77.235 X 10- 59.807 X 10- 52.343 X 10- 810-55.600 X 10- 362.430.036133.405 X 10- 72.4711.076 X 10 51001001001000.546.28310 910 31/9 X 10- 1142.4033,0005501.01410.680.7457745.733.5209.8042544TO OBTAINpints (I iqu id)quarts (I iqu id)cubic feet per secondI iters per secondlines per square inchabam pere-tu rnsampere-tu rnsampere-turns per inchliterspints (I iqu id)grains (av.)gramspennyweights (troy)dynesgrainskilogramsmiligramsouncesounces (troy)poundalspoundsBritish thermal unitsBritish thermal unitsergsfoot-poundsjouleskilogram-calorieski log ram-meterspounds per inchpounds per cubic footpounds per cubic inchpounds per mil-footacressquare feetgramslitersmeterswattsspherespherical right anglessteradiansabhenriesmillihenriesstathenriesBritish thermal units per minutefoot-pounds per minutefoot-pounds per secondhorsepower (metric)kilogram-calories per minutekilowattswattsBritish thermal units per hourkilowattsBritish thermal units176 Appendix D


horsepower-hourshorsepower-hou rshorsepower-hou rshorsepower-hou rshorsepower-hou rshourshourshourshoursMULTIPLYinchesinchesinchesinchesinches ........... . .inches of mercuryinches of mercuryinches of mercuryinches of mercuryinches of mercury .. . . . .. .inches of water ..... .. . .. . .. .inches of waterinches of waterinches of waterinches of waterinches of waterjoules (Int.)joules (Int.)joules (Int.)joules (Int.)joules (Int.)joules (Int.)kilogramskilogramskilogramskilogramskilograms ........... .kilogram-calorieskilogram-calorieskilogram-calories .. . . . . . . .. .kilogram-calorieskilogram-calorieskilogram-calorieskilogram-calories per minutekilogram-calories per minutekilogram-calories per minute ... . . . . .kilogram-centimeters squaredkilogram-centimeters squaredkilogram-meters ................ . .kilogram-meters .. .... .kilogram-meters .... . . .kilogram-meterskilogram-meters .. . .. . . .BY1.98 X 10 62.684X10 6641.12.737X10 50.74554.167X10- 26036005.952 X 10- 32.5408.333 X 10- 21.578 X 10- 510 32.778 X 10- 20.033421.133345.370.730.49120.0024580.0735525.400.57815.2040.036139.480 X 10- 410 70.73782.389 X 10- 40.10202.778 X 10- 4980,66510 370.932.2051.102 X 10- 33.96830881.560 X10- 34186427.01.163X10- 351.470.093580.069772.373 X 10- 30.34179.294 X 10- 39.804 X10 77.2339.8042.342X10- 3foot-pou ndsjouleskilogram-calorieskilogram-meterskilowatt-hoursdaysminutessecondsweeksTO OBTAINcenti metersfeetmilesmilsyardsatmospheresfeet of waterkilograms per square meterpounds per square footpounds per square inchatmospheresinches of mercurykilograms per square meterounces per square inchpounds per square footpounds per square inchBritish thermal unitsergsfoot-pou ndskilogram-calorieskilogram-meterswatt-hoursdynesgramspoundalspoundstons (short)British thermal unitsfoot-poundshorsepower-hoursjouleskilogram-meterskilowatt-hoursfoot-pounds per secondhorsepowerkilowattspounds-feet squaredpounds-inches squaredBritish thermal unitsergsfoot-pou ndsjouleskilogram-caloriesAppendix D 177


MULTIPLYkilogram-meters ........... .kilograms per cubic meterkilograms per cubic meterkilograms per cubic meterkilograms per cubic meterkilograms per meter ........ . .. . .kilograms per square meterkilograms per square meter ... ... .kilograms per square meterkilograms per square meterkilograms per square meter ... . .. .kilograms per square meterkilograms per square millimeterkilolines .......... ... .... . . .kiloliterskilometerskilometers . . . . . .. .kilometerskilometerskilometers .. .. . .. . .kilometerskilometers per hourkilometers per hour ......... .kilometers per hourkilometers per hourkilometers per hourkilometers per hour ............ .. . .kilometers per hour per secondkilometers per hour per secondkilometers per hour per secondkilometers per hour per secondkilometers per minutekilowattskilowattskilowattskilowattskilowattskilowatts . ..... . .kilowatt-hourskilowatt-hourskilowatt-hourskilowatt-hourskilowatt-hourskilowatt-hoursknots (length) . .. ..... .knots (length)knots (length) ..... .. .. . . . . .. .knots (length)knots (speed) ....... .. . .. . . . .knots (speed)knots (speed) ...... . ...... . .knots (speed) ...... . .I ines per square centimeterI ines per square inch . . ......... . .BY2.723 X 10-·10-30.062433.613 X 10- 53.405X10- 100.67209.678 X10- 598.07 X 10-·3.281 X 10- 32.896X10- 30.20481.422 X 10- 310·10 310 310 532813.937 X 10'10 30.6214109427.7854.680.91130.539616.670.621427.780.91130.27780.62146056.884.427 X 10'737.81.34114.3310 334132.656 X 10·1.3413.6X10·8603.672 X 10 560801.8531.152202751.481.689.18531.15210.1550TO OBTAINkilowatt-hoursgrams per cubic centimeterpounds per cubic footpounds per cubic inchpounds per mil footpound per footatmospheresbarsfeet of waterinches of mercurypounds per square footpounds per square inchkilograms per square metermaxwellsliterscentimetersfeetinchesmetersmilesyardscentimeters per secondfeet per minutefeet per secondknotsmeters per minutemiles per hourcentimeters per second per secondfeet per second per secondmeters per second per secondmiles per hour per secondkilometers per hourBritish thermal units per minutefoot-pounds per minutefoot-pounds per secondhorsepowerkilogram-calories per minutewattsBritish thermal unitsfoot-pou ndshorsepower-hou rsjouleskilogram-calorieskilogram-metersfeetkilometersmilesyardscentimeters per secondfeet per secondkilometers per hourmiles per hourgaussesgausses178 Appendix D


MULTIPLYlinks (engineer's)links (surveyor' s)literslitersliters ....... . ...... . .literslitersliterslitersliters .. . ........... .. .liters per minuteliters per minutelog,oN ....... . .. . .. . .. . .. .logeNorlnN .. .. .... . ...... . .lumens per square footmaxwellsmegalinesmegmhos per centimeter cubemegmhos per centimeter cubemegmhos per centimeter cubemegmhos per centimeter cubemegmhos per inch cube ..... . .megohmsmetersmetersmetersmetersmetersmetersmeters .......... . .. ..... . . .meter-kilograms . . . . . . .meter-kilogramsmeter-kilogramsmeters per minutemeters per minutemeters per minutemeters per minutemeters per minute .... .. .meters per second ... ... .meters per secondmeters per secondmeters per secondmeters per secondmeters per secondmeters per second per secondmeters per second per secondmeters per second per secondmhos per meter-grammhos per meter-grammhos per meter-grammhos per meter-grammhos per mil foot . .... . ... .mhos per mil footmhos per mil footBY127.9210 30.0353161 .0210-31.308 X 10- 30.26422.1131.0575.885 X 10- 44.403 X 1 0- 32.3030.4343110-310·10-32.54010 2 /§0.16620.393710·1003.28139.3710-36.214X10- 410 31.0949.807 x10'10 57.2331.6673.2810.054680.060.03728196.83.2813.60.062.2370.037283.2813.62.23710-s§10-2 §2.540 X 10- 2 §1 .662 X 10- 3 §6.015 X 10- 36.01515.28TO OBTAINinchesinchescubic centimeterscubic feetcubic inchescubic meterscubic yardsgallonspints (liquid)quarts (I iqu id)cubic feet per secondgallons per secondlog e N or In Nlog,oNfoot-candleskilolinesmaxwellsabmhos per centimeter cubemegmhos per inch cubemhos per meter-grammhos per mil footmegmhos per centimeter cubeohmscentimetersfeetincheskilometersmilesmillimetersyardscentimeter-d y nescentimeter-gram spound-feetcentimeters per secondfeet per minutefeet per secondkilometers per hourmiles per hourfeet per minutefeet per secondkilometers per hourkilometers per minutemiles per hourmiles per minutefeet per second per secondkilometers per hour per secondmiles per hour per secondabmhos per centimeter cubemegmhos per centimeter cubemegmhos per inch cubemhos per mil footabmhos per centimeter cubemegmhos per centimeter cubemegmhos per inch cubeAppendix 0 179


MULTIPLYmhos per mil footmicrofarads ..... .. . .microfarads ... . . . .microfaradsmicrogramsmicrolitersmicrohmsmicrohmsmicrohmsmicrohms ..... . ................ . .microhms per centimeter cubemicrohms per centimeter cubemicrohms per centimeter cubemicrohms per centimeter cubemicrohms per inch cubemicrons ................. .miles ..... . .. . . . .. . .milesmilesmilesmilesmiles per hourmiles per hourmiles per hourmiles per hourmiles per hourmiles per hour .............. .miles per hour per secondmiles per hour per secondmiles per hour per secondmiles per hour per secondmiles per minute ..... . ..... .. . .. . .miles per minutemiles per minute . . .... . .miles per minutemiles per minute ...... . .mil-feet . .. . ... . . . .... . . . . . . .milliers ...... .milligramsmillihenriesmillihenries ...... . .... . . .. .. .millihenries . . .. .. .. .. . .... .milliliters ..... . ......... . .millimetersmillimetersmillimetersmillimetersmillimetersmillimeters . . . . ... . . .mils .. . .... .milsmilsmilsmilsBYTO OBTAIN2.778 X10- 5 yards601.5/§10-1510-69 X10 510-610- 610 310-1210-61/9 X 10- 1710 30.393710-2 §6.0152.54010-61.609 X 10 552806.336 X 1 O'1.609176044.70881.4671.6090.868426.8244.701.4671.6090.44702682881.60952.10609.425 X 10- 610 310-310 610-31/9 X 10-1 •10-30.1-3.281 X10- 30.039376.214 X10- 739.371.094 X 10- 32.540X10- 38.333 X 10- 510-32.540X10- 8mhos per meter-gramabfaradsfaradsstatfaradsgramslitersabohmsmegohmsohmsstatohmsabohms per centimeter cubemicrohms per inch cubeohms per meter-gramohms per mil footmicrohms per centimeter cubemeterscentimetersfeetincheskilometersyardscentimeters per secondfeet per minutefeet per secondkilometers per hourknotsmeters per minutecentimeters per second per secondfeet per second per secondkilometers per hour per secondmeters per second per secondcentimeters per secondfeet per secondkilometers per minuteknotsmiles per hourcubic incheskilogramsgramsabhenrieshenriesstathenriesliterscenti metersfeetinchesmilesmilsyardscentimetersfeetincheskilometers180 Appendix D


MULTIPLYminer's inchesminutes . . ...... . .minutesminutesminutes (angle)minutes (angle)months ....... . .. . . . ..... .months .. . . . . . . .. . .. .. . . ... . .. . .months ................. . .months .......... . .myriagramsmyriametersmyriametersBY1.56.944X10- 41.667 X 10- 29.921 X10- 52.909 X 1 0- 46030.4273043.8002.628 X 10 6101010TO OBTAINcubic feet per minutedayshoursweeksradiansseconds (angle)dayshoursminutessecondskilogramskilometerskilowattsohmsohmsohmsohmsohms per meter-gramohms per meter-gramohms per meter-gramohms per meter-gram ....... . .ohms per mil-foot ..... ... . . . . . .. . .ohms per mil-foot ...... . .ohms per mil-foot ...... . .ohms per mil-foot .. . .. . .ouncesouncesouncesounces ........ . . .. .ounces (fluid)ounces (fluid)ounces (troy) .. . . .. .ounces (troy)ounces (troy)ounces (troy)ounces per square inchpennyweights (troy)pennyweights (troy)pennyweights (troy) .. . . . ... ...... . .perches (masonry)pints (dry)pints (liquid) .. . . ... . .. . .. . .... . .pints (liquid)pints (I iqu id)pints (I iqu id)pints (I iqu id)pints (liquid) .. . .. . .pints (I iqu id)poundalspoundalspoundalspounds ...... . .10 910-610 61/9 X 10- 1110 5 /§10 2 /§39.37/§601.5/§166.20.16620.065241 .662 X 10- 3 §16437.528.350.06251.8050.0295748031.10200.083330.0625241.5550.0524.7533.60473.21.671 X 10- 228.874.732 X 10- 46.189x10- 40.1250.473213,82614.100.03108444,823abohmsm egohmsmicrohmsstatohmsabohms per ce ntimeter cubemicro hms per centimeter cubemicrohms per inch cubeohms per mil footabohms per centimeter cubemicrohms per centimeter cubemicrohms per inch cubeohms per meter-gramdramsgrainsgramspoundscubic in cheslitersgrainsgramspennyweights (troy)pounds (troy)pounds per square inchgrainsgramsounces (troy)cubic feetcubic inc hescubic centimeterscubic feetcubic in chescubic meterscubic yardsgallonslitersdynesgramspoundsdynesAppendix D 181


MULTIPLYpounds .. ... ...... . .. .. .. . . .poundspounds ....... . .pounds (troy)pounds .. . .... . ...... . .pound4eet .. . . . .. . .. .... . .pound4eet ...... .pound-feet .......... . . .. . .pounds-feet squared . .... . . . .pounds-feet squared ....... . . . .pounds-inches squared ..... . . . .pounds-inches squared .... .. . . .pounds of water .......... . .pounds of waterpounds of waterpounds of water per minutepounds per cubic foot ....... . . . . . . .pounds per cubic foot ...... . .pounds per cubic footpounds per cubic foot ...... . .pounds per cubic inch .. . . . . .. . .pounds per cubic inch ..... . .pounds per cubic inch .. . . . . . .. .pounds per cubic inch ... . . . . . .pounds per foot ........... . . . .pounds per inch ...... ... . . ... .pounds per mil foot . . ..... .pounds per square foot ..... . .pounds per square foot . .... . . . .pounds per square footpounds per square footpounds per square foot ...... .pounds per square inch .... . . .. .pounds per square inchpounds per square inchpounds per square inchpounds per square inch ..... . .quadrants (angle)quadrants (angle)quadrants (angle)quarts (dry)quarts (I iqu id) ..... . ...... . .quarts (liquid) .. . . . . .. . . . . . .. . . .. .quarts (I iqu id)quarts (liquid) ... . . . .... . . . .quarts (l iquid) .. . ... . . . .... . . . . . . .quarts (I iqu id)quarts (I iqu id)quintalsquiresradiansradiansradiansBY7000453.61632.170.82291.356 X10 713,8250.1383421.31442.9266.945 X 10- 30.0160227.680.11982.669 X 1 0- 40.0160216.025.787 X 10- 45.456 X 10- 927.682.768 X 10 417289.425 X 10- 61.488178.62.306 X 1 0 64.725 X10- 40.016021.414 X 10- 24.8826.944 X 10- 30.068042.3072.036703.11449054001 .57167.20946.43.342 X 10- 257.759.464 X 10- 41.238 X 10- 30.250.94631002557.3034380.6366TO OBTAINgrainsgramsouncespoundalspounds (av.)centi meter-dynescentimeter-gramsmeter-kilogramskilograms-centimeters squaredpounds-inches squaredkilograms-centimeters squaredpounds-feet squaredcubic feetcubic inchesgallonscubic feet per secondgrams per cubic centimeterkilograms per cubic meterpounds per cubic inchpounds per mil footgrams per cubic centimeterkilograms per cubic meterpounds per cubic footpounds per mil footkilograms per metergrams per centimetergrams per cubic centimeteratmospheresfeet of waterinches of mercurykilograms per square meterpounds per square inchatmospheresfeet of waterinches of mercurykilograms per square meterpounds per square foot<strong>de</strong>greesminutesradianscubic inchescubic centimeterscubic feetcubic in chescubic meterscubic yardsgallonsliterspoundssheets<strong>de</strong>greesminutesquadrants182 Appendix D


MULTIPLYradians per second . . . . . . ... . . .. . .radians per secondradians per secondradians per second per secondradians per second per secondradians per second per secondreamsrevolutionsrevol utionsrevol utionsrevolutions per minuterevolutions per minuterevolutions per minuterevolutions per minute per minuterevolutions per minute per minuterevolutions per minute per minuterevolutions per secondrevolutions per secondrevolutions per secondrevolutions per second per secondrevolutions per second per secondrevolutions per second per secondrods ...... .secondssecondssecondssecondsseconds (angle)spheres (sol id angle) ........ . .spherical right anglesspherical right anglesspherical right anglessquare centimeters .... . ... .square centimeters . . .. . .. .square centimeterssquare centimeterssquare centimeterssquare centimeterssquare centimeterssquare centimeters-centimeters squaredsquare feetsquare feetsquare feet ....... . .square feet .. . . ... .. . .. ... .square feet ...... .square feet ... . . . . . .square feetsquare feet-feet squaredsquare inches ........... . . . . .square inches ......... .square inchessquare inchessquare inchessquare inchesBYTO OBTAIN57.30<strong>de</strong>grees per second9.549revolutions per minute0.1592revolutions per second573.0revolutions per minute per minute9.549revolutions per minute per second0.1592revolutions per second per second500sheets360<strong>de</strong>grees4quadrants6.283radians6<strong>de</strong>grees per second0.1047radians per second0.01667revolutions per second1.745 x10-J radians per second per second0.01667revolutions per minute per second2.778x10- 4 revolutions per second per second360<strong>de</strong>grees per second6.283radians per second60revolutions per minute6.283radians per second per second3600revolutions per minute per minute60revolutions per minute per second16.5feet1.157X10- 5 days2.778 X 10- 4 hours1.667 X 10- 2 minutes1.654 X 10- 6 weeks4.848 X 10- 6 rad ians12.57sterad ians0.25hemispheres0.125spheres1.571sterad ians1.973 X 10 5 circular mils1.076 X10- J square feet0.1550square inches10-4square meters3.861 X 10- 11 square miles100square millimeters1.196X10- 4 square ya rds0.02402square inches-inches squared2.296 X 10- 5 acres1.833 X 10 8 circular mils929.0square centimeters144square inches0.09290square meters3.587 X 10- 8 square miles1/9square yards2.074 X 10 4 square inches-inches squared1.273 X 10 6 circular mils6.452square centimeters6.944x10- J square feet645.2square millimeters10 6square mils7.716 X 10- 4 square yardsAppendix D 183


MULTIPLYsquare inches-inches squared ....... .square inches-inches squaredsquare kilometerssquare kilometerssquare kilometers ... . .... . . . .. .square kilometerssquare kilometerssquare kilometerssquare meterssquare meterssquare meterssquare meterssquare meterssquare milessquare milessquare milessquare miles ..... . ...... . .square mill imeterssquare millimeters .. . . .. .square millimeterssquare mils ........ . ...... . .square mils .... . .. .square mils ........ . ... .... .square yards ....... . ....... .square yards ....... ... .square yards .. . . .... .square yards ... . .. .square yards ............ . . .. .statamperesstatamperesstatcoulombsstatcoulombsstatfarads ........ . . . . .. . . . . . .statfarads .... . . . .statfarads ..... . .stathenries ...... . .. . .... . .stathenries .. . . . .... .. . . .stathenries ............. . ...... . .statohms ........ .statohms ...... . .. . .. .. .statohms ..... . .statohmsstatvolts ... . . . .statvoltssteradianssteradianssteradianssterestemperature (<strong>de</strong>grees Celsius) + 273temperature (<strong>de</strong>grees Celsius) + 17.8temperature (<strong>de</strong>grees Fahrenheit) + 460temperature (<strong>de</strong>grees Fahrenheit) - 32tons (long)tons (long) ..... . ...... .. ...... .BY41.624.823 X 1 0- 5247.110.76 X 1061.550 X 10"10 60.38611.196X1062.471 X 10- 410.7615503.861 X 10- 71.19664027.88 X 1062.5903.098 X 1061.973 X 10 30.011.550 X 10- 31.2736.452 X 10-610-62.066 X 10-'912960.83613.228 X 10- 71/3X 10- 101/3X10-"1/3X 10- 101/3X10- 101/9 X 10- 201/9 X 10- 111/9 X 10- 59 X 10 209 X 10 119 X 10 1 •9 X 10 209 X10 59X10 179X10 113 X 10 103000.15920.079580.636610 311.815/910162240TO OBTAINsquare centimeters-centimeters squaredsquare feet-feet squaredacressquare feetsquare inchessquare meterssquare milessquare yardsacressquare feetsquare inchessquare milessquare yardsacressquare feetsquare kilometerssquare yardscircular milssquare centimeterssquare inchescircular milssquare centimeterssquare inchesacressquare feetsquare inchessquare meterssquare milesabamperesamperesabcoulombscoulombsabfaradsfaradsmicrofaradsabhenrieshenriesmillihenriesabohmsmegohmsmicrohmsohmsabvoltsvoltshemispheresspheresspherical right angleslitersabsolute temperature (<strong>de</strong>grees Celsius)temperature (<strong>de</strong>grees Fahrenheit)absolute temperature (<strong>de</strong>grees Celsius)temperature (<strong>de</strong>grees Celsius)kilogramspounds184 Appendix D


MULTIPLYtons (metric) .. .... .tons (metric) . . .. . . . .. .tons (short) ... . . . ... . . ..... . .. .tons (short) .... .. . . . ... . . .. . . .tons (short) per square foot . . . . .. . .tons (short) per square foottons (short) per square inchtons (short) per square inch ... . . . .voltsvoltsvolts per inchvolts per inchwattswattswattswattswattswattswattswatt-hourswatt-hourswatt-hourswatt-hourswatt-hourswatt-hourswebersweeksweeksweeksyardsyards .. . . . . . . . . .. . . ... . . . . . . .yardsyardsyards ............ . .years (common)years (common)years (leap) ......... . . .years (leap)BY10 32205907.22000976513.891.406 X 10 6200010 81/3003.937 X 10 71.312x10- 30.0568810 744.270.73781.341 X 10- 30.0143310-33.41326561.341 X 10- 30.860367.210-310 816810,080604,80091.443360.91445.682 X 10- 436587603668784TO OBTAINkilogramspoundskilogramspoundskilograms per square meterpounds per square inchkilograms per square meterpounds per square inchabvoltsstatvoltsabvolts per centimeterstatvolts per centimeterBritish thermal units per minuteergs per secondfoot-pounds per minutefoot-pou nds per secondhorsepowerkilogram-calories per minutekilowattsBritish thermal unitsfoot-poundshorsepower-hourskilogram-calorieskilogram-meterskilowatt-hoursmaxwellshoursminutessecondscentimetersfeetinchesmetersmilesdayshoursdayshoursAppendix D 185


INDEXAAbbreviated Entry 7Abbreviations 167-169Absolute (ABS) Value 37, 135Addition Priority 19, 22Arc Cosine (ACOS) Function 46-47Arc Sine (ASIN) Function 46-47Arc Tangent (AT AN) Function 46-47Advance Printer 159Algebraic NotationWith Operator Prece<strong>de</strong>nce (ALG) 19With No Operator Prece<strong>de</strong>nce (ALGN) 20-22,113Angular Mo<strong>de</strong>sDegrees 25Rad ians 25Annual Effective Rate 67Annuities 70-74Arc Cosecant 47Arc Cosine 46Arc Cotangent 47Arc Secant 47Arc Sine 46Arc Tangent 46ArrowsDown 6,79Right 6, 81Up 6, 79Asterisks 9Automatic PUSH 25BB (see Balloon Payment)Balloon Payment (BAL) Function 64Back Space Key 6Back Step Instruction 79BasesNumber 25Bit ManipulationAND 155LSHF 155RSHF 155OR 147,155XOR 148,155BITS 29BranchingConditional 87Unconditional 87BREAK Key 2, 77-78,160cCALCULATOR, Used With BASIC 162Ca ll Subroutine Instruction 91Cartesian Coordinate System 150CartridgeInsertion 2Celsius 31Centimeters 32Change Sign Function 37ClearCurrent Entry Instruction 6for Interest Calculations Mo<strong>de</strong> 63for Statistical Calculations Mo<strong>de</strong> 135, 138Memory Display 18Program"Memory 76Stack Display and Prompt Line 13, 25X Register (CLX) 12With Control Key 6With Shift Key 6Clear Key bCommandEntry 6Terminology 3Compound InterestCalculations 66-67Mo<strong>de</strong> 63, 65Computation Mo<strong>de</strong>sALG 19ALG 19RP N 19Continue Program Instruction 86,102-103Continuous Compounding 69CONTROL Key 3, 6ConventionsKeyboard 2-3Conversion Factors 148, 171Conversions, Built-InCelsius 31Cup 32Degrees 32-33Fahrenheit 31Feet 32Fluid Ounces 32Gallons 32Grams 32Hexa<strong>de</strong>cimal 27Inches 32Kilograms 32Kilometers 32Length 31-32In<strong>de</strong>x 187


Liters 32Mass 31-32Meters 32Miles 32Ounces 32Polar 33-34Pounds 32Quarts 32Radians 32Rectangular 33-34Tablespoon 32Teaspoon 32Volume 31-32Yards 32Coordinate Systems 33, 152Correlation Coefficient 52, 135, 138Cos ine (COS) Function 46-47Cosecant Function 47Cotangent Function 47CTRL Key (see CONTROL Key)DFFactorial (FACT) Function 41,114,116Fahrenheit 31Filespec 161FinancialOptions 18, 63Functions 63FIND Mo<strong>de</strong> 64FIX Mo<strong>de</strong> 28Floating Point Notation 25Fraction (FRAC) Function 37-38FunctionsAlgebraic 41Entry of 6, 55Fundamental 37-40Hyperbolic (see Hyperbolic Functions) 47-48Statistics 49Trigonometric 46Future Value Functionof an Annuity Due 70of an Ordinary Annuity 71Default Options 9, 76DegreesConversion to Gradians 33Conversion to Radians 32Mo<strong>de</strong> 25Delete Current Instruction Command 84DELETE Key 6Deviation Standardof X 51, 140of Y 52, 135, 138Disk Drive 1, 160Disk Operating System 160Display, numberBITS 29-30FIX 28Display Control Keys 5Division Priority 19, 21DOS (see Disk Operating System)EEnd Program Mo<strong>de</strong> 77ENTER Mo<strong>de</strong> 63-64EntryAbbreviated 7,167, 169of Functions 167-169Token 167-169Error MessagesDisk 1/0 1641/0 163-164Exclusive OR Function 19,147, 156Exchange X With Memory Command 17-18Exchange X and Y Registers Command 13Exponent 25Exponentiation 41, 60Base e 41Base 10 41GGOTO Instruction 87Gradians 33HHexa<strong>de</strong>cimal Base 27Maximum Range in Decimal 17Hyperbolic Functions 47Arc Hyperbolic Cosecant 47Arc Hyperbolic Cosine 47Arc Hyperbolic Cotangent 47Arc Hyperbolic Secant 47Arc Hyperbolic Tangent 47Hyperbolic Cosecant 47Hyperbolic Cosine 47Hyperbolic Cotangent 47Hyperbolic Secant 47Hyperbolic Sine 47-48Hyperbolic Tangent 47Indirect Mo<strong>de</strong> (see Program Mo<strong>de</strong>) 75Inductors 125, 133Input/Output Devices 159Disk Drive 161Program Recor<strong>de</strong>r 161INSERT Key 80I nsert Character Instruction 80Insert Number Instruction 81Integer (I NT) Function 38Interest Rate 64, 66-69188 In<strong>de</strong>x


KKeyboardConventions 2Named Keys 2Symbols 2-3LLinear Regression 49, 53List (LIST) Program Instruction 78List Memo ry (LiSTM) Instruction 15Load Program (LOAD) Instruction 161Load Memory (LOADM) Instruction 161LogarithmBase 10 42, 121Natural 42, 133Logica l AND Instru ction 155Logica l Exclusive OR Instru ctio n 156Logical I nclusive OR Instructio n 155Logical Left Shift (LSHF) Instru ction 156Logica l Right Shift (RSH F) Instru ction 157Loops 143MMean of X (XMEAN) Function 51, 118M ean of Y (YMEAN) Function 51,135,138Memory 14Memory Display 9Modulo (MOD) Function 45Multiplication Priority 19pParentheses, Use of 19, 21, 23Pause Instruction 100Payment per Period Instruction 65Pi Function 38, 124Polar Coordinate System 150Polar/Rectangular Conversion 33-34Pop Command 12,135Pop Call Stack (POPC) Instruction 94-95Population Growth (see Exponentiation)Power Function 42-43Prece<strong>de</strong>nce, Operator 19Present Value Function 65of an Annuity Due 72of an O rdinary A nnuity 73Print X Command 159PrintAdvance 159ON 159OFF 159Probability Example 104-105Program Counter 101Program Mo<strong>de</strong> 75-76Programming ExamplesAlgebraic and Trigonometric 105-116Automotive 135-138Bit Manipulation 147Conversions 148-151Interest Calculations 144Radio 11 7-133Statistics 140-143Prompt Line 9Prompt Symbol 9Pu sh Command 11NN-Weighting 50Natural Logarithm (LN) Function 42, 133No Operation (NOP) Instruction 82No Trace (NOTRC) Instruction 100Number BasesConversio n of 26Decimal 25Hexa<strong>de</strong>cimal 27Octal 26Number Display in Scroll Area 9Number of Periods 65Number Stack 10-11oOctal Base 26Maximum Range in Decimal 17O hm's Law 122Operators 3, 19RRadians 25Conversion (C RAD) 32Mo<strong>de</strong> 25RAM (see Random Access Memory)Random Access Memory 9, 75RCL (see Recall) 14-15Recall Command 14-15Reciprocal (REC IP) Fu nction 38,124Rectangular Polar Conversion 34-35Reset Program Counter In struction 101RETURN Key 6Return from Subroutine In struction 91Return X Given Y Instruction 52-53Return Y Given X Instruction 52-53Re verse Polish Notation (RPN) 15,22, 108, 116Root Function 42-43Round (ROU) Function 39RPN (see Reverse Polish Notation) 22, 23Run Program Instruction 78In<strong>de</strong>x 189


sSave Program (SAVE) Instruction 161Save Memory (SAVEM) Instruction 161Scroll AreaFields 9Secant Function 47SHIFT Key 5Sigma (~)Minus 50Plus 49-50Sine (SIN) Function 46-47Single Step (SS) Instruction 79Slope (SLO) Function 52,135,138SPACE BAR 2RPN Use 22-23Spherical Coordinate System 152Square (SQU) Function 39, 126-127Square Root (SQRT) Function 39, 126-127Stack, Number 3, 11Stack, Call 78, 91, 94Stack Display 9Standard Deviation (see Deviation)Statistics Headings 49Status Display 9, 18Stop Program (STP) Instruction 85STORE Command 14Subtraction 19Sum to Memory (SUM) Instruction 16-17Summation Program Example 103SYSTEM RESET Key 6, 76TTangent (TAN) Function 46-47, 105-107Terminology 3Token Entry 6, Appendix CTrace (TRC) Instruction 98Transformer 132Truncate (TRUNC) Function 40, 155Two's Complement 30vVariance of X 51Variance of Y 51Vectors 127xXEQ 87XGE 87,91XL T 87, 91XNE 87, 91XCHGY 13XCHM 17yY-Intercept 52190 In<strong>de</strong>x


LIMITED 90-DA Y WARRANTYON ATARI® PERSONAL COMPUTER PRODUCTSAT ARI, INC. (" ATARI") warrants to the original consumer purchaser that this AT ARI Personal Computer Product (not including computerprograms) shall be free from any <strong>de</strong>fects in material or workmanship for a period of 90 days from the date of purchase. If any such <strong>de</strong>fectis discovered within the warranty period, ATARI 's sole obligation will be to repair or replace, at its election, the Computer Product free ofcharge on receipt of the unit (charges prepaid, if mailed or shipped) with proof of date of purchase satisfactory to AT ARI at any authorizedAT ARI Servi ce Center. For the location of an authorized ATARI Service Center nearest you, call toll-free:In California (800) 672-1430Continental U.S. (800) 538-8547or write to:<strong>Atari</strong>, Inc.Customer Service Department1340 Bor<strong>de</strong>aux DriveSunnyvale, CA 94086YOU MUST RETURN D EFECTIVE COMPUTER PRODUCTS TO AN AUTHORIZED ATARI SERVICE CENTER FOR IN-WARRANTYREPAIR.This warranty shall not apply if the Computer Product: (i) has been misused or shows signs of excessive wear, (ii) has been damaged bybeing used with any products not supplied by A TARI , or (iii) has been damaged by being serviced or modified by anyone other than anauthorized AT AR I Service Center.ANY APPLICABLE IMPLIED WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULARPURPOSE , ARE HEREBY LIMITED TO NINETY DAYS FROM THE DATE OF PURCHASE . CONSEQUENTIAL OR INCIDENTALDAMAGES RESULTING FROM A BREACH OF ANY APPLICABLE EXPRESS OR IMPLIED WARRANTIES ARE HEREBY EXCLUDED. Somestates do not allow limitations on how long an implied warranty lasts or do not allow the exclusion or limitation of inci<strong>de</strong>ntal or consequentialdamages, so the above limitations or exclusions may not apply to you.This warranty gives you specific legal rights and you may also have other rights which vary from state to state.DISCLAIMER OF WARRANTYON ATARI COMPUTER PROGRAMSAll ATARI computer programs are distributed on an " as is" basis without warranty of any kind. The entire risk as to the quality andperformance of such programs is with the purchaser. Should the programs prove <strong>de</strong>fective following their purchase, the purchaser andnot the manufacturer, distributor, or retailer assumes the entire cost of all necessary servicing or repair.AT ARI shall have no liability or responsibility to a purchaser, customer, or any other person or entity with respect to any liability, loss, ordamage caused directly or indirectly by computer programs sold by ATARI. This disclaimer inclu<strong>de</strong>s but is not limited to any interruptionof service, loss of business or anticipatory profits or consequential damages resulting from the use or operation of such computerprograms.REPAIR SERVICEIf your ATARI Personal Computer Product requires repair other than un<strong>de</strong>r warranty, please contact your local authorized ATARIService Center for repair information.IMPORTANT: If you ship your AT ARI Personal Computer Product, package it securely and ship it, charges prepaid and insured, by parcelpost or United Parcel Service.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!