Autonomous programmable computing devices made of biomolecules could interact with a biological environment and be used in future biological and medical applications [1][2][3][4][5][6][7] . Biomolecular implementations of finite automata 8,9 and logic gates 4,10-13 have already been developed [14][15][16][17][18] . Here, we report an autonomous programmable molecular system based on the manipulation of DNA strands that is capable of performing simple logical deductions. Using molecular representations of facts such as Man(Socrates) and rules such as Mortal(X) Man(X) (Every Man is Mortal), the system can answer molecular queries such as Mortal(Socrates)? (Is Socrates Mortal?) and Mortal(X)? (Who is Mortal?). This biomolecular computing system compares favourably with previous approaches in terms of expressive power, performance and precision 2,4,8,9,11,12,19 . A compiler translates facts, rules and queries into their molecular representations and subsequently operates a robotic system that assembles the logical deductions and delivers the result. This prototype is the first simple programming language with a molecular-scale implementation.Our logic system consists of propositions, implications and queries, represented by short DNA molecules, some single-stranded and some double-stranded, as shown in Fig. 1a. A proposition p, such as 'Socrates is a Man', is represented by a double-stranded (ds) DNA molecule with a sticky end representing p on one end and a fluorophore (a fluorescent molecule) with a matching quencher (a molecule that absorbs excitation energy from a fluorophore) at its other end. A query p?, such as 'Is Socrates a Man?', is represented by a dsDNA molecule with a sticky end complementary to the representation of p and a recognition site (marked light red) for the restriction enzyme FokI. A molecular query p? can be positively answered by the molecular proposition p, because they have complementary sticky ends, as shown in Fig. 1b. The sticky end of the query molecule q? hybridizes with that of the proposition molecule q. FokI is attracted to its recognition site on the query (before hybridization or possibly following it) and cleaves the proposition molecule q. This results in the separation of its remaining sense and antisense strands, which in turn abolishes the quenching of the green fluorophore, allowing the fluorophore to emit green light in response to light excitation. This green emission can be interpreted by an outside observer as a positive response to the query.An implication p q (for example 'Socrates is Mortal if Socrates is a Man') is represented by a hairpin single-stranded (ss) DNA with three components: a sticky end representing the proposition p, a segment complementary to the representation of q and a segment that together with an auxiliary complementary strand forms a recognition site for FokI. The implication p q can be used to reduce the query p? to the query q?, meaning that to positively answer p? it suffices to positively answer q? This query reduction is justified by the d...