![]() |
Low Level Bit Hacks You Absolutely Must Know
For those software folks who are looking deeper into embedded systems development:
http://www.catonmat.net/blog/low-lev...tely-must-know Enjoy, Mike |
Re: Low Level Bit Hacks You Absolutely Must Know
|
Re: Low Level Bit Hacks You Absolutely Must Know
Thanks for sharing,
An embedded programming refresher is always useful especially with the growth of graphical programs that abstract away bit level details. |
Re: Low Level Bit Hacks You Absolutely Must Know
Since they are based on discrete and Boolean mathematics, bit hacks are actually equally valid for LV and any language with rich numerical types and operators. It may not be obvious, but the Boolean operators in LV work on all integer types, and make for concise implementation of many of them.
If you like the general bit hacks and truly want to remember and use them well, I encourage you to try your hand at proofs for them. They don't have to be fully rigorous, but that is of course a useful thing to practice too. Greg McKaskle |
Re: Low Level Bit Hacks You Absolutely Must Know
If any of my students use any of these bit hacks without commenting them, I will smack them.
|
Re: Low Level Bit Hacks You Absolutely Must Know
Quote:
|
Re: Low Level Bit Hacks You Absolutely Must Know
Any programmer who doesn't comment his/her work, no matter the project, deserves to be deprived of caffeine for a week or more. If that doesn't do the trick, proceed to the harsher methods... like noogies and smacks with a mouse cord...
|
Re: Low Level Bit Hacks You Absolutely Must Know
Quote:
|
Re: Low Level Bit Hacks You Absolutely Must Know
Quote:
|
Re: Low Level Bit Hacks You Absolutely Must Know
Quote:
|
Re: Low Level Bit Hacks You Absolutely Must Know
artdura04, you're amazing. The only thing I can think to add to that is that it has to be done inside an obfuscated macro using a templated function pointer and several magic numbers.
|
Re: Low Level Bit Hacks You Absolutely Must Know
or you can be a super-meanie and use a classic turing-style method for making a hello world program, like I did:
Code:
#include <stdio.h> |
| All times are GMT -5. The time now is 22:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi