DNA is made of a string of different proteins.There are 4 different proteins which make up the human DNA.We can represent each protein as a 2 bit sequence of '0' and '1'.However wouldnt it be much better if we had 4 available logic states('0','1','2','3') for every type of protein?How would a algebra having as a base 4 available logic states look like compared to boolean algebra?

  • $\begingroup$ Thank you for posting this question. Unfortunately, your question is unclear, and it is very unlikely anyone could answer it without further details. In particular, it is not clear what you mean by an "algebra" with "available states". We will put the question on-hold for the time being, but you will still be able to edit and improve it. Once you clarify the question you can flag it to get our attention. See our FAQ for further details! $\endgroup$
    – Pseudonym
    Jul 4, 2022 at 0:07
  • $\begingroup$ Edited.I hope it is more clear now. $\endgroup$
    – Miss Mulan
    Jul 4, 2022 at 13:51
  • $\begingroup$ What is the purpose of this algebra? $\endgroup$
    – user253751
    Jul 4, 2022 at 14:01
  • $\begingroup$ To describe a sequence of DNA proteins or what is the complementary of each protein. $\endgroup$
    – Miss Mulan
    Jul 4, 2022 at 14:01

2 Answers 2


DNA is a long-chain polymer. The monomers that comprise a DNA strand are referred to as "nucleotides".

A protein is a completely different polymer, the monomers of which are called amino acids. The "standard model" relationship between the two (which is a little more complex in practice) is that the "coding regions" of DNA encode sequences of amino acids, DNA is transcribed into RNA, and these RNA transcriptions get turned into proteins.

A nucleotide is comprised of a sugar molecule onto which there are two additional radicals: phosphate, which links the sugar molecules together into a chain, and one of four bases: adenosine, cytosine, guanine, and thymine (hereafter referred to A, C, G, and T).

In bioinformatics, we don't typically care about the difference between a "nucleotide" and a "base" and tend to use the terms interchangeably.

DNA is organised into a double helix structure. We can read each helix strand in a known order, typically 5' to 3'. The sugar molecule has a pentagonal structure, and the primes refer to where on that pentagon the phosphate molecules bond.

The other strand of the helix is (assuming no errors) the "reverse complement". The strand has the opposite order (using 5'-3' ordering), and each nucleotide is hydrogen-bonded with its complement: A is the complement of T, and C is the complement of G.

So, for example, to find the reverse complement of the sequence ATTTG, swap each nucleotide for its complement, and reverse the whole sequence, obtaining CAAAT.

A quirk of the Latin alphabet is that if you represent the four nucleotides in alphabetical order and assign a two-bit code to them, the complement of a nucleotide is its the logical "not".

00 A Adenosine
01 C Cytosine
10 G Guanine
11 T Thymine

The complement of a nucleotide isn't that useful on its own. The reason why it's important is that if you read a sequence of DNA, you could be reading from either strand of the double helix. You therefore need to consider the reverse complement of a sequence, not merely the complement of each base.

There are lots of situations where interpreting nucleotides as algebraic objects are useful, but which interpretation you pick depends on precisely what you're trying to do.

As a real example, I was once tasked with designing an error-correcting code for tagging DNA samples. The first approach I tried was to use a linear code, and that meant interpreting each nucleotide as an element of the finite field $GF(4)$. There might be other uses for that particular algebraic interpretation, but it's not obvious to me.

In summary, DNA doesn't have a "natural" algebraic structure, in the sense of an algebraic interpretation which corresponds to anything chemical or biological. If it's convenient to interpret DNA using some specific algebra to solve a problem that you're faced with, go for it. But it will likely be different depending on the specific problem.


IMO speaking of algebra here is irrelevant. No computation is ever made on the strings (be them bits or quaternary digits), no boolean operation, only comparisons for equality.

Furthermore, if you somehow encode the digits 0-3 or symbolic values like A T G C, the representation will most probably end-up as the binary numbers 00 01 10 11.

By the way, all computers in the world are binary, as this system is by far the most hardware-efficient. There had been attempts to build ternary computers, but they were abandoned. A quaternary computer is out of question.

Also notice that computer registers always have an even size (most of the time a power of 2), so that bits fit in pairs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.