It is worth specifying the exact meaning of "code" in this question. A code is a map from one space to another space with which it has no algorithmic connection. Thus representing 321 as 0x141 is not an instance of a code, because there is an algorithm; but representing 321 as the letter Ł is a code (Unicode, in this case) because there is no intrinsic connection between the number and the symbol. The only way of knowing which number matches which symbol is to look it up in a book.
Popular presentations of the way cells work speak of the DNA/RNA code as a code. There is no algorithmic transcription of RNA to proteins. The transcription from codons to amino acids is a code which human beings interpret by looking it up in a table. Cellular machinery interprets it by the fact that GUN→Val transfer RNA is present in the cell but a GUN→Glu transfer RNA is not. During protein synthesis, each transfer RNA molecule, having acquired a molecule of its designated amino acid, pairs with the codon it is designed to pair with. The code table is thus defined by the set of tRNAs that happen to be floating around in the cell.
(There may well have been some over-simplifications in the above picture).
On the other hand, the DNA code is not a code in the sense that the DNA molecule (and still more RNA) is not a passive repository of code sequences but a reactive entity, and those reactions depend on the nucleotide sequence in a way different from the tRNA-mediated encoding. Coding regions; non-coding regions; long strings of single nucleotides; initiation sites; 3-D structure of the molecule – all these depend on the nucleotide sequences in a way separate from their role as codons.
This is why this is a "to what extent?" question.
A thought experiment
To the extent that the genetic code is a code, an experiment of this kind ought to be possible, and perhaps even not far from practicability. To the extent that the code isn't a code, it wouldn't work.
- Elucidate the structure of GAU-to-Glu tRNA and GAA-to-Asp tRNA, neither of which exist in nature.
- Synthesise RNA that codes for them and insert it into a suitable cell, making it a machine for synthesizing these two tRNAs. Manufacture a large quantity of these tRNAs.
- Taking the DNA of a target cell (not necessarily the same species as before), replace the genes coding for GAU-to-Asp and GAA-to-Glu tRNA with genes coding for GAU-to-Glu tRNA and GAA-to-Asp tRNA. Such a cell would not live, since it would mistranscribe most of its proteins.
- Before reinserting the DNA, make a copy of it, replacing every occurrence of GAT with GAA and every occurrence of GAA with GAT.
- Just before reinserting the DNA, flood the cell with the new tRNAs manufactured in step 2. This changes the code.
- Reinsert the DNA.
The cell should now be viable. Everywhere that GAT used to code for Asp in the original cell, GAA is now found; but since the only tRNA available to the synthesis process is GAA-to-Asp, this means that Asp is still inserted exactly where it should be inserted. The change in DNA sequence is exactly compensated for by the change in available tRNAs - that is, the change in the code.
Purpose of the thought experiment
On the one hand, postulate success. The modified cell, using a different genetic code from anything else on the planet, has the advantage of being immune to all viruses. Or will being immune to viruses turn out not to be an advantage after all? The modified cell will also be very much inbred, since it cannot exchange genetic material with anything else. Advantage, or disadvantage?
On the other hand, consider the possibility of failure. Failure would appear to be because GAT and GAA (or GAU and GAA) are subtly different in their chemical properties quite apart from their role as codons. DNA and RNA might adopt different conformations, ones sufficiently different to change the nature and kinetics of their reactions as macromolecules as opposed to information repositories.
Which brings us exactly to the title of this question. If the genetic code is a pure code, then the experiment will work - just as I could make a variant Intel x86 chip in which the code for Add does subtraction and the code for Subtract does addition, and compensate for it by modifying all my programs accordingly. To the extent that the code is more than a code, the experiment will work less well.
But to what extent?