The Museum of HP Calculators

HP Forum Archive 08

[ Return to Index | Top of Index ]

Useless challenge No. 2
Message #1 Posted by Nenad Vulic (Croatia) on 5 July 2002, 3:08 a.m.

No. 1 is in the thread somewhere below. I remember this one that I have read somewhere decades ago:

Write a program which if number "1" is in the display (X register) would turn it into "2", and if the number "2" is there it will turn it into "1", in as few as possible steps, without using numeric, EEX or CHS keys.

There was a solution in 3 steps, say:

LBL A: ... : ... : ... : RTN

      
Re: Useless challenge No. 2
Message #2 Posted by thibaut.be on 5 July 2002, 3:17 a.m.,
in response to message #1 by Nenad Vulic (Croatia)

Well, I don't know if this the one you thought, but here is mine (and with a 12C !)

LBL A 1/x g e^x g INTG (or INT) RTN

3 steps...

            
Re: Useless challenge No. 2
Message #3 Posted by Nenad Vulic (Croatia) on 5 July 2002, 7:27 a.m.,
in response to message #2 by thibaut.be

Obviously you are right. If I knew the answer, it would not be a challenge:)

                  
Re: Useless challenge No. 2
Message #4 Posted by Gene on 5 July 2002, 7:41 a.m.,
in response to message #3 by Nenad Vulic (Croatia)

How about

1 x=Y? 2

Gene

                        
Re: Useless challenge No. 2
Message #5 Posted by Fred on 5 July 2002, 7:51 a.m.,
in response to message #4 by Gene

Without any numeric !!!!!!!!!!!!!!!!!!!!!!!!!!

                              
Re: Useless challenge No. 2
Message #6 Posted by J-F Garnier on 5 July 2002, 11:58 a.m.,
in response to message #5 by Fred

Without numeric of course, otherwise the obvious solution is: 3 x<>y - or 2 x<>y /

                              
Doh!
Message #7 Posted by Gene on 5 July 2002, 4:59 p.m.,
in response to message #5 by Fred

Oops. Must read closer!

      
Re: Useless challenge No. 2
Message #8 Posted by Tony Duell (UK) on 5 July 2002, 1:42 p.m.,
in response to message #1 by Nenad Vulic (Croatia)

For the HP41, how about : LBL A : 1/X : ST+ X : RTN That's only 2 more instructions

            
Re: Useless challenge No. 2
Message #9 Posted by Vieira, Luiz C. (Brazil) on 5 July 2002, 4:34 p.m.,
in response to message #8 by Tony Duell (UK)

Hey, Tony;

you do SW as well! Good knowing. So far, you have shown as a great knowledge over HW affair. Now you come with a brilliant SW solution.

Touchč!

(How come your post appear two times in the same thread as being only one? I select one and both become selected... Wizard's stuff!)

                  
Re: Useless challenge No. 2
Message #10 Posted by Tony Duell (UK) on 5 July 2002, 5:37 p.m.,
in response to message #9 by Vieira, Luiz C. (Brazil)

To be honest, I had seen it (or a very closely related challenge) before. But I solved it then (after thinking about it for a few hours), so I think it was fair to post that solution. I wasn't copying somebody else's solution, I was copying my own :-) And no, I am _not_ a programmer. I am much more of a hardware hacker type...

                        
Re: Useless challenge No. 2
Message #11 Posted by Juergen Rodenkirchen on 5 July 2002, 6:38 p.m.,
in response to message #10 by Tony Duell (UK)

Anyway, Tony, a real beautiful solution indeed! Thanks for that little masterpiece!

                        
Hats off - Chapeau!
Message #12 Posted by Andrés C. Rodríguez (Argentina) on 6 July 2002, 10:01 a.m.,
in response to message #10 by Tony Duell (UK)

While I liked the CrossTalk XVI introduction lemma, which said: "Beware of programmers who carry screwdrivers", Tony showed again that many times a HW person bring clever and elegant solutions on the SW field! Congratulations, Tony!

Andrés (being an EE, I appreciate HW too!)

Notes: CrossTalk XVI was a communications program, terminal emulator, etc for the IBM PC in 1985. HW, SW: Hardware, Software.

      
Re: Useless challenge No. 2
Message #13 Posted by Tony Duell (UK) on 5 July 2002, 1:42 p.m.,
in response to message #1 by Nenad Vulic (Croatia)

For the HP41, how about : LBL A : 1/X : ST+ X : RTN That's only 2 more instructions

            
Re: Useless challenge No. 2
Message #14 Posted by Vieira, Luiz C. (Brazil) on 5 July 2002, 4:34 p.m.,
in response to message #13 by Tony Duell (UK)

Hey, Tony;

you do SW as well! Good knowing. So far, you have shown as a great knowledge over HW affair. Now you come with a brilliant SW solution.

Touchč!

(How come your post appear two times in the same thread as being only one? I select one and both become selected... Wizard's stuff!)

                  
Re: Useless challenge No. 2
Message #15 Posted by Tony Duell (UK) on 5 July 2002, 5:37 p.m.,
in response to message #14 by Vieira, Luiz C. (Brazil)

To be honest, I had seen it (or a very closely related challenge) before. But I solved it then (after thinking about it for a few hours), so I think it was fair to post that solution. I wasn't copying somebody else's solution, I was copying my own :-) And no, I am _not_ a programmer. I am much more of a hardware hacker type...

                        
Re: Useless challenge No. 2
Message #16 Posted by Juergen Rodenkirchen on 5 July 2002, 6:38 p.m.,
in response to message #15 by Tony Duell (UK)

Anyway, Tony, a real beautiful solution indeed! Thanks for that little masterpiece!

                        
Hats off - Chapeau!
Message #17 Posted by Andrés C. Rodríguez (Argentina) on 6 July 2002, 10:01 a.m.,
in response to message #15 by Tony Duell (UK)

While I liked the CrossTalk XVI introduction lemma, which said: "Beware of programmers who carry screwdrivers", Tony showed again that many times a HW person bring clever and elegant solutions on the SW field! Congratulations, Tony!

Andrés (being an EE, I appreciate HW too!)

Notes: CrossTalk XVI was a communications program, terminal emulator, etc for the IBM PC in 1985. HW, SW: Hardware, Software.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall