The Museum of HP Calculators


Netmask Calculator for the HP-32SII

This program is Copyright © 2001 by Borja Marcos and is used here by permission.

This program is supplied without representation or warranty of any kind. Borja Marcos and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

This is my first 32Sii program, so don't blame me ;-) It calculates the netmask from the number of bits. For example, 24 gives 255.255.255.000.

To run it, type the number of bits and "XEQ M". Enjoy it.  Who said calculators aren't useful when you end college? ;-)

LBL M
        STO B
        0
        STO R
        STO M
        9
        STO E
LBL A
        RCL B
        8
        x>y?
        GTO B
        8
        GTO C
LBL B
        RCL B
LBL C
        STO M
        STO- B
        2
        RCL M
        yx
        1
        -
        2
        ENTER
        8
        RCL M
        -
        yx
        ×
        RCL E
        10x
        ×
        STO+ R
        3
        STO- E
        RCL B
        x>0?
        GTO A
        RCL R
        RTN

M: CK=9342 010.5
A: CK=3E49 010.5
B: CK=0A21 003.0
C: CK=05DD 039.0

Go back to the software library
Go back to the main exhibit hall