Home > HP > Calculator > HP 15c Manual

HP 15c Manual

Here you can view all the pages of manual HP 15c Manual. The HP manuals for Calculator are available online for free. You can easily download all the documents as PDF.

Page 71

 Section 6: Programming Basics 71 
 
The program to calculate this information uses these formulas and data: 
base area = r2. 
volume = base area × height = r2h. 
surface area = 2 base areas + side area = 2r2 + 2rh. 
 
Radius, r Height, h Base Area Volume Surface Area 
2.5cm 8.0 cm ? ? ? 
4.0 10.5 ? ? ? 
4.5 4.0 ? ? ? 
TOTALS   ? ? ? 
Method: 
1. Enter an r value into the calculator and save it for other calculations. 
Calculate  the  base  area  (r2),  store  it  for  later  use,  and  add  the...

Page 72

72 Section 6: Programming Basics 
 
 
Keystrokes Display   
´bA 001-42,21,11  Assigns this program the label 
―A‖. 
O 0 002-   44  0  Stores the contents of X-register 
into R0. r must be in the X-
register before running the 
program. 
|x 003-   43 11  Squares the contents of the X-
register (which will be r). 
|$ 004-   43 26   
* 005-      20  r2, the BASE AREA of a can. 
O 4 006-   44  4  Stores the BASE AREA in R4. 
O + 1 007-44,40, 1  Keeps a sum of all BASE 
AREAS in R1. 
¦ 008-      31  Stops to...

Page 73

 Section 6: Programming Basics 73 
 
 
Keystrokes Display  
+ 019–      40 SIDE AREA + BASE AREA 
= SURFACE AREA. 
O + 3 020–44,40, 3 Keeps a sum of all SURFACE 
AREAS in R3. 
| n 021–   43 32 Ends the program and returns 
program memory to line 000. 
Now, lets run the program: 
Keystrokes Display  
| ¥  Sets calculator to Run mode. 
(PRGM cleared.) 
´ CLEAR Q  Clears all storage registers. The 
display does not change. 
2.5 2.5 Enter r of the first can. 
´ A  
(or: G A) 
19.6350 Starts program A. BASE...

Page 74

74 Section 6: Programming Basics 
 
 
Keystrokes Display  
4 4 Enter h of third can. 
¦ 254.4690 VOLUME of third can. 
 240.3318 SURFACE AREA of third can. 
l 1 133.5177 Sum of BASE AREAS. 
l 2 939.3362 Sum of VOLUMES. 
l 3 769.6902 Sum of SURFACE AREAS. 
The  preceding  program  illustrates  the  basic  techniques  of  programming.  It 
also  shows  how  data  can  be  manipulated  in  Program  and  Run  modes  by 
entering,  storing,  and  recalling  data  (input  and  output)  using v, 
O, l, storage...

Page 75

 Section 6: Programming Basics 75 
 
Keycode 25: second row, fifth key. 
Memory Configuration 
Understanding  memory  configuration  is  not  essential  to  your  use  of  the 
HP-15C.  It  is  essential,  however,  for  obtaining  maximum  efficiency  in 
memory and programming use. The more you program, the more useful this 
knowledge  will  be.  Memory  configuration  and  allocation  is  thoroughly 
explained in appendix C, Memory Allocation. 
Should you ever get an Error 10, you have run up against...

Page 76

76 Section 6: Programming Basics 
 
 
Memory  is  reallocated  by  telling  the  calculator  which  data  storage  register 
shall be the highest data register; all other registers are left for programming 
and advanced functions. 
Keystrokes Display  
60 ´ m %* 60.0000 R60 and below allocated to data 
storage; five (R61 to R65) remain 
for programming. 
                                                           * The optional omission of the ´ keystroke after another prefix key is explained on page 78,...

Page 77

 Section 6: Programming Basics 77 
 
 
Keystrokes Display  
1 ´ m % 1.0000 R1 and R0 allocated for data 
storage; R2 to R65 available for 
programming and advanced 
functions. 
19 ´ m% 19.0000 Original allocation: R19 (R.9) and 
below for data storage; R20, to 
R65 for programming and 
advanced functions.* 
lm% 19.0000 Displays the current highest data 
register. 
The m and W (memory  status) functions  are  described  in  detail  in 
appendix C. 
Keep  in  mind  that  an  error  message  will  result...

Page 78

78 Section 6: Programming Basics 
 
corresponding  label.  If  need  be,  the  search  will  wrap  around  at  the  end  of 
program  memory  and  continue  at  line  000.  When  it  encounters  an 
appropriate label, the search stops and execution begins. 
If  a  label  is  encountered  as  part  of  a  running  program,  it  has  no  effect,  that 
is,  execution  simply  continues.  Therefore,  you  can  label  a  subordinate 
routine within a program (more on subroutines in section 9). 
Since the...

Page 79

 Section 6: Programming Basics 79 
 
For  example, ´b´A becomes ´bA, ´m´% 
becomes ´m%,  and O´# becomes O#. 
The removal of the ´ is not ambiguous because the ´-shifted function 
is the only logical one in these cases. The keycodes for such instructions do 
not include the extraneous ´ even if you do key it in. 
User Mode 
User  mode  is  a  convenience  to  save  keystrokes  when  addressing  (calling 
up) programs for execution. Pressing ´U will exchange the  primary 
functions  and ´-shifted...

Page 80

80 Section 6: Programming Basics 
 
Example: Write  a  program  for 5x4 + 2x3 as (((5x + 2)x)x)x, then  evaluate 
for x = 7 
Keystrokes Display  
| ¥ 000- Assumes position in memory 
is line 000. If it is not, clear 
program memory. 
´ b B 001-42,21,12  
5 002-       5  
* 003-      20 5x. 
2 004-       2  
+ 005-      40 5x + 2. 
* 006-      20 (5x + 2)x. 
* 007-      20 (5x + 2)x2. 
* 008-      20 (5x + 2)x3. 
| n 009-   43 32  
| ¥  Returns to Run mode, Prior 
result remains in display. 
7 v v 
v...
Start reading HP 15c Manual

Related Manuals for HP 15c Manual

All HP manuals