(16C) Linear Feedback Shift Registers
|
06-14-2021, 06:13 PM
(This post was last modified: 07-02-2021 06:26 AM by badacktor.)
Post: #1
|
|||
|
|||
(16C) Linear Feedback Shift Registers
I recently picked up an HP-16C and decided to try writing some linear feedback shift registers for it. wasn't feeling too ambitious, so I just replicated the two that had diagrams on wikipedia. https://en.wikipedia.org/wiki/Linear-fee...t_register
(16 bit unsigned mode, displaying leading 0s. the status screen should read 0 - 16 - 1000 or something. be sure to preload the index register with the value of however many times you want things to loop, and the X register with a seed that can be anything except all 0s.) Code: Bit Extraction Subroutine additionally, I was talking to a friend who's got some computer science background but doesn't mess with old HP calculators a lot, and they asked if I could write an explanation for "us dirty scrubs" and I was like, oh heck, yeah! two months later, I've got ~50 page long pdf explaining the fundamentals of computer science and RPN calculators all in service of sharing some LFSRs I wrote for the 16C. which is bananas. but it's written so that just about anyone with zero background could understand it. I'm hoping it's got enough of a light/goofy tone that it's worth reading. I'll share it here, and if y'all got any suggestions on what I could do with it, where to send it or post it, or something, I'd appreciate that immensely! also if you see any typos. I've tried so hard to crush 'em all. https://drive.google.com/file/d/1dDYeiRl...sp=sharing anyway, I hope my little linear feedback shift registers are fun to play with! be well! HP: 15CE, 16C, 28S, 48SX, 71B, 200LX, DM41X, DM42 TI: 66, 74, 95, 92 Plus / Casio: fx-603p / Sharp: PC-1262, PC-G850V |
|||
06-15-2021, 09:59 AM
(This post was last modified: 06-15-2021 10:03 AM by Gamo.)
Post: #2
|
|||
|
|||
RE: (16C) Linear Feedback Shift Registers
Very nice article about the HP Voyager Series that focus on the HP-16C
You're right that not many information or interest in this HP-16C stuff. Gamo |
|||
06-15-2021, 10:48 PM
Post: #3
|
|||
|
|||
RE: (16C) Linear Feedback Shift Registers
ah some nice bedtime reading, thank you very much indeed
Cambridge, UK 41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47 Casio, Rockwell 18R |
|||
06-16-2021, 06:14 PM
Post: #4
|
|||
|
|||
RE: (16C) Linear Feedback Shift Registers
squashed one more typo. the google drive link is the better copy now. whoopsie.
HP: 15CE, 16C, 28S, 48SX, 71B, 200LX, DM41X, DM42 TI: 66, 74, 95, 92 Plus / Casio: fx-603p / Sharp: PC-1262, PC-G850V |
|||
07-02-2021, 06:30 AM
Post: #5
|
|||
|
|||
RE: (16C) Linear Feedback Shift Registers
okay so pwarden42 in the mirror post I posted on the swissmicros forums had some super cool ideas for better "get bit" subroutines, right? and like...here, I'll let him explain:
pwarden42 Wrote:For the "get bit" routine I would probably use masking instead of branching, something like: I got *really* excited about these. so excited I wrote 8 more stupid freaking pages in that big pdf thing. it's honestly a small book now. I have no idea what to do with it. whatever. if you're looking for the new addendum, it starts on page 63. HP: 15CE, 16C, 28S, 48SX, 71B, 200LX, DM41X, DM42 TI: 66, 74, 95, 92 Plus / Casio: fx-603p / Sharp: PC-1262, PC-G850V |
|||
11-01-2021, 06:49 PM
Post: #6
|
|||
|
|||
RE: (16C) Linear Feedback Shift Registers
Here is a programm for an LFSR of any length (up to 64 bits) and any structure, such as this one for example.
The n XOR gates form an adder for n+1 1-bit numbers without carry. This means that the output of the last gate is 1 if the number of ones at the inputs is odd. This leads to a very simple programm. The WSIZE is set to the length of the shift register (in the example 8). The "polynomial" is stored in register 0 (in the example 10111000 binary). The value of the shift register is in register 1 (initial value not equal to zero). A step in the shift register is thus calculated as follows: Code:
For such problems, the HP-16C is exactly the right calculator. Thank you for the inspiring thread and the stimulating article. Hartmut |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)