Lost your password?

Blogs about: Bit Twiddling

Featured Blog

Live Video Color Gamut1 comment

Steven Pigeon wrote 2 weeks ago: The other day—well, a year ago or so—I was invited to visit CBC’s digital TV studi … more →

Tags: Algorithms, C#, embedded programming, hacks, mathematics, Programming, animated gif, blinkenlights, camel

Is Python Slow?52 comments

Steven Pigeon wrote 1 month ago: Python is a programming language that I learnt somewhat recently (something like 2, 3 years ago) and … more →

Tags: Algorithms, Artificial Intelligence, bash shell, C#, data structures, hacks, Programming, Python, Backtracking

A nice method for...9 comments

phimuemue wrote 5 months ago: Consider the following Code (in Python): def dosomething(a, b): result=0 while (a): if (a&1): re … more →

Tags: Programming, Algorithms, Can you solve it?, Python, quiz, Puzzle

Faster than Bresenham's Algorithm?1 comment

Steven Pigeon wrote 5 months ago: There’s always a number of graphics primitives you will be using in all kinds of projects. If … more →

Tags: Algorithms, C#, Programming, embedded programming, C'99, mathematics, portable code, Instruction Sets, AMD64

Sorting Lists (part II)1 comment

Steven Pigeon wrote 6 months ago: Last week I showed you the radix sort on simple linked lists. This week, I will present a version of … more →

Tags: Algorithms, C#, Programming, hacks, C'99, mathematics, data structures, theoretical computer science, quicksort

Recycling Random Bits

Steven Pigeon wrote 7 months ago: It is not uncommon that for large-scale simulations you need a large volume of high-quality (pseudo) … more →

Tags: Algorithms, hacks, mathematics, theoretical computer science, Hash, md5, Pseudo Random, urandom, /dev/random

Safer Integer Types (part III)2 comments

Steven Pigeon wrote 7 months ago: A few days ago (again at the time of writing, but since I accumulate and schedule posts for a weekly … more →

Tags: C#, Programming, embedded programming, hacks, C'99, Life in the workplace, portable code, integral types, integer promotion

Cutting Corners

Steven Pigeon wrote 7 months ago: Cutting corners is generally thought of as a bad thing. It generally is, I agree. But in some occasi … more →

Tags: Algorithms, Programming, hacks, Life in the workplace, mathematics, Precision, accuracy, Approximation, bezier

Not Loosing the Perspective

Steven Pigeon wrote 7 months ago: My first true computer, a TI 99/4a (which I talk about also in a previous entry), had 16 or 48 KB of … more →

Tags: Algorithms, Programming, embedded programming, hacks, Life in the workplace, Zen, data structures, Optimization, TI 99/4A

More Bit-twiddling

Steven Pigeon wrote 11 months ago: This week, two “quickies”: rounding up and down to the next power of two, and converting … more →

Tags: Algorithms, Assembly Language, C#, C'99, embedded programming, hacks, ANSI C, bitwise and, bitwise negation

Safer Integer Constants (Part II)

Steven Pigeon wrote 1 year ago: In C and C++, the behavior of integer promotions is not the same whether we use signed integers or u … more →

Tags: Algorithms, C#, Programming, hacks, C'99, Safe Types, Constants

Safer Float Types

Steven Pigeon wrote 1 year ago: This week, we’ll be following last week’s post, where we looked at type-safe integer con … more →

Tags: C#, Programming, hacks, C'99, float, Double, floating point, floating point values

Safer Integer Constants4 comments

Steven Pigeon wrote 1 year ago: Consider the following short C (or C++) program: const int thingy=123123123123; Depending on your co … more →

Tags: C#, Programming, hacks, C'99, Safe Types, Constants

Debouncing using Binary Finite Impulse Reponse Filter2 comments

Steven Pigeon wrote 1 year ago: In digital systems, we expect input signals to be noise free, but that is not always realistic. For … more →

Tags: Algorithms, C#, Programming, signal processing, embedded programming, Hack, fir, finite impulse filter

Bit blenders: Move bits around quite a bit

Steven Pigeon wrote 1 year ago: Efficient bit manipulation is often found at the lower levels of many applications, let it be data c … more →

Tags: Algorithms, C#, Programming, hacks, deep arithmetic

Branchless Equivalents of Simple Functions19 comments

Steven Pigeon wrote 1 year ago: Modern processors are equipped with sophisticated branch prediction algorithms (the Pentium family, … more →

Tags: Algorithms, C#, hacks, Programming, deep arithmetic, Hack, micro-optimization

The old XOR swapping trick

mprocter wrote 1 year ago: Many people have heard of how to swap two values without using temporary storage, using XORs. This i … more →

Tags: Embedded


Related Tags
All →

Follow this tag via RSS