Thursday, September 6, 2018

Floating Point Base Conversions with Scientific Calculators


Floating Point Base Conversions with Scientific Calculators

Introduction

Any scientific calculator that has base conversions will operate on integers only.  But what if we want to find hexadecimal representation of π?  According to the TI LCD Programming there is a procedure. 

This blog post will focus on conversions between binary (base 2), octal (base 8), hexadecimal (base 16), and decimal (base 10).  This can easily be worked with other bases.

Decimal to Other Bases

Let x = the number to be converted.

Steps:

1. Let n be the number of decimal places x has.  Designate b to the designated base.  Here’s a point:  please be aware of your decimal point.  Being aware of your values is key coming up with the correct conversion. 

2. In Decimal mode, Multiply x * b^(n-1).

3. Convert the result to the destination base. The conversion will be shown as a decimal.  You will need to place the decimal point in the answer yourself. 

Example:  Convert 3.1415 to Binary, Octal, and Hexadecimal. 

x = 3.1415 has 4 decimal places, hence n = 4.

Binary   (b = 2)

In Decimal mode:  3.1415 * 2^(4- 1) = 25.132

Convert to Binary ([2nd/SHIFT] (BIN)), display:  11001

Since 3_10 = 11_2, place the decimal point as such:  11.001

Octal  (b = 8)

In Decimal mode:  3.1415 * 8^(4- 1) = 1608.448

Convert to Octal ([2nd/SHIFT] (OCT)), display:  3110

Since 3_10 = 3_8, place the decimal point as such:  3.110

Hexadecimal (b = 16)

In Decimal mode:  3.1415 *16^(4- 1) = 12867.584

Convert to Octal ([2nd/SHIFT] (HEX)), display:  3243

Since 3_10 = 3_16, place the decimal point as such:  3.243

As a result:  3.1415_10 ≈ 11.001_2 ≈ 3.110_8 ≈ 3.243_16

Other Bases to Decimal

Let x = the number to be converted.

Steps:

1. Let n be the number of decimal places x has.  Designate b to the designated base.  Here’s a point:  please be aware of your decimal point.  Being aware of your values is key coming up with the correct conversion. 

2. In the destination base mode, type the number without the decimal point. 

3. Convert the number to decimal. (Change the number to Decimal mode) 

4. Divide the result by b^n.

Examples

Example 1:  Convert 11.01101_2 to decimal.

1.01101_2 has 5 decimal places, n = 5. Enter in BIN mode:  1101101.  Remember not to include decimal point.

Convert to decimal ([2nd/Shift] (DEC)):  109

To get the final result:  109 / 2^5 = 3.40625

Example 2:  Convert 4.7076_8 to decimal.

4.7076_8 has 4 decimal places, n = 4. Enter in OCT mode:  47076.  Remember not to include decimal point.

Convert to decimal ([2nd/Shift] (DEC)):  20030

To get the final result:  20030 / 8^4 = 4.890136719

Example 3:  Convert  3A.19B1_16 to decimal

3A.19B1_16 has 4 decimal places, n = 4. Enter in HEX mode:  3A19B1.  Remember not to include decimal point.

Convert to decimal ([2nd/Shift] (DEC)):  3807665

To get the final result:  3807665 / 16^4 = 58.10035706

Source:

Texas Instruments TI LCD Programmer User Manual.  Texas Instruments. 1981.

You can find a PDF of the manual from Datamath’s website here:  http://www.datamath.org/Sci/Slanted/LCD-Programmer.htm 

Hopefully you find this helpful.

P.S.  I hope the next update to the TI-84 Plus CE and the Casio fx-CG 50 have adds operating system base conversions and Boolean functions. HP Prime has base conversions.

I have am working on a retro review, working on blog about adjustable rate mortgages, and HHC 2018 is coming up at the end of the month (http://hhuc.us/2018/). 

Eddie

All original content copyright, © 2011-2018.  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.  Please contact the author if you have questions.

Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...