This isn't a general answer to your question, but by the structured programming theorem, all that is needed is the ability to do selection (e.g., if
in C/C++) and repetition (e.g., while
in C/C++). Edit: as pointed out by Dave Clarke in the comments, the structured programming theorem also requires sequence. I didn't initially list this since I took for granted the reader would understand that basic blocks of other instructions, such as those alluded to later for reading from and writing to the memory store, etc., were also necessary). It is, of course, better to be explicit; you need to be able to do these things, too.
Since both of these can be implemented using a conditional jump instruction (e.g., JNZ
in x86), that is also sufficient for Turing-equivalence.
Note that other things are required, i.e., the ability to write an unbounded number of symbols (e.g., bits... 0 or 1) to some sort of external memory store. In that sense, real computers are not Turing equivalent, since none of them have an infinite amount of storage. The Turing model is still useful, though, since the amount of memory is typically huge, and even though any problem a real computer can solve can be solved by a deterministic finite automaton, using that model of computation isn't particularly useful (since the number of states would be preposterously huge).
Note that this isn't necessarily at odds with sepp2k's answer; this is sort of just a different way to think about the same question.
EDIT:
Note also that you don't really need both if
and while
in C/C++. You can simulate if
using while
as follows:
bool C;
// some code that sets C
if(C) { /* some other code /* }
// rest of the program
The following code is always equivalent:
bool C;
// some code that sets C
bool C2 = C;
while(C2) { /* some other code /* C2 = false; }
// rest of the program
Well... the construction should work and be possible if you're careful, that is. Note also that if you have recursive functions, you eventually need selection also; since recursive functions without selection can't really implement base cases, so any recursive function would result in infinite recursion.
EDIT:
Also, regarding your question as to whether the ability to write a program that doesn't halt is sufficient for Turing equivalence, the answer is no; it is necessary, but not sufficient. We can solve the halting problem for programs written in a language which cannot express programs that fail to halt; the answer is "the program does halt" for all instances. However, we can define a language where the only instruction causes the machine to enter an infinite loop... such a language isn't Turing-equivalent.