 | | Re: Rotating through a four-bit nibble
|
|
(...) Understand what better? Binary math? No problems with that! By "backwards" I meant that multiplication and division by powers of 2 are usually changed to shift L/R by compilers. Also, I am amused that because the firmware doesn't use the (...) (21 years ago, 22-Sep-05, to lugnet.robotics, FTX)
|
| |
 | | Re: Rotating through a four-bit nibble
|
|
(...) BrickOS has mocked me from the horizon for some time, but there are two things that are holding me back: (a) Judging by the posts and what I've read, the learning curve seems awfully steep - especially since I'm on a Mac. (b) Rarely have I (...) (21 years ago, 22-Sep-05, to lugnet.robotics)
|
| |
 | | Re: Could we all let it alone? (Was Re: Moonbase Module - Mech Bay 07)
|
|
(...) <major snippage (down to the tech)> Thanks Eric, I appretiate the reply. I have seen a few posts here and there that I find personally irrelevant - and mreely pass them by. I have also occasionally been attacked by posters. In my case it has (...) (21 years ago, 22-Sep-05, to lugnet.build.mecha, lugnet.robotics)
|
| |
 | | Re: Rotating through a four-bit nibble
|
|
(...) Maybe it is time to move on to BrickOS? int rotate_right( int value, // the value to be rotated int width, // the width of the rotated field int base, // bitnumber of rightmost bit in rotate field int amount) // the amount to rotate between (...) (21 years ago, 22-Sep-05, to lugnet.robotics)
|
| |
 | | Re: Rotating through a four-bit nibble
|
|
(...) Both your 1st & 2nd solutions are very good; thanks to you and other posters to this thread for giving me a much better handle on binary manipulations, and solutions to this problem. In answer to an earlier question, speed is important (simple (...) (21 years ago, 22-Sep-05, to lugnet.robotics)
|