Toot

Written by yugaego 🌍 on 2024-12-11 at 15:30

"n & (n – 1) == 0" expression might be known to many. Or not.

[It allows to identify if an integer n is a power of 2.]

It's just I find the linked #article explaining the bits behind to be nice and clear.

[#]programming #WomenInSTEM

https://thatgirlcoder.com/2020/06/12/where-can-you-use-the-expression-n-n-1/

=> More informations about this toot | View the thread | More toots from yugaego@fosstodon.org

Mentions

Tags

=> View article tag | View programming tag | View womeninstem tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113634904054561697
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
227.226618 milliseconds
Gemini-to-HTML Time
0.726979 milliseconds

This content has been proxied by September (3851b).