4 ms·
Beyond that, I have taught theory of computation in the past, and I think the rest of the article is a solid writeup. The DPA section might need another pass; t
by pflats 8y ago
Beyond that, I have taught theory of computation in the past, and I think the rest of the article is a solid writeup. The DPA section might need another pass; that felt the most uneven. Things that jumped out at me:
- If the audience if programmers unfamiliar with automata theory, I am not sure how many would know what a Turing machine, von Neumann machine, or even a program counter is.
- Clarifying what is meant by "internal" and "external" state.
- braythwayt 8y agoThank you, that's excellent feedback.
- tropo 8y agoThere is no program counter. Computers don't normally need to count programs. ("let's see, I have calc.exe, that's one, and notepad.exe makes two...") There is an instruction pointer. Note that it doesn't count. It frequently is incremented, but it can jump forward and even backward. It points at an instruction.
- dgellow 8y agohttps://en.wikipedia.org/wiki/Program_counter https://en.wikipedia.org/wiki/Program_counter
- spc476 8y agoThere's a lot of literature that states otherwise. Of the assembly languages I've studied (and within reach of me I have references to the Motorola 6809, 680x0, VAX, MIPS, Z80, 6502, and x86) it's only the x86 line that used the name `IP` (Instruction Pointer [1])---the rest all use `PC` (Program Counter). And (to be even more pedantic) that register (`IP` or `PC`) always points to the next instruction to be executed, never the current instruction being executed. And just to note, on the VAX, the `PC` register is also `R15`, so it can participate in any instruction as either a source or destination; whether that's a good idea is another matter. [1] Technically, until you get to the 64-bit version, it's `CS:IP` (Code Segment, Instruction Pointer).
- tropo 8y agoThere's a lot of literature that repeats a harmful misnomer. The register is always an instruction pointer, even if the hardware incorrectly calls it a program counter. The processor that matters most, by far, is x86. At one point PowerPC wasn't too far behind, and PowerPC still dominates in high-end network gear. Both of these processors are correctly documented. For x86 the name is ip, eip, or rip. For PowerPC the name is usually nip, meaning "next instruction pointer". Sometimes the PowerPC documentation will use "current" instead of "next", or "address" instead of "pointer". All of these are correct.
- spc476 8y agoAnd the processor that matters the most after the x86 is the ARM, which uses `PC`. I suppose all ARM documentation is incorrect then. Also, in electrical engineering, the direction of electricity is taught backwards from what it really does. In all sources I've read, electricity flows from positive to ground, whereas in reality, it's the opposite. Good luck in changing that.