4 ms·
Couldn't every Boolean operation be "busted" as a lookup table?
by notfed 2y ago
Couldn't every Boolean operation be "busted" as a lookup table?
- ekimekim 2y agoYes! But your lookup table will need 2^N bits for a function with N inputs. In this way you can easily enumerate all possible functions from N bits to 1 bit. As a fun exercise, you can do this for all 2-bit -> 1-bit functions. There's only 16 of them, and most of them have very well known names like "and" (LUT 1000) or "xor" (LUT 0110). Some of them don't depend on some of the inputs (eg. LUT 1100 / 1010 which is "return A" and "return B" respectively) or even any of them (eg. LUT 0000 which always returns 0).
- somat 2y agoThe epiphany for me was that any boolean logic can be replaced by memory. https://www.youtube.com/watch?v=BA12Z7gQ4P0 https://www.youtube.com/watch?v=BA12Z7gQ4P0 (ben eater) I mean it is obvious in retrospect, sort of along the lines of memoizing a function. but it was mind blowing when I first saw that. Not that at the hardware level memory is actually any simpler than whatever boolean logic it is pretending to be, but it feels simpler and is easily available in large quantities.