blog
← Back to blog

Circuit Design With Quartz Composer

May 23, 2006 Zac White random software

You didn’t think it would be done, did you? You didn’t think one person would have enough free time, boredom, and sheer ingenuity to do it, but I did.

The other day I sat down to write an entry to the esteemed contest, ironcoder. This was short lived however, because I got sucked in by a virtually unknown gem of 10.4: Quartz Composer. I was browsing around dragging random ‘patches’ into the canvas, when I saw an innocuous line in the patch library.

This little patch holds the same power that started the computer revolution. Armed with my limited digital design knowledge, I set out to create some well known circuits from within Quartz Composer. I started out building a full adder. This takes three inputs and produces two outputs. When you chain these together, you can make an N bit adder. You have one in your CPU right now, chugging away at thousands of operations a second.

This allowed me to string them together to create a 4 bit adder.

This produces the following output:

After this I knew what I had to do. I had to create the foundation of modern computer storage…the flip flop. This little guy holds a bit (binary digit) indefinitely. If you want a fast way to store data close to a processor…this is the way to do it.

CPUs have things called registers that are basically a bank of flip flops with some logic to do different operations. So my next task was to create something like that. Because of a limitation with Quartz Composer (it can’t do recursion), I had to not implement some features I wanted to. I ended up with a parallel load register that could ‘hold’, ‘load’, and ‘clear’.

I then plugged that register into a small test flow that would print out the contents.

And it produces the following output when you hold the load line high on the next rising edge of the clock:

So there you have it. The escapades of a bored college student. Mess around with the following stuff and email me (zacwhite at gmail.com) or IM me (cubeman) if you make some modifications.

Download 4bitadder.qtz.zip
Download flipflop.qtz.zip