TI-84 Plus CE and Swiss Micros DM32: Blood Alcohol Level
Just in time for the upcoming St. Patrick’s Day in a few weeks…
Introduction
The blood alcohol level is calculated by the following approximation by Walter L. Gregory Jr. using data from the CRC Handbook of Tables for Applied Engineering (1970). The program is based off the HP-97/HP-67 program listed in their Medical Practitioner pac (1979). (see source):
BAC ≈ ((ALC * OZ) ÷ 50 – T) * (3.751 ÷ WT)
ALC: Percentage of alcohol consumed. Enter as a whole number. For example, if the drink has 40% alcohol, ALC = 40. If the alcohol is measured in proof, divide the proof by 2.
OZ: The total amount of ounces consumed within the period of time. For example: six 12-oz beers total 72 ounces.
WT: The weight of the person in pounds.
T: The number of hours drinks are consumed. If T > 1, then T = hours – 1. Otherwise T = 0.
If calculated BAC is below 0, then set BAC = 0.
TI-84 Program CE: ALCOHOL
Type: TI Basic
Disp “BLOOD ALCOHOL (US)”
Input “WEIGHT (LB)? “, W
Input “OUNCES? “, O
Input “PERCENTAGE? “, P
Input “HOURS OF DRINKING? “, H
If H≤1 : Then : 0 → H
Else : H – 1 → H : End
(P * O / 50 – H) * 3.751 / W → A
Disp “BLOOD ALCOHOL: “, A
Swiss Micros DM32 (HP 32SII): ALCOHOL
A01 LBL A
A02 INPUT W
A03 INPUT O
A04 INPUT P
A05 INPUT H
A06 RCL H
A07 1
A08 x≥y?
A09 SF 1
A10 STO- H
A11 FS? 1
A12 Cl x
A13 FS? 1
A14 STO H
A15 CF 1
A16 RCL P
A17 RCL× O
A18 50
A19 ÷
A20 RCL- H
A21 3.751
A22 RCL÷ W
A23 ×
A24 x<0?
A25 Cl x
A26 RTN
Notes:
A07 1, A08 x≥y?, A09 SF 1: If hours > 1, set Flag 1. Using flags can sometimes eliminates the need for additional labels.
A24 x<0?, A25 Cl x: If the number in the display (x stack) negative, change it to zero.
Examples
Example 1:
Inputs:
Weight: W = 150 lbs
Ounces: O = 4 oz
Percentage: P = 20%
Hours: H = 0.5 hours (T = 0)
Output: 0.0400
Example 2:
Inputs:
Weight: W = 180 lbs
Ounces: O = 45 oz
Percentage: P = 50%
Hours: H = 2.5 hours (T = 1.5)
Output: 0.0521
Be sure to check your local laws for legal blood alcohol levels. This program is not suited to be evidence in legal matters.
One thing remains: DON’T DRINK AND DRIVE
Source
Hewlett Packard. HP-67/HP-97. User’s Library Solutions: Medical Practitioner. Corvallis, OR. April 1979. pp. 9-12
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.