If you are looking to synthesize the sound of a plucked string, there is an amazingly simple algorithm for doing so called the Karplus-Strong Algorithm. Give it a listen: KarplusStrong.wav Here it is with flange and reverb effects applied: KPFlangeReverb.wav … Continue reading

# Category Archives: C++

Let’s say that you’ve allocated an array of 20 integers and have used them all. Now it’s time to allocate more, but you aren’t quite sure how many integers you will need in the end. What do you do? Realloc … Continue reading

This post is on something called Shamir’s Secret Sharing. It’s a technique where you can break a secret number up into different pieces, where if you have any of those pieces, you are able to figure out the secret. Thinking … Continue reading

In this post I’m going to show how you turn a truth table into a digital logic circuit that uses XOR and AND gates. My Usage Case My specific usage case for this is in my investigations into homomorphic encryption, … Continue reading

Karnaugh maps are a formalized way of turning a truth table into a fairly minimal logical expression. It’s fairly minimal in that it’s the minimal “sum of products” representation, but that might not be the minimal representation of the logic … Continue reading

Hash tables are great in that you can hash a key and then use that hash as an index into an array to get the information associated with that key. That is very fast, so long as you use a … Continue reading

Lookup tables are a tool found in every programmer’s tool belt. Lookup tables let you pre-calculate a complex calculation in advance, store the results in a table (an array), and then during performance critical parts of your program, you access … Continue reading

In part 1 (Quantum Computing For Programmers Part I: One Qubit) we looked at the basics of quantum computing and how to deal with a single qubit. Here we’ll talk about the interesting things that happen when you involve multiple … Continue reading

Are you a programmer? Do you have interest in learning how quantum computing works? Does hard core math and crazy abstract “philosophical” type physics questions about the nature of reality make you feel like you could never understand quantum computing? … Continue reading

The above equation is pretty easy to solve, it just means that x is any value that when you divide by 2, gives a remainder of 1. x is all odd numbers. The more formal answer is: That reads as … Continue reading