janriemer,

Did you know that for natural numbers:

{x: >= 0, y = 2ⁿ}

the follow holds true:

x mod y

is equal to

x & (y - 1)

Example:

31882511 mod 1024

is equal to

31882511 & 1023

(where mod is the modulo operation and & is bitwise-and)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • math
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • cisconetworking
  • normalnudes
  • tester
  • ngwrru68w68
  • cubers
  • modclub
  • tacticalgear
  • provamag3
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines