Polymerase/nicking enzymes and nucleic-acid scaffolds are implemented as DNA machines for the development of amplified DNA-detection schemes, and for the design of logic gates. The analyte nucleic acid target acts, also, as input for the logic gates. In the presence of two DNA targets, acting as inputs, and appropriate DNA scaffolds, the polymerase-induced replication of the scaffolds, followed by the nicking of the replication products, are activated, leading to the autonomous synthesis of the Mg2+-dependent DNAzyme or the Mg2+-dependent DNAzyme subunits. These biocatalysts cleave a fluorophore/quencher-functionalized nucleic-acid substrate, thus providing fluorescence signals for the sensing events or outputs for the logic gates. The systems are used to develop OR, AND, and Controlled-AND gates, and the DNA-analyte targets represent two nucleic acid sequences of the smallpox viral genome.