Saturday, August 29, 2026

The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S

 The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S


Not too long ago, I purchased this very colorful, four function calculator from the University I work at, the Dexin BST DX-818.





The DX-818 is powered by a solar panel with an option to be run by an AAA battery when using the calculator in less than bright light conditions. The AAA battery is optional.



A Standard Calculator



This calculator is the standard four function key calculator, complete with the square root function, percent function, the standard three memory keys (M+, M-, and MRC), and a grand total (GT) key. A grand total is started when calculations are completed by pressing the equals key [ = ]. The grand total is both recalled and cleared when the [ GT ] is pressed.



The Markup Equation



Before we head to the calculators, the mark up is a calculation of between selling price (new), cost (old), and mark up. The markup is ratio between the selling price and cost over cost and as expressed as a percentage (%):



MU = (selling price – cost) ÷ cost = (selling price ÷ cost - 1)



Solving for the other variables yield:

selling price = cost * (1 + MU)

cost = selling price ÷ (1 + MU)

In these equations, MU is expressed as a decimal.



If let the selling price be the new value and cost be the old value, then we have the equation for percent change (Δ%):

Δ% = (new – old) ÷ old = (new ÷ old - 1)

Similarly:

new = old * (1 + Δ%)

old = new ÷ (1 + Δ%)

In these equations, Δ% is expressed as a decimal.



The Markup Key (MU)



On this particular calculator, there is an [ MU ] key. This is the markup key. Apparently, there are two types of [ MU ] key, one set of syntax for Casio calculators with the [ MU ] key. An example of a Casio calculator with an [ MU ] key is the MJ-120D plus. They way Casio calculators use the [ MU ] key is a calculation:



cost [ MU ] markup percentage [ % ] returns selling price.

Immediately pressing [ = ] returns selling price – cost.



However, some calculators, like the colorful calculator featured (I really wish I knew the model number) with the [ MU ] have another syntax, and that is what I will address from here on out.





On this particular calculator, the syntax, using one of the four arithmetic functions is:


y < +, -, ×, or ÷ > x [ MU ]


No use of the equals key is needed, unless you want to add the result to the grand total.



The four calculations with the [ MU ] key, on this particular calculator (and possibly the NewYes calculators from China) are:



Key Sequence

Formula Used

Notes

Y [ + ] X [ MU ]

100 * (Y ÷ X + 1)


Y [ - ] X [ MU ]

100 * (Y ÷ X - 1)

Calculates markup or percent change (Δ%).

Y = selling price, new value

X = cost, old value

Y [ × ] X [ MU ]

Y * (1 + X ÷ 100)

Adds X% to Y. Calculates the new value (selling price) given old value (cost) (Y) and markup (X).

Y [ ÷ ] X [ MU ]

Y ÷ (1 – X ÷ 100)

Finds the original retail price given selling price (Y) and discount rate (X). This can also be used for gross-up calculations.



Sample Calculations



Problem

Keystrokes

Result

Determine 100 * (Y ÷ X + 1) with Y = 420, X = 25

420 [ + ] 25 [ MU ]

1780

An item that cost the company $14.75 sells for $19.99. Find the markup.

19.99 [ - ] 14.75 [ MU ]

35.5254237288

(≈35.53%)

A company manufactures a product with a unit cost of $32.84 and wants a 20% markup. What is the selling price?

32.84 [ × ] 20 [ MU ]

39.408

(about $39.41)

A product is currently on sale for $39.99. If the discount is 35%, what is the original retail price.

39.99 [ ÷ ] 35 [ MU ]

61.523076923

(about $61.52)




RPN Programming with the Swiss Micros DM42



Here are four RPN programs, which are were programmed using a Swiss Micros DM42, which can be used on the HP 42S (and probably the HP 41C).



Program MU+: Y [ + ] X [ MU ]

00 {17-Byte Prgm}

01 LBL “MU+”
02 ÷

03 1

04 +

05 100

06 ×

07 RTN

08 END



Program MU-: Y [ - ] X [ MU ]

00 {17-Byte Prgm}

01 LBL “MU-”
02 ÷

03 1

04 -

05 100

06 ×

07 RTN

08 END



Program MUMLT: Y [ × ] X [ MU ]

00 {12-Byte Prgm}

01 LBL “MUMLT”
02 %

03 +

04 RTN

05 END



Program MUDIV: Y [ ÷ ] X [ MU ]

00 {21-Byte Prgm}

01 LBL “MUDIV”
02 ENTER

03 100

04 ÷

05 1

06 X<>Y

07 -

08 ÷

09 RTN

10 END



Sources


 Casio. “MJ-120D Plus” https://www.casio.com/intl/basic-calculators/product.MJ-120DPLUS/ Accessed May 23, 2026.


Eaton, Glenn. “The Calculator MU Key” Eaton Family Website. Posted on June 30, 2017. https://eatonfamily.au/calculator-mu-key/ Accessed May 23, 2026.


“How to use the MU button on a calculator? #1” YouTube Short: @newyes1162. Posted December 5, 2022. https://www.youtube.com/shorts/OiS8yFKKJSU Accessed May 23, 2026


Eddie


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


Guest Post: Why Kids (and Adults) Are Rediscovering the Abacus in the Age of Calculators by The AbacusTool Team

Today’s post is a guest post by The AbacusTool Team, and it is about discovering mathematics by using the time-honored tool, the abacus. I have a small abacus collection, including a small eight rod abacus that sits at my desk at work. I have a working knowledge of adding, subtracting, and multiply, though I am no expert. I love how the abacus is set up to efficiently add and subtract. We can set the decimal point anywhere among the rods. I enjoy using the abacus and appreciate how it contributed to mathematics and education.

And now, here's the guest post from The AbacusTool Team, as a request. I thank The AbacusTool Team. Please visit their website at https://abacustool.xyz/.

Eddie

------------------------

From the AbacusTool Team: 

(pictures are from the AbacusTool Team)

A child's hands moving beads on a wooden soroban abacus during mental math practice


A few months ago, I watched a nine-year-old solve a three-digit addition problem in her head faster than I could type it into my phone. No calculator, no scratch paper — just her fingers twitching slightly in the air as she "saw" the numbers. She'd been training on an abacus for about a year.

It's a strange thing to witness in 2026. We carry supercomputers in our pockets, yet one of the oldest counting tools on earth — a wooden frame with sliding beads — is having a real moment in classrooms and homeschool circles again. Here's why, and how you can actually try it yourself without buying anything.

The Tool Everyone Forgot About

The abacus isn't new. Counting boards go back to Mesopotamia around 2700 BCE, and versions of it evolved independently across Rome, Greece, China, and Japan over the following millennia. China's suanpan — with two beads on top and five below each rod — shows up in written records from the Han dynasty, roughly 200 BCE. Japan later adapted the design into the soroban, simplifying it down to one top bead and four bottom beads, which is now the standard taught in most abacus classes worldwide.

What's interesting isn't the history trivia, though — it's what happens in someone's brain after enough practice.

It's Not About the Beads, It's About What Happens After



Illustration depicting the concept of mental abacus, visualizing bead calculations inside the mind



The real payoff isn't learning to move beads quickly. It's what researchers call mental abacusthe ability to visualize the bead frame in your head and manipulate it without a physical tool in front of you. Once that clicks, people can add and subtract multi-digit numbers almost as fast as punching them into a calculator.

This isn't just anecdotal. Cognitive psychologist James Stigler's research in the 1980s, along with follow-up studies since, found that trained abacus users develop distinct visual-spatial strategies for arithmetic that regular calculator use never builds. It's less "memorizing math facts" and more "training a mental workspace."

That's also why abacus programs like UCMAS and Aloha have stuck around for decades — they're not really teaching a tool, they're teaching a cognitive habit.

Who Actually Benefits From This



A laptop displaying an interactive online abacus tool for practicing mental math


Young kids (5–12) tend to take to it fastest, mostly because numbers stop being abstract. A kid who struggles to understand what "36" means can physically see it as three beads and one heaven bead. That concreteness seems to matter a lot for how quickly place value clicks.

Students get a more practical edge — faster mental math during exams, quicker estimation, less reliance on a calculator for basic arithmetic.

Adults are honestly an underrated group here. Abacus practice functions a bit like a puzzle app, except it's also sharpening real-world skills — splitting a bill, estimating a tip, doing quick math at work. It's turning into a fairly popular low-key brain-training habit for people who've aged out of "flashcards."

Teachers and parents use it as a physical teaching aid, especially for explaining carrying, place value, and basic operations in a way that clicks visually instead of just numerically. Some even print practice worksheets for offline drilling when screen time isn't the goal.

You Don't Need to Buy One to Try It



Side-by-side comparison of a Chinese suanpan and a Japanese soroban abacus


This is the part that surprised me most — you don't actually need a physical abacus to start. There are free interactive versions online now that replicate real bead logic (not a gimmicky animation), let you switch between Soroban and Suanpan styles, and throw practice problems at you so it doesn't feel like homework.

I've been using AbacusTool.xyz to get a feel for both styles before deciding whether to buy a physical one for my kid. It's free, doesn't ask for a signup, and has a built-in tutorial that starts from "here's what a bead is worth" and works up to actual multi-digit calculations. There's also a step-by-step solver that shows you exactly how a problem is worked out bead by bead, which honestly made more sense to me than most YouTube tutorials.

If you want to go further, it's worth trying flash anzan drillsnumbers flash on screen and you add them mentally, visualizing the beads instead of looking at a physical frame. It's the same drill competitive mental-math kids use, and it's brutal at first, then oddly addictive. There's also a complement drills tool for practicing the 5- and 10-complement technique, which is the actual foundation that makes fast abacus calculation possible — most beginners skip it and then wonder why they're stuck.

If you're not sure where to start, there's a structured learning path that walks you from complete beginner to mental calculation in order, instead of randomly clicking around.

Abacus vs. Vedic Math vs. Just Using a Calculator

People sometimes ask whether abacus training is "better" than Vedic math tricks or just... learning to type fast on a calculator. They're not really competing with each other:

  • Abacus builds visualization and number sense, especially in younger kids who need something concrete to hold onto.

  • Vedic math teaches shortcut techniques and works better once someone already understands how arithmetic works.

  • Calculators are just faster for anything complex — nobody's suggesting you long-divide a mortgage payment by hand.

The abacus isn't trying to replace calculators. It's training the part of your brain that calculators let go soft.

Worth Trying, Even If You Think You're "Not a Math Person"

The thing that convinced me this wasn't just a kids' toy was trying it myself. Watching numbers turn into physical bead positions — and slowly not needing to look at them anymore — is a genuinely different kind of mental exercise than anything else I've tried. It's slow at first, faster than expected after a week of casual practice, and free to test without committing to anything.

If you're curious, it takes about two minutes to open a browser tab and move your first few beads.


Have you tried abacus training, either as a kid or as an adult brain-training habit? I'd be curious to hear how it compares to other mental math methods you've used.



Saturday, August 22, 2026

Python (TI-84 Evo) and HP 32S: Shannon-Wiener Diversity Index

Python (TI-84 Evo) and HP 32S: Shannon-Wiener Diversity Index



Introduction



The Shannon-Wiener Diversity Index measures a level of how diverse a group of populations are by the following formula:


H = -Σ( p_i * ln(p_i), i = 1 to n) = Σ( -p_i * ln(p_i), i = 1 to n)


where p_i = (population of segment i) ÷ (total population)


As stated by M. Robert F. (see Sources), there are three levels of diversity:


Low Diversity: H < 1.5

Medium Diversity: 1.5 ≤ H ≤ 2.5

High Diversity: H > 2.5




Python: diverse.py

This script was done with a TI-84 Evo. The script uses only the math module and should be able to use on any calculator with Python.


# Math Calculations

from math import *


print("Shannon-Wiener Diversity\nIndex")

print("Enter a list of populations.")

lpop=eval(input("list: "))

# sum

s=sum(lpop)

# proportions

lpro=[i/s for i in lpop]

# -p log p

llog=[-i*log(i) for i in lpro]

# diversity index

h=sum(llog)


# results

print("diversity index:\n{0:.5f}".format(h))

if h>2.5:

  print("high diversity")

elif h<1.5:

  print("low diversity")

else:

  print("medium diversity")


HP 32S Program: Shannon Wiener Diversity Index


This was programmed on an original HP 32S, and the code should be same for the later HP 32SII and Swiss Micros DM32.


Instructions:

If need be, clear the variables

Enter the population size in the variables A, B, C, D etc… up to 25.

Enter the number of populations, XEQ A


Four labels are used:

LBL A: program start, initialization

LBL Z: determine total population (pop = A + B + C + D….)

LBL Y: determine proportion of each population (A = A/pop, B = B/pop, C = C/pop, …)

LBL X: calculate the Shannon-Weiner Diversity Index: -Σ(p_i * ln(p_i) from i=1 to n)



Code:

A01 LBL A

A02 ENTER

A03 ENTER

A04 ENTER

A05 CL x

A06 STO Z

A07 R↓

A08 STO i


Z01 LBL Z

Z02 RCL(i)

Z03 STO+ Z

Z04 R↓

Z05 DSE i

Z06 GTO Z

Z07 STO i

Z08 RCL Z


Y01 LBL Y

Y02 STO÷ (i)

Y03 DSE i

Y04 GTO Y

Y05 R↓

Y06 STO i

Y07 CL x

Y08 STO Z


X01 LBL X

X02 RCL (i)

X03 ENTER

X04 LN

X05 ×

X06 +/-

X07 STO+ Z

X08 DSE i

X09 GTO X

X10 RCL Z

X11 RTN


Size:

LBL A: 12.0 bytes

LBL Z: 12.0 bytes

LBL Y: 12.0 bytes

LBL X: 16.5 bytes

Total: 52.5 bytes


This does not count the 9.5 bytes needed for each variable used (Z, i, A, B, C, etc.). This program takes up to 25 populations (A through Y).



Examples


Example 1:


4 populations (n = 4).


A = 40

B = 30

C = 70

D = 20


Index: 1.2820 (low diversity index)


Example 2:


9 populations (n = 9).


A = 41

B = 36

C = 40

D = 97

E = 64

F = 37

G = 16

H = 18

I = 36


Index: 2.06303 (medium diversity index)



Sources



M. Robert F. The Math Behind Biology Lightning Source4 LLC. LaVergne, TN. 2026. pp. 6-8


Nolan, K.A. and J.E. Callahan. 2006. Beachcomber biology: The Shannon-Weiner Species Diversity Index. Pages 334-338, in Tested Studies for Laboratory Teaching, Volume 27 (M.A. O’Donnell, Editor). Proceedings of the 27th Workshop/Conference of the Association for Biology Laboratory Education (ABLE), 383 pages. 2006. ISBN 1-890444-09-X. Article: https://www.ableweb.org/biologylabs/wp-content/uploads/volumes/vol-27/22_Nolan.pdf. Retrieved May 6, 2026.





Eddie


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



Wednesday, August 19, 2026

Spotlight: HP 16C Collector’s Edition

 Spotlight: HP 16C Collector’s Edition



Quick Facts: HP 16C Collector’s Edition



Model: HP 16C Collector’s Edition

Company: Hewlett Packard/Moravia


Type: RPN and Computer Science

Batteries: 2 x CR2032

Memory: Up to 34 memory registers

Programming Memory: Up to 203 memory registers

Years in Production:

Original: 1982-1989

Collector’s Edition: 2026 (limited edition)

Display: 8 digits (scrolling)


Store sites:

Europe: https://www.thecalculatorstore.com/i/the-hp16c

U.S.: https://shop.moravia.education/us/hp-16c-collector-s-edition.html





About the HP 16C


This is my first HP 16C from Hewlett Packard, and it’s a long awaited purchase. The HP 16C is a programmable calculator that is specialized in computer science. There are five main modes:


HEX: Hexadecimal integer mode (base 16, 2^4)

DEC: Decimal integer mode (base 10)

OCT: Octal integer mode (base 8, 2^3)

BIN: Binary integer mode (base 2)

FLOAT: Floating decimal mode.


The FLOAT mode is the only mode where calculations can involved fractions and non-integers. To make room for the Boolean logic and bit functions, the number of functions for floating point are limited to the reciprocal (1/x) and square root (√x).


The other four modes work with integers. The HP 16C is able to work with integers with up word sizes up to 64 bits. Each bit is is a binary bit. For example, a word size of 4 binary integers range from 0000 and 1111. Pressing [ 0 ] [ f ] [ STO ] (WSIZE) is a quick reset to a word size of 64 bits.


Integers can scroll beyond the initial screen of 8 digits, with multiple windows to show all the digits.


We have the classical Boolean functions available: AND, OR, NOT, and XOR. Part of what makes the HP 16C special is addition of bit manipulation functions:


* Shift bits left and right, including the carry over bit: SL, SR


* Arithmetic shift right, where bits are shifted right with the sign bit copied: ASR


* Rotate bits left and right: RL, RR, RL n, RR n (either a single bit or n bits); RLC, RRC, RLC n, RRC n (these are rotation functions including the carry over bit).


* Masks can be generated using the MASKL and MASKR functions.


* Integer division can be accomplished by finding the quotient (÷) and remainder (RMD).


* Finally, the HP 16C can work with double-sized words, potentially after 128 bits, with the double-multiply (DBL×), double-division (DBL÷), and double-remainder (DBLR).



The programming module can hold up to 203 steps, complete with loops, indirect addressing, testing, but no storage or recall arithmetic. Here are a couple of programs:


Integer Division: y |- x


Input Stack:
Y: dividend

X: divisor


Result: quotient, R/S, remainder


Code:


LBL D ; 001 43, 22, d

x<>y ; 002 34

STO 0 ; 003 44, 0

x<>y ; 004 34

÷ ; 005 10

R/S ; 006 31

RCL 0 ; 007 45, 0

LST x ; 008 43, 36

RMD ; 009 42, 9

RTN ; 010 43, 21


Examples


Example 1: 45 d |- 20 d = 2 d remainder 11 d

Keystrokes: DEC 45 ENTER 17 GSB D

Results: 2 d R/S 11 d


Example 2: 1F3 h |- 20 h = F h remainder 13 h

Keystrokes: HEX 1F3 ENTER 20 GSB D

Results: F h R/S 13 h


Hexadecimal: Showing One Hexadecimal Digit at a Time, From Right to Left


This program creates and then manipulates the mask to display each digit.


_ _ _ #

_ _ # 0

_ # 0 0

# 0 0 0


Code:


LBL A ; 001 43, 22, A

STO 0 ; 002 44, 0

CL x ; 003 43, 35

WSIZE ; 004 42, 44

HEX ; 005 23

F ; 006 F

ENTER ; 007 36

1 ; 008 1

+ ; 009 40

WSIZE ; 010 42, 44


RCL 0 ; 011 45, 0

4 ; 012 4

MASK4 ; 013 42, 8

AND ; 014 42, 40

R/S ; 015 31


3 ; 016 3

STO I ; 017 44, 32

LBL 0 ; 018 43, 22, 0

LST x ; 019 43, 36

4 ; 020 4

RL n ; 021 42 E

RCL 0 ; 022 45, 0

x<>y ; 023 34

AND ; 024 42, 20

R/S ; 025 31

DSZ ; 026 43, 23

GTO 0 ; 027 22, 0

RTN ; 028 43, 21


Examples


4F37 h GSB A: 1 R/S 20 R/S 400 R/S 5000


17695 d GSB A: F R/S 10 R/S 500 R/S 4000 (451F h)


The speed of the HP 16C Collector’s Edition is comparable to the HP 15C Collector’s Edition. I found the keys to be responsive and reliable.


Eddie


Sources:


“HP-16C” The Museum of HP Calculators. https://www.hpmuseum.org/hp16.htm Retrieved August 17, 2026.


Hewlett Packard. HP 16c Collector’s Edition: Owner’s Handbook. Edition 2, November 2025. From the HP Calculator Literature website: https://literature.hpcalc.org/items/2714





Eddie


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


The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S

  The MU Key on a Four Function Calculator and Programs for the DM42/HP 42S Not too long ago, I purchased this very colorful, four funct...