E-Code

Nernst equation: cell potential and ΔG — a TI-84 Plus CE program

By E-Code · updated

NERNST is a TI-BASIC program for the TI-84 Plus CE. From the two REDUCTION potentials (E°cell = E°cathode − E°anode), electrons transferred, temperature in kelvin and Q — E = E° − (RT/nF)·ln Q, which is 0.0592/n·log Q only at 25 °C: standard and actual cell potential, ΔG° and ΔG in kJ, log K, and whether the cell reaction is spontaneous.

What it asks for and what it shows

It asks for 5 values at its prompts. In the example below it shows E0CELL, E CELL, DG0 KJ, DG KJ, LOG K, SPONTANEOUS.

Example run

One of its oracle test cases: “Daniell cell Cu/Zn, Q .1”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 10.34
Input 2⁻0.76
Input 32
Input 4298.15
Input 50.1
The screen shows
E0CELL=1.1
E CELL=1.129579675
DG0 KJ=-212.2677307
DG KJ=-217.9757402
LOG K=37.18769749
TextSPONTANEOUS

How it's checked

6 test cases, each checked against the textbook formula it uses. Replayed key by key on a virtual TI-84 Plus CE, they make 43 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE chemistry programs · All TI-84 Plus CE programs