Shop OBEX P1 Docs P2 Docs Learn Events
Shift Left - Shift Right — Parallax Forums

Shift Left - Shift Right

NewzedNewzed Posts: 2,503
edited 2006-06-25 13:55 in Propeller 1
I have attached a little program that is fun to run, and if you are a bit uncertain about the Shift Left and Shift Right operators, it might even be a little educational.

This is a very modified version of Dave Scanlan’s Example 18 and includes a neat number-entering routine by Ssteve. I would like to thank them both.

The object "keyboard_iso" was replaced by "keyboard".

You will need a connected keyboard and a connected TV to run this program. When the program opens, you are asked to enter the number you want to shift. Enter the numbers you want and terminate the entry by pressing Enter. The program will handle numbers up to 1,048,575. You can enter larger numbers and the Dec figures will be correct but the binary will be wrong because the display is limited to 20 binary digits, which is about as much as my little TV can comfortably display. The program is prompt-driven so just key in what you are asked for.

Please note the pins assigned to the keyboard and the TV. These can be changed to whatever you like.

I have run the program many times so you should have no problem. However…….my e-mail address is listed at the start of the program.

Sid

Sign In or Register to comment.