Shift Left - Shift Right
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
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