Bitfields in C
Given space is often at a premium when writing applications for mobile devices, I want to show you how to use bitfields to manage a series of values that need only on/off status. The upside is that you...
View ArticleUsing XOR to Toggle an Integer Between 1 and 0
If you ever come upon a need to toggle an integer value between 1 and 0, consider using the bitwise exclusive-OR (^) operator in C to get the job done. In a recent application I wrote a method with one...
View ArticleUsing bitwise operators in C and Objective-C
One of the wonderful(?) things about Objective-C is that it’s based on C. Part of the power of C is bit-bashing, where you can manipulate individual bits inside of a piece of memory…That being said,...
View ArticleFast Base64 encoding in C
David Lazar on his open source base64 encoding: The C code in base64encode.c is a fast implementation of Base64 encoding. It is based on libb64, which uses coroutines to achieve speed. The nontrivial...
View Article
More Pages to Explore .....