Basic Hardware Architecture Questions

Mark44
Mentor
I was thinking that a discussion using the 6800 cpu might help in this thread since it had memory mapped io which eliminates some complexity from the discussion.
A related processor is the Motorola 68000, the processor used on the original Macintosh computer, as well as the Commodore Amiga. A simulator is available at http://www.easy68k.com. There might also be one for the 6800.

I'm teaching a class Intro to Computer Architecture, starting in a week. Along with the architecture stuff, students write a number of short assembly programs using a simulator for the MIPS 32-bit processor. Due to the regularity of its instruction set, assembly language is much easier to learn than, say, the Intel x86 processors. There are a couple of simulators for MIPS - QtSpim (https://sourceforge.net/projects/spimsimulator/files/) and MARS (https://courses.missouristate.edu/KenVollmar/mars/download.htm). Both allow you to single-step through a program so you can see how the registers, stack, and other memory change.
But im still thinking about how to summarize it in a post even though we know there is so much more to how a computer actually works. It might make a good insight article though.
It might be too long for an Insights article. The recommended length is ~800 words, although I have exceeded that limit several times. If one could fit a summary into an article, it would have to be very sparing on any details.

Last edited:
jedishrfu
It might be just me, but for educational purposes I prefer to suggest the PIC family, starting from the PIC12 and upward.
They are just beautifully ascetic, free of any comfy addons and such that it really makes people understand how to pile up simplicity to reach complexity.
Also, it is a family, so the later generations all has something comfortable to add (but still on the spartan side).

sysprog
This is true. However, I was responding to the OPs markup of the Turing photo where two memories were identified and i wanted to make it clear that only the tape is the memory.
The label on that machine is misleading, as would be calling any physical machine a 'Turing Machine', because doing so obscures the fact that a Turing machine is a hypothetical machine, wherein lies its usefulness.

@AdamF is not incorrect in supposing the array panel at the upper left to be a memory of sorts: it's a configurable panel of posts in specific positions that holds the program; in the case of the photo, a binary increment operation. That array panel could be considered 'read-only firmware memory' of the device as a whole.

Futhermore, (from https://siamagazin.com/mechanical-turing-machine-in-wood/):

Instead of using tape, this machine’s memory uses ball bearings placed on a steel grid. A ball can represent one of five different symbols based on its position on the grid. The machine reads and writes data by repositioning the balls into different cells. It does this by moving along the grid, lifting ball bearings with magnets and then depositing them into a new position based on a set of rules.​

Here's a youtube video of the fancifully-named machine in operation:

jedishrfu
Mentor
Here’s the one I was thinking to post but for some reason couldn’t locate at the time

It’s a true Turing machine built from LEGO with a sliding tape. The machine toggles the bits and the bits control the machines operation.

https://www.wired.com/2012/06/lego-turing-machine/

rcgldr
Homework Helper
A related processor is the Motorola 68000, the processor used on the original Macintosh computer, as well as the Commodore Amiga. A simulator is available at http://www.easy68k.com. There might also be one for the 6800.
There's also the Atari ST, and as mentioned for 6502, forums like AtariAge where there is a lot of information about the Atari ST. My preference for the Atari ST is that it is a port of Digital Research's GemDos from PC to 68000, which is a GUI on top of the equivalent of MSDOS ported to 68000. The ST can read and write MSDOS floppy disks.

MIPS 32-bit processor.
The MIPS instruction set and syntax seem awkward to me. I'm not sure why it became so popular. I think the other processors mentioned in this thread would be better choices, but this is opinion based.

Mark44
Mentor
The MIPS instruction set and syntax seem awkward to me. I'm not sure why it became so popular. I think the other processors mentioned in this thread would be better choices, but this is opinion based.
I'm pretty familiar with the MIPS instruction set now, having taught a course twice in which it is used. There are lots of registers (32 integer registers, and 16 or 32 floating point registers, depending on whether you use them for doubles or floats), as opposed to the paltry collection available on, say, an 8086. You can use the MIPS registers for whatever -- there's no distinction between address registers and data registers, as on the 68000 (and presumably the 6800 works the same way).

I've never written an 6502 code, but I know a little about its instruction set and register set. In comparison to modern CPUs, or even other processors of its time, it had a very small set of registers: A (accumulator), X, Y, PC (program counter), and S (stack pointer).

The MIPS instruction set is sparse, to be expected in a RISC processor, but the instructions are straightforward to use, IMO. For example, all of the arithmetic instructions take three operands, with add $t0,$t1, $t2 meaning that the contents of registers$t1 and $t2 are added, and written to register$t0.

rcgldr
Homework Helper
The MIPS instruction set is sparse, to be expected in a RISC processor, but the instructions are straightforward to use, IMO. For example, all of the arithmetic instructions take three operands
I would prefer some variation of the ARM processor, but it is (or at least was) expensive to get a development took kit with an emulator.

I've never written an 6502 code, but I know a little about its instruction set and register set. In comparison to modern CPUs, or even other processors of its time, it had a very small set of registers: A (accumulator), X, Y, PC (program counter), and S (stack pointer).
True, but you can buy used 6502 "home computers" such as the Atari or Commodore, and I think there are emulators, that don't cost too much. The Z80 has a better instruction set, and Z8 is even better (with 128 or 256 registers), but Z8 was never popular. The worst instruction set I encountered was the Data General Nova, 4 registers, with only 2 of them used for math, and reduced instruction set that required sequences like load r0, load r1, add r0,r1, store r0, ... (no add from/to memory instruction). I recall some Fortran based apps that could not be compiled on the Nova because the code size exceeded 64K, while those same apps could be compiled on 8080 or 6502 based systems within the 64K limit.

Assuming a person has a reasonably modern PC running in either 32 bit or 64 bit mode, then it would be reasonable to learn assembly on if a sub-set of the instruction set was used for teaching purposes.

Here’s the one I was thinking to post but for some reason couldn’t locate at the time

It’s a true Turing machine built from LEGO with a sliding tape. The machine toggles the bits and the bits control the machines operation.

https://www.wired.com/2012/06/lego-turing-machine/

Thanks again for the Lego model, I understand a lot more of where I was off w/ identifying the memory now.

I guess where I've been getting tripped up is the part where all of the modern components come in -- the idea is that the principles are exactly the same as in the Lego Turing machine but instead of mechanical gears and macroscopic forces, electricity is used to "turn the gears", so to speak, and this part would be far less confusing to me if I understood electro-magnetism better?

jedishrfu
Mentor
Computers using relays were popular in the early days of computing but were quickly replaced with tubes and then transistors and finally with today’s integrated circuits.

Relays were large and failed quite a lot whereas tubes worked better but over time they too burnt out limiting the size of a computer. The Zuse computers were mechanical relays and quite fast too but were superseded but transistor computers.

Electromagnetism is now only used in magnetic disk drive technology. The rest of the computer is digital logic implemented in integrated circuits.

jedishrfu
Mentor
Another great Turing machine video:

this time using dry-erase markers and a plastic tape to simulate reading, writing and erasing data on the tape.

Just wanted to pop in and say thank you to everybody who has generously answered my questions and provided all of these resources -- I think I have more than enough models and ideas to work on understanding for awhile.

Tom.G and PeterDonis