bitmath.blogspot.nl - Bits, Math and Performance(?)

Example domain paragraphs

50% bits, 50% math (allegedly)

This post is meant as a replacement/recap of some work that I did over a decade ago on propagating bounds through bitwise operations, which was intended as an improvement over the implementations given in Hacker's Delight chapter 4, Arithmetic Bounds.

The goal is, given two variables x and y , with known bounds a ≤ x ≤ b , c ≤ y ≤ d , compute the bounds of x | y and of x & y . Thanks to De Morgan, we have the equations (most also listed in Hacker's Delight, except the last one)