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

The explanation for bitwise complement ignores the word-size which matters a lot here. For example ~4 = 251 in uint8, not 3 like in the example.



This is a good point, thank you for bringing it up! I added a footnote about it: https://norasandler.com/2017/12/05/Write-a-Compiler-2.html#f...


I don't think it is fair to say that it is ignored, rather it assumes three bits.




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

Search: