Skip to navigation Skip to content
Arvi Fox

Personal blog about IT, sport, travel etc.

  • Post a comment in Telegram
  • Main posts
  • Home
  • Blogs I read
  • For software engineers
  • Privacy
  • FAQ interview
  • Home
  • Blogs I read
  • FAQ interview
  • For software engineers
  • Privacy

Month: February 2014

Posted on February 14, 2014November 14, 2016 by arvifox

Hamming weight

Hamming weight

https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel

[code language=”java”]
int NumberOfSetBits(int i)
{
i = i – ((i >>> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24;
}
[/code]

https://habrahabr.ru/post/276957/

zip

Category: IT
Tags: algorithms, bit
Donate
Donate, please. I need MacBook.
Categories
  • English (112)
  • Games (26)
  • IT (650)
  • Life (16)
Tag cloud
agile AI / ML / BigData / AR / VR / Computer vision algorithms android architecture C# compose computer graphics / geometry database debug Delphi developing tools/IDE devops faq firebase firebird game git google gradle graph theory internet / network interview / job java jetty kmp kotlin management meetup multithreading MySQL news/releases pattern performance PHP rx security / crypto sport programming Testing / QA theory / math tips & tricks UI/UX video / audio windows xml / xpath / json
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Яндекс.Метрика
Recent Posts
  • Итальянский модельер Джорджо Армани умер в возрасте 91 года
  • Koda – AI tool for devs
  • Как фотографировать звездное небо на смартфон
  • Google начала тестирование Android 16 QPR2.
  • Gradle 9.0.0
Comments
    © Arvi Fox 2025
    PrivacyBuilt with Storefront.