View Full Version : Binary cleverness

Graham Stabler
10-07-2006, 03:46 PM
One thing that has struck me when using the propeller is how much I have used assembly, most of my interests are in real time or at least fast applications so I have tended to check out the logic of and idea before moving to assembly.

At that point my rustyness in the art of binary manipulation and generally binary number in general has really struck me, I look at example code and it takes me a long time to work out what the heck is going on with all the bist shifts and flips and rotations, and then there is the legendary Cordics. The concept of representing floating point numbers to a given precision with intergers was also new to m.

Personally rather than struggle through doing things badly I prefer to do some background reading on this sort of stuff and I was wondering if there are any decent books?


10-07-2006, 07:48 PM
I have enjoyed reading the these items that cover, in part, what you are asking about.

"Math Toolkit for Real-Time Programming" by Jack W. Crenshaw (I only know of it in print).

HAKMEM (see http://en.wikipedia.org/wiki/HAKMEM·for links, I've also seen it in print).

Tracy Allen's information on Basic Stamp math (http://www.emesystems.com/BS2index.htm#math); while Stamp oriented, you will find, among other useful stuff, information on CORDIC.

Eric Weddington's "Programming 101" on bit operations in C (a popular reference·on another forum (http://avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=37871&start=0&postdays=0&postorder=asc&highlight=programming+101&sid=751998d2421f30f69a62ebd4332c1a94)).

I have not yet started reading the Numerical Recipies (in C, C++, and Fortran) books (see http://www.nr.com/), but hope to do so someday.


Graham Stabler
10-07-2006, 08:05 PM
Thanks, I'll start looking into those, Tracey's stuff looks like a good start. The first thing I need to do is stop punishing myself for not knowing all this stuff, I sort of feel like I should having done A-level comuting and then a degree in electronics but sadly no. I have used numerical recipes a number of times though.

you can't know everything http://forums.parallax.com/images/smilies/smurf.gif


Kevin Wood
10-08-2006, 12:08 AM
Here are 2 websites where you can find coursework on-line. You won't get credit, but will fond a lot of handouts, lesson plans, and other materials:

cse.stanford.edu (http://cse.stanford.edu)
ocw.mit.edu/index.html (http://ocw.mit.edu/index.html)