Hacker News new | past | comments | ask | show | jobs | submit login

When, given a bit-vector representation of 8 devices, would I want to do something with the "right-most" of those devices?



for example, those 8 devices were 8 LEDs, some of them on, and you'd want to turn the rightmost led off. :)

edit: i'll look into more serious applications when i write that article on bit trick applications.


Ok, lights are a good example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: