1. Shift-left
2. Add original value
For multibyte values use rotate left which carries, and do the rotates from LSB to MSB. Then clear carry, then do the adds from LSB to MSB with carries. Should work for any word size.
Ofc I was a teenager but this seemed clever and simple to me.
Was (am) I just missing something?
I don't know how big your .gitignore must be when trying to use a tool that wants to own every file and directory to manage your /home but if that works for you, more power to ya