Living Logic: Biological Circuits for the Electrically Minded

Did you know you can build fundamental circuits using biological methods? These aren’t your average circuits, but they work just like common electrical components. We talk alot about normal silicon and copper circuits ‘roud here, but it’s time to get our hands wet and see what we can do with the power of life!

In 1703, Gottfried Wilhelm Leibniz published his Explication de l’Arithmétique Binaire (translated). Inspired by the I Ching, an ancient Chinese classic, Leibniz established that the principles of arithmetic and logic could be combined and represented by just 1s and 0s. Two hundred years later in 1907, Lee De Forest’s “Audion” is used as an AND gate. Forty years later in 1947, Brattain and H. R. Moore demonstrate their “PNP point-contact germanium transistor” in Bell Labs (often given as the birth date of the transistor). Six years later in 1953, the world’s first transistor computer was created by the University of Manchester. Today, 13,086,801,423,016,741,282,5001 transistors have built a world of progressing connectivity, automation and analysis.

While we will never know how Fu Hsi, Leibniz, Forest or Moore felt as they lay the foundation of the digital world we know today, we’re not completely out of luck: we’re in the midst’s of our own growing revolution, but this one’s centered around biotechnology. In 1961, Jacob and Monod discovered the lac system: a biological analog to the PNP transistor presented in Bell Labs fourteen years earlier. In 2000, Gardner, Cantor, and Collins created a genetic toggle switch controlled by heat and a synthetic fluid bio-analog2. Today, AND, OR, NOR, NAND, and XOR gates (among others) have been successfully demonstrated in academic labs around the world.

But wait a moment. Revolution you say? Electrical transistors went from invention to computers in 6 years, and biological transistors went from invention to toggle button in 40? I’m going to get to the challenges facing biological circuits in time, but suffice it to say that working with living things that want to be fed and (seem to) like to die comes with its own set of challenges that aren’t relevant when working with inanimate and uncaring transistors. But, in the spirit of hacking, let’s dive right in.

My First BioCircuit™

Following the Composition Model (even though the Network Layer Model might be preferred), I’m going to go through the construction of a simple oscillator through electronic and biological methods. The goal is by the end you know a bit more about biological circuits, what they’re made of, what they can do and why they’re hard to make.

DNA/Physical Makeup

In electronics, we make our parts (for the most part) out of copper, silicon, and epoxy. In biology, the base parts are strands of DNA3. For this reason, if you need a quick refresher on DNA, take it. But, all you must know for this article is that DNA encodes genetic information.

Part List: Protein Expression Mediated Logic

For our oscillator, we’re going to need three inverting gates. In the electronics world, that’s pretty easy (like $0.06 easy). You can make electronic logic gates out of (almost) anything and there are countless resources detailing every… intricate… detail that any sane person would want to know.

The biological world has its fair share of logic gates, some of which we’ve already covered. We’re going to focus on the most common type: protein expression mediated logic. Through this method, protein concentrations are treated as signal and are used just like electrical signals are. Below is a genetic NOT gate, signal A (a specific protein for the Promoter or “input”) inhibits the output of signal B (the protein that the “Gene of Interest” codes for). This works just like a traditional NOT gate, if there is not signal A, then produce signal B. Well, it works almost the same way as a traditional NOT gate. This is where we find one of the great challenges that synthetic biology faces: orthogonality.

In electrical logic, we don’t usually need to worry about orthogonality, as we can connect the output of a NOT gate to what we want (and only what we want) with wires and/or traces. In biology, we don’t usually have this luxury as we’re working in prokaryotes (cells without nuclei) which can be effectively thought of as bags of chemicals4 So, instead of having direct connections from one gate to another, we only have one signal “net” as part of our network.

Computers have this figured out with identifiers like MAC addresses. For example, if Bob wants to send a message to Sue, he might broadcast something like “FOR: SUE, MESSAGE: HI”. This works out great for computers: they craft their own receivers and transmitters. In code and hardware, it can be trivial (that’s part of the reason why we have so many electronics communication standards ) but, in biology protein engineering is hard, and it takes time, ingenuity and labor.

Imagine that you could only use one type of transistor in each project. As an example, consider that if you used two 2N3904s, you turn both on or off, but never one off and one on. Now, pretend that for each transistor, you had to corner a computer in the wild, disassemble it and hand remove all of its components in the hopes of finding a new type of transistor. Surely, that would make creating a computer with 30 billion transistors, in one word, difficult.

As such, practically all of the promoters5 (input sites, coded in DNA) that are used today were originally discovered in nature and have been adapted for synthetic use. And, we’ve been pretty successful at this, with enough usable promoters that we need a catalog to sort them all out6.

Device Built with NOT Gates

Now, ever forward. Let’s try to build a device with our NOT gates. And, as we’re really just here to learn concepts, I’m going to show you how to create a ring-oscillator. If you’re a bit rusty on your terminology, or you’ve been too busy to bother with a 100 level circuits class, no worries. A ring-oscillator is really simple, which is why it was one of the first bio-oscillators made. Ring-oscillators are made by placing an odd number of inverters (usually greater than 1) in a cycle (ring). See below for a very cool gif™ that hopefully should clear up any doubts about how it works. But, if things aren’t crystal clear, Enrique from MITx has your back.

Now for the bio part. We already have our NOT gates, so surely we can string three identical NOT gates together and end up with an oscillator, right? Well, as we covered earlier, we’ll need to use three different gates, so things look like three NOT gates in parallel, rather than in series. But, even with three different NOT gates, we might have another problem: death.

After all, all our logic is taking place in a cell using up resources and producing a “useless” protein. And, by the very nature of cells, there’s a limit to the number of resources a cell has. We can try to improve our cell’s effective throughput, but at some point, we need to realize that the cell, as greedy as it is, must take care of the basic requirements of life. However, fear not. Our three gate oscillator should be sustainable7. But, if we were to try seven or even nine gate oscillators we might need to start worrying.

Anyway, enough dilly dallying. We’ve put our DNA sequences together, introduced them into a cell and now we wait for them to grow8. We’ve used GFP (a Green Fluorescent Protein) as one of our “signals” so we can visualize our signal (just like one would use an LED to view a digital signal).

And… nothing. At first. After about 160 minutes our cells start to glow. Just like electronic ring-oscillators, our frequency depends on the delay time of each NOT gate. In electrical contexts, this gives us frequencies commonly in/above the kHz range. In biology, we’re working at a blazing fast 1×10[-4] Hz with a period of ~160 minutes. Again, another stark difference between biological and electrical circuits.

In Practice / Why You Should Care

Okay, I know how it seems. Biological Logic is underdeveloped, slow and constrained by life. But, there is a harmony! What biology lacks, it makes up for in immeasurable ways. After all, we’re made of cells, not silicon.

From regulating transgene expression for regenerative medicine to a tunable dual-promoter integrator for targeting of cancer cells, cellular logic has the opportunity to change the way we think about how medicine should work, what we think life is and whether or not plant’s should glow. You should care because it’s cool it’s new and it has the potential to help lots of people. We’re hackers. We’ve always been at the forefront of technology, and just because this one’s squishy things don’t need to change. So, let’s get hacking!

I really enjoy writing about synthetic biology, as you might have guessed, so let me know if there are any topics that y’all would like to hear about. Would a few “Getting Started” articles on, well, getting started in synthetic biology with actionable procedures be a good place to start?


[1] Calculated using the figures from the Forbes Article “How Many Transistors Have Ever Shipped?”. While I have little confidence in this article, I am willing to believe that the figure presented is accurate to at least a few orders of magnitude. Regardless, the exact number is less important than the overall impression that many transistors surround us today.

[2] Specifically, the E. Coli was controlled by Isopropyl β-D-1-thiogalactopyranoside (IPTG) which is a molecular mimic of allolactose, a lactose metabolite. IPTG is used because, unlike allolactose, IPTG is not hydrolysable by β-galactosidase, so its concentration remains constant as it’s not broken down as readily.

[3] Okay, yes: DNA is made of nucleotides but copper is made of atoms and we have to stop somewhere. In our context today, it makes sense to stop at DNA, but in other contexts, such as DNA synthesis, DNA clearly isn’t the base unit.

[4] To say that cells are just “bags of chemicals” is a gross oversimplification analogous to calling our bodies just “skin with stuff inside”. Technically true, but not very descriptive. What I’m trying to get across here is that cells are (1) bound by a membrane, that they are (2) one system of transmitters and receivers and that (3) they have a limited rate at which they can absorb/deport things. This metaphor makes it easy to visualize these attributes, so I have chosen it in the spirit of Upaya (where something may not be ultimately “true” in the highest sense, but it may still be an expedient practice). For a more accurate representation of cells, check out this award winning book: Cells, Gels and the Engines of Life.

[5] Throughout this article, I use Promoter as a broad phrase, to refer to Repressors and Promoters for two reasons: simplicity and to avoid the constant use of promoters/repressors throughout the article, promoter is already a long enough word.

[6] Granted most, if not all of these promoters are only characterized for E. Coli. But, with E. Coli being the workhorse of synthetic biology, this usually isn’t an issue.

[7] By sustainable, I mean that the cell shouldn’t die from expressing the proteins that we need for our circuit. I, however, did not mean that the output would be sustainable over extended periods of time. As time progresses, our system will break down we’ll eventually get weak expression of all 3 proteins in our system. Oh well, that’s life in the city.

[8] I dislike the fact that I fast forwarded past this process. The process of getting DNA ready (not to mention preparing/designing the DNA) and coercing the cells to express your DNA is a whole ‘nother bucket of worms. Could easily be another article (or set of articles). (Wink wink)

Synthetic Biology Creates Living Computers

Most people have at least a fuzzy idea of what DNA is. Ask about RNA, though, and unless you are talking to a biologist, you are likely to get even more handwaving. We hackers might have to reread our biology text books, though, since researchers have built logic gates using RNA.

Sometimes we read these university press releases and realize that the result isn’t very practical. But in this case, the Arizona State University study shows how AND, OR, and NOT gates are possible and shows practical applications with four-input AND gates and six-input OR gates using living cells. The key is a construct known as an RNA toehold switch (see video below). Although this was worked out in 2012, this recent study shows how to apply it practically.

Continue reading “Synthetic Biology Creates Living Computers”

Get into Biohacking on the Cheap with this Electrophoresis Rig

If you want to get into electronics, it’s pretty straightforward: read up a little, buy a breadboard and some parts, and go to town. Getting into molecular biology as a hobby, however, presents some challenges. The knowledge is all out there, true, but finding the equipment can be a problem, and what’s out there tends to be fiendishly expensive.

So many would-be biohackers end up making their own equipment, like this DIY gel electrophoresis rig. Electrophoresis sorts macromolecules like DNA or proteins by size using an electric field. For DNA, a slab of agarose gel is immersed in a buffer solution and a current through the tank moves the DNA through the gel. The shorter the DNA fragment, the easier it can wiggle through the pores in the gel, and the faster it migrates down the gel. [abizar]’s first attempt at a DIY gel rig involved a lot of plastic cutting and solvent welding, so he simplified the process by using the little plastic drawers from an old parts cabinet. With nichrome and platinum wires for electrodes for the modified ATX power supply, it’s just the right size and shape for the gel, which is cast in a separate mold. The video below shows the whole build, and while [abizar] doesn’t offer much detail on recipes or techniques, there are plenty of videos online to guide you.

Need more apparatus to deck out your lab? We’ve got you covered there too.

Continue reading “Get into Biohacking on the Cheap with this Electrophoresis Rig”

OSM (Pronounced Awesome) Hardware Makes DNA in Space

OSM stands for Oligonucleotide Synthesizer designed for use in Microgravity, meaning that it’s a device that makes arbitrary DNA strands (of moderate length) in space. Cool eh? I’ve been working on this project for the last eight months with a wonderful team of fellow hackers as part of the Stanford Student Space Initiative, and I’d like to share what we’re doing, what we’ve already done, and where we’re going.

Why space? Well, first of all, space is cool. But more seriously, access to arbitrary DNA in space could accelerate research in a plethora of fields, and the ability to genetically engineer bacteria to produce substances (say on a martian colony) could mean the difference between death and a life-saving shot. In short, it’s hard to predict the exact DNA one might need for research or practical use before hand.

First, as Hackaday tends to be a little light on biology terminology, we need to get a little vocabulary out of the way to grease the ways of communication. If you have a Ph.D. in synthetic biology, you might want to skip this section. Otherwise, here are five quick terms that will make your brain bigger so stay with me!

Continue reading “OSM (Pronounced Awesome) Hardware Makes DNA in Space”

Enzymes From The Deep – The Polymerase

Our bodies rely on DNA to function, it’s often described as “the secret of life”. A computer program that describes how to make a man. However inaccurate these analogies might be, DNA is fundamental to life. In order for organisms to grown and replicate they therefore need to copy their DNA.

DNA structure and replication

Since the discovery of its structure in 1953, the approximate method used to copy DNA has been obvious. The information in DNA is encoded in 4 nucleotides (which in their short form we call A,T,G, and C). These couple with each other in pairs, forming 2 complimentary strands that mirror each other. This structure naturally lends itself to replication. The two strands can dissociate (under heat we call this melting), and new strands form around each single stranded template.

However, this replication process can’t happen all by itself, it requires assistance. And it wasn’t until we discovered an enzyme called the DNA polymerase that we understood how this worked. In conjunction with other enzymes, double stranded DNA is unwound into 2 single strands which are replicated by the polymerase.

Continue reading “Enzymes From The Deep – The Polymerase”

DNA Lamp Adds Some Science To Your Room

Lava lamps had their time, but that time is over. Perhaps a spinning, glowing, DNA helix style lamp will take their place?

Inspired by the ever mesmerizing DNA helix, a member of the eLab hackerspace decided to try making it into a lamp. It’s almost entirely 3D printed, with the helix made out of glow in the dark filament.  A series of UV LEDs fade in and out as a small geared motor from a microwave turntable spin the helix round and around.

[João Duarte] designed the assembly using TinkerCAD and has shared all the files on the Instructable in case you want to make one yourself. It is a lot of printing though, so you might want to recruit your own hackerspace’s 3D printer to do some of the work. He ended up using his own Prusa i3 as well as the LulzBot TAZ4 from the space to speed things up.

Continue reading “DNA Lamp Adds Some Science To Your Room”

Store Digital Files for Eons in Silica-Encased DNA

If there’s one downside to digital storage, it’s the short lifespan.  Despite technology’s best efforts, digital storage beyond 50 years is extremely difficult. [Robert Grass, et al.], researchers from the Swiss Federal Institute of Technology in Zurich, decided to address the issue with DNA.  The same stuff that makes you “You” can also be used to store your entire library, and then some.

As the existence of cancer shows, DNA is not always replicated perfectly. A single mismatch, addition, or omission of a base pair can wreak havoc on an organism. [Grass, et al.] realized that for long-term storage capability, error-correction was necessary. They decided to use Reed-Solomon codes, which have been utilized in error-correction for many storage formats from CDs to QR codes to satellite communication. Starting with uncompressed digital text files of the Swiss Federal Charter from 1291 and the English translation of the Archimedes Palimpsest, they mapped every two bytes to three elements in a Galois field. Each element was then encoded to a specific codon, a triplet of nucleotides. In addition, two levels of redundancy were employed, creating outer- and inner- codes for error recovery. Since long DNA is very difficult to synthesize (and pricier), the final product was 4991 DNA segments of 158 nucleotides each (39 codons plus primers).

Continue reading “Store Digital Files for Eons in Silica-Encased DNA”