nomemory / andreinc-site

My personal blog
9 stars 4 forks source link

2023/02/01/demystifying-bitwise-ops #19

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Demystifying bitwise operations, a gentle C tutorial | andreinc

A beginner friendly tutorial on bitwise operations in C

https://www.andreinc.net/2023/02/01/demystifying-bitwise-ops

neomafo88 commented 1 year ago

Your link at the end of your post is broken https://0.0.7.229/12/01/writing-a-simple-vm-in-less-than-125-lines-of-c https://www.andreinc.net/2021/12/01/writing-a-simple-vm-in-less-than-125-lines-of-c

aprospero commented 1 year ago

Nice article - sometimes I have the feeling these skills are about to extinct in the wild...

But on another topic: are you aware that the picture showing the question regarding swapping even and odd bits is most probably a nice example of the infamous xerox copy/scan error that replaced certain image parts with reusable patches and did pattern matching / OCR wrong in the process? The 9 should in fact be a 0 if I'm not completely off. Here is an article covering the xerox mega fail: https://www.nbcnews.com/technolog/copier-conundrum-xerox-machines-swap-numbers-during-scans-6C10860706

nomemory commented 1 year ago

@neomafo88 Thanks for noticing. I did update the correct URL.

nomemory commented 1 year ago

@aprospero Didn't know about that. That was an interesting read.

aprospero commented 1 year ago

@nomemory In hindsight I should have linked to the blogpost of D.Kriesel who did a really good job uncovering the issue back in 2013. The article from nbcnews fails to reflect the severeness of the whole thing and especially the lack of proper reaction from Xerox: http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning If you have some spare time I recommend to see the video of his speech about it. It's quite hilarious!

hpaul commented 1 year ago

A really cool reading, thanks for the time took to explain these intricacies in a very friendly manner. I was looking for quite some time to grasp the bitwise concepts.

I think there are still a few things here and there that you can expand, as sometimes I tried to do the missing steps, but as I'm not a C programmer, I don't really know if that's the case.