Get the latest tech news
Sierpiński Triangle? In My Bitwise and?
Exploring a peculiar bit-twiddling hack at the intersection of 1980s geek sensibilities.
I have also previously written about fractals; they’re pieces of mathematical curiosa that enjoyed a near-mythical status in 1980s, but are no longer talked about in polite company. The same is happening in the y axis, producing a pattern of four 16x16 squares where bit #4 is set in the output of x & y. They’re pictured below, superimposed on top of the previously-marked bottom quadrant for the MSB: In effect, the algorithm is an iterative block-removal approach in disguise; it just doesn’t look that way because the passes are “parallelized” by the arithmetic logic unit of a CPU — at least up to the maximum hardware-supported bit width of an integer.
Or read this on Hacker News