The process of reverse transcription is extremely error-prone, and the resulting mutations may cause drug resistance or allow the virus to evade the bodys immune system. The reverse transcriptase also has ribonuclease activity that degrades the viral RNA during the synthesis of cDNA, as well as DNA-dependent DNA polymerase activity that creates a sense DNA from the antisense cDNA. Together, the cDNA and its complement form a double-stranded viral DNA that is then transported into the cell nucleus. The integration of the viral DNA into the host cells genome is carried out by another viral enzyme called integrase.The integrated viral DNA may then lie dormant, in the latent stage of HIV infection. To actively produce the virus, certain cellular transcription factors need to be present, the most important of which is NF-κB (nuclear factor kappa B), which is upregulated when T cells become activated. This means that those cells most likely to be targeted, entered and subsequently killed by HIV are those actively fighting infection. During viral replication, the integrated DNA provirus is transcribed into RNA. The full-length genomic RNAs (gRNA) can be packaged into new viral particles in a pseudodiploid form. The selectivity in the packaging is explained by the structural properties of the dimeric conformer of the gRNA.
The gRNA dimer is characterized  by a tandem three-way junction within the gRNA monomer, in which the SD and AUG hairpins, responsible for splicing and translation respectively, are sequestered and the DIS (dimerization initiation signal) hairpin is exposed.The formation of the gRNA dimer is mediated by a kissing  interaction between the DIS hairpin loops of the gRNA monomers. At the same time, certain guanosine residues in the gRNA are made available for binding of the nucleocapsid (NC) protein leading to the subsequent virion assembly. The labile gRNA dimer has been also reported to achieve a more stable conformation following the NC binding, in which both the DIS and the U5:AUG regions of the gRNA participate in extensive base pairing.RNA can also be processed to produce mature messenger RNAs (mRNAs). In most cases, this processing involves RNA splicing to produce mRNAs that are shorter than the full-length genome. Which part of the RNA is removed during RNA splicing determines which of the HIV protein-coding sequences is translated.Mature HIV mRNAs are exported from the nucleus into the cytoplasm, where they are translated to produce HIV proteins, including Rev. As the newly produced Rev protein is produced it moves to the nucleus, where it binds to full-length, unspliced copies of virus RNAs and allows them to leave the nucleus. Some of these full-length RNAs function as mRNAs that are translated to produce the structural proteins Gag and Env. Gag proteins bind to copies of the virus RNA genome to package them into new virus particles.