Monday, February 14, 2022

Retro Review: Casio fx-4000P

Retro Review:   Casio fx-4000P





Quick Facts:


Model:  fx-4000P

Company:  Casio

Years:  1985 - 1989

Battery:  2 x CR2032

Display:  10 digits, 2 digit exponent

Logic:  Algebraic - type in expressions the way you write them

Memory:  Up to 550 programming steps or up to 94 memory registers

Contrast Wheel

Wallet with operation guide (if included, depends on where you buy from)


The Casio fx-4000P holds up its value as it is a popular vintage programming calculator. Prices are about $30 US and above.  

 

Features


Four Basic Modes:


* COMP:  Computer Mode, general calculations


* BASE-n:  Base conversions in the standard four bases decimal, binary, octal, and hexadecimal.  Boolean functions and, or, not, and neg are included.   Binary numbers have a 32 bit capacity, in 4 blocks of 8 each.  


*  SD:  Single Variable statistics


*  LR:  Linear Regression, y = A + Bx


Statistics Variables:

U = Σx^2

V = Σx

W = n

P = Σy^2

Q = Σy

R = Σxy


A = y-intercept

B = slope

r = correlation


As with many Casio calculators, the rectangular and polar conversions store their results in two variables.   For the fx-4000P:


Pol(x,y) stores r in I, Θ in J

Rec(r,Θ) stores x in I, y in J


This is the same as the Casio current fx-5800P.  


The fx-4000P has integer part (Int), fractional part (Frac), and absolute value (Abs).  


Memory and Arrays


The Defm mode allows the user to set the number of memory registers.   The minimum amount of memory registers is 26 (A - Z).   The user can add additional registers at a cost of 8 programming steps each, up to 94 memory registers (leaving only 6 programming steps).   


The fx-4000P allows for indirect storage, which takes the form of:


letter[# of steps from that letter]


For example:

A[0] returns what is stored in A,

A[1] returns what is stored in B,

A[2] returns what is stored in C,

and so on.


By allocating additional registers, 

Z[1] returns what is stored in the 27th register,

Z[2] returns what is stored in the 28th register,

Z[3] returns what is stored in the 29th register,

and so on. 


Variables are allowed.  For example, if 2 is stored in I,  then:


15 → A[ I ] stores 15 in C (2 steps from A).

  

The tilde command is allows us to store a value in multiple registers.  The tilde acts like a Fill function.


For example:  12 → A ~ D  stores 12 in A, B, C, and D.  


Programming


The programming mode of the fx-4000P has a capacity of 550 steps, which can be allocated into 10 slots, Prog 0-9.   The maximum step capacity is reached when the minimum of memory registers is set, 26.  (Defm 0).  The language is Casio Basic:


:

colon that ends each line (except for ◢)


→   

store 


◢  

stop and display (Disp indiciator lights up)


Goto/Lbl #   

up to 10 lables 0-9


Isz var  

increment var by 1 and skip next command if var = 0


Dsz var

decrement var by 1 and skip next command if var = 0


Use Isz and Dsz to simulate For-Next loops


[test]  ⇒ [do if true, skip if false] : [ next command ]

simple If/Then jump structure (displayed on the keyboard is a solid, bold arrow)


Prompting is a little different, as the string must be followed by a colon, then a question mark is used:

"prompt" : ? → var


Example:   Prompt for the user to enter an angle and store it A.   

"ANGLE" : ? → A


We can display a string for a brief pause, simulating a Wait command by this:

"time" → var : Lbl # : "string" : Dsz var : Goto # 


For example, the string "45" is displayed for 25 counts:

25 → I : Lbl 1 : "45" : Dsz I : Goto 1


Strings can also contain the characters engineering symbols k, m, μ, n, p (but not use these in calculations), a solid square, and the angle symbols °, ^r, and ^g (which also allow the user to override the current angle). Strangely, the symbols Θ and % are not included.  


The use of Prog (key is labeled [Prg]) in programs will allow for the use of subroutines.  For subroutines, an implied Return command is added to the end of the subroutine.  


To save space, use → without closing all the parenthesis.  The Ans (last answer) can also be used in between steps.   In COMP mode, pressing equals closes all pending parenthesis.  


The programming structure of the fx-4000P, along with the fx-7000g and fx-6300g,  provide a base for future Casio programming and later graphing calculators.  


Sample Programs:

(spaces and returns provided for readability)


PO:  Σ( (A*x+B)^C from x = 0 to N )

(65 steps)


"A" : ? → A :

"B" : ? → B :

"C" : ? → C :

"N" : ? → N :

0 → S :

Lbl 1 :

S + (A N + B) x^y C → S

Dsz N : Goto 1 : 

S + B x^y C → S


Examples: 

A = 2, B = 6, C = 2, N = 4;  Result = 540

A = 5, B = -2, C = 3, N = 5;  Result = 20727


P1:  Payment of a Mortgage

(64 steps)

P = loan amount

R = periodic rate

N = number of payments

M = payment 

Cash flow convention is followed.


Fix 2 :

"PV" : ? → P :

"RATE" : ? → R :

"N" : ? → N :

.01 R → S :

"PMT" ◢

-P S ÷ (1 - (1 + S) x^y ( -N → M ◢

Norm


Example:

Monthly payment of a $320,000.00 loan at 4% annual for 30 years.

P = 320000, R = 4 ÷ 12, N = 30 × 12; Result -1527.73  (payment of $1,527.73)


If you want to a series of programs for the fx-4000P and possible what they would look like for the fx-5800P/graphing calculators, please let me know in the comments. 


Closing Thoughts


The Casio fx-4000P is a good, entry level programmable calculator which includes a good amount of programming steps.  


The fx-4000P reminds me of the current Casio fx-3650P(II) and what the latter lacks.   I wish the next incarnation of the fx-3650P had the integer, fractional, absolute value, and the ability to use strings with the full alphabet.   The only advantage the fx-3650P has is the derivative, integral, and fractions. 


The fx-4000P runs decently fast and the screen has a big display of characters and results, and it holds up as a favorite.  


Eddie


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



Spotlight: Sharp EL-5200

  Spotlight: Sharp EL-5200 As we come on the 13 th (April 16) anniversary of this blog, I want to thank you. Blogging about mathematic...