Timeline for Byte extension methods for common bitwise operations
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 29, 2019 at 7:38 | history | edited | dfhwze | CC BY-SA 4.0 |
added 58 characters in body
|
Sep 29, 2019 at 7:37 | comment | added | dfhwze | I did expect right-to-left: math.stackexchange.com/questions/891445/…. But if you want to change the direction, I don't see a real issue. Just make sure to document your specification. | |
Sep 29, 2019 at 5:37 | comment | added | masterwok |
Thank you for your feedback. I've implemented your first two recommended changes. As for the third recommendation, given an index of 0 would produce the following 1 << 7 - 0 (10000000) and 1 << 0 (00000001). My intention was for bits to be indexed from left-to-right. For example, in the method IsBitSet providing an index of 0 would check if the first bit on the left side of the byte is set. Is it more common to index from right-to-left when dealing with bitwise operations?
|
|
Sep 28, 2019 at 21:07 | history | edited | dfhwze | CC BY-SA 4.0 |
obsolete part
|
Sep 28, 2019 at 13:23 | history | answered | dfhwze | CC BY-SA 4.0 |