Post Reply 
first post . how to find program - Modulus div
11-25-2020, 02:18 PM
Post: #1
first post . how to find program - Modulus div
Hi

This is my first post on the forum. I am trying to work out how to modulus division (in mod 10 and mod 2) as a program

although I would like to know the answer ! I am more interested in how I can best use the forum resources to find the programming sequence so that when I have similar queries down the line I can find the program myself.

Any pointers gratefully received
Find all posts by this user
Quote this message in a reply
11-25-2020, 03:25 PM
Post: #2
RE: first post . how to find program - Modulus div
Welcome!

Which calculator are you using?

If you want to get started programming, the HP manuals are a pretty good first start, I'd suggest starting with your manual. Some of the more recent models have PDF files available for download from HP's website.

If you are looking for how to program modular division in general, using the internet ( e.g. Kahn Academy or geeksforgeeks ) would be faster and more useful than posting something in a forum.

17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b

Find all posts by this user
Quote this message in a reply
11-25-2020, 03:28 PM
Post: #3
RE: first post . how to find program - Modulus div
Hello!

(11-25-2020 02:18 PM)asterysk Wrote:  ... I am more interested in how I can best use the forum resources to find the programming sequence so that when I have similar queries down the line I can find the program myself.

This will depend very much on the calculator for which you want to write the program. This forum is (mostly) about calculators from Hewlett-Packard, old an modern. Even among these there must be a dozen (or so) programming "paradigms" by which such a task can be programmed. Many HP calculators, again old and new, do already come with a pre-programmed modulus function so nothing needs to be done at all if one of these is used...

So which calculator do you have in mind for writing your program?

Regards
Max
Find all posts by this user
Quote this message in a reply
11-25-2020, 05:51 PM
Post: #4
RE: first post . how to find program - Modulus div
(11-25-2020 02:18 PM)asterysk Wrote:  Hi

This is my first post on the forum. I am trying to work out how to modulus division (in mod 10 and mod 2) as a program

although I would like to know the answer ! I am more interested in how I can best use the forum resources to find the programming sequence so that when I have similar queries down the line I can find the program myself.

Any pointers gratefully received

Hi, have you seen in the HP Forum page you have other links for programs?
General Software Library, HP 41 Software library, HP Prime are some of them.
I had not found a simple way to search for specific problems, as the forum is not classified - it is a big general list of programs - as I understand.

For these specific programs you're looking for a solution, as others stated, you need to say the calculator model.

Best wishes,
Artur

ARTUR MARIO JUNIOR
BRAZIL
Find all posts by this user
Quote this message in a reply
12-01-2020, 04:33 AM
Post: #5
RE: first post . how to find program - Modulus div
Thankyou for the useful tips.

I have an HP97S (I/O) in working order but no manuals. Have just ordered the USB from MoHPC so should have the documentation in a while to work through.

My aim is to use the HP97 to de-encipher One Time Cipher messages (and also perhaps cypher them).

I am going to use the Mod 10 method (https://www.amrron.com/wp-content/upload...me_pad.pdf) .

This will be my first time programming an HP calculator and the One Time Cipher seems straightforward enough once I work out the Mod 10 division

What I want to do is this : (de-cipher)
1) Store the One Time Cipher on a programmable card (it will be sets of 5 digits 0-9 , 10 sets )
2) Type in the ciphered message (it will be 50 digits 0-9)
3) decipher the message using the programmable card (this is the mod 10 part) , the message will still be a sequence of digits 0-9
4) convert these de-ciphered digits into Alpha Numeric text using a lookup table

The ciphering would just be the reverse

I think this will give me a good intro to the basics before I try something a bit more advanced.

My ultimate aim is to hook the 97S into my autopilot on my boat (as a backup system) and also to use it as a training device for my sextant, both of these are big projects and way down the line when I get some free time !!
Find all posts by this user
Quote this message in a reply
12-01-2020, 02:49 PM (This post was last modified: 12-01-2020 02:58 PM by Maximilian Hohmann.)
Post: #6
RE: first post . how to find program - Modulus div
Hello!

(12-01-2020 04:33 AM)asterysk Wrote:  My ultimate aim is to hook the 97S into my autopilot on my boat (as a backup system) and also to use it as a training device for my sextant, both of these are big projects and way down the line when I get some free time !!

Interesting project, but you know that the HP-97 only has 224 (not expandable in any way!) program steps? That will be quite a challenge!

Here is a small program to compute the Modulo function on that calculator (not mine, I found it here: https://www.hpmuseum.net/pdf/KeyNotes_19...es_OCR.pdf)
It does however only work properly when both arguments have the same sign. Extra program steps will be required to get that right.

Y mod X (with y and x in the proper registers)

Lbl A
/
Lst X
X<>Y
Frac
*
RTN

Good luck with your project!

Regards
Max

NB: You write: "1) Store the One Time Cipher on a programmable card (it will be sets of 5 digits 0-9 , 10 sets )" but the paper you quote tells you at least ten times NOT to do that ;-)
Find all posts by this user
Quote this message in a reply
12-01-2020, 04:30 PM
Post: #7
RE: first post . how to find program - Modulus div
(12-01-2020 02:49 PM)Maximilian Hohmann Wrote:  Here is a small program to compute the Modulo function on that calculator (not mine, I found it here: https://www.hpmuseum.net/pdf/KeyNotes_19...es_OCR.pdf)
Thats very useful, thankyou. The PDF is also very interesting reading
Find all posts by this user
Quote this message in a reply
12-01-2020, 04:33 PM
Post: #8
RE: first post . how to find program - Modulus div
(12-01-2020 02:49 PM)Maximilian Hohmann Wrote:  NB: You write: "1) Store the One Time Cipher on a programmable card (it will be sets of 5 digits 0-9 , 10 sets )" but the paper you quote tells you at least ten times NOT to do that ;-)

It is definitely most secure if the cipher is not entered into the calculator but for testing purposes I don't want to be typing it ! If it all works okay then I will be doing some forensics to see if the cipher is still accessible after turn off and if so what can be done to wipe it.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)