Hacker News new | past | comments | ask | show | jobs | submit login

> The operation, mathematically, is extremely simple.

You're absolutely right, and this was my main problem; labelling the complicated version as 'math' seems to imply that the simple definitions, the wonderful patterns, etc. are somehow 'not math'.

> a decimal formula for a binary operation

It's not the base which makes it complicated; it's extracting each digit individually. Using the same approach to define a digit-wise operation in base 10 would be just as nasty, except you'd have powers of 10 instead of powers of 2, and mod 10 instead of mod 2.

In other words, just because decimal lets you write numbers like "946", it doesn't make it trivial to get the "9", "4" or "6" individually using 'highschool algebra'; you need to use mod, division, floor/subtraction, powers of ten, etc. just like that formula does for base 2.

Of course, if we don't stick to highschool algebra, it can be as trivial as we like. "The digits of 946" is a perfectly well defined mathematical/numerical operation, so we can just say that and we're done. Likewise, we can make a trivial formula for bitwise AND, like "x ^ y", by defining "^" as 'bitwise AND'.

In a way, formulas like that given in the article are only complicated because they're making assumptions about some operations being 'more fundamental' than others; but in "real" math (i.e. not highschool rote learning and number crunching), we're free to use whatever operations we want, as long as we define them precisely; "bitwise AND" is a perfectly fine definition, and just as good as "addition" or "multiplication".

You're perfectly welcome to define operators in terms of other things you consider to be 'more fundamental'; Russell and Whitehead famously did this in Principia Mathematica, considering sets to be more fundamental than arithmetic and requiring 300+ pages to reach a proof of "1 + 1 = 2".

Yet Goedel showed that no set of axioms is 'best', in which case you might as well use whichever ones make life easiest. When you're calling a formula "dreadful", it implies that you've not made your life easy ;)




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: