Basic Hardware Architecture Questions

In summary: I misunderstanding something?The computer used the laws of Physics to rig the whole thing up this way from the beginning and then later just tacked on the things like the letters and numbers of the keyboard... or am I misunderstanding something?The computer uses a keyboard and a monitor to type in commands. The keyboard sends the symbols that make up the command to the monitor, which displays the symbols so that the user can see them. The user types the symbols that make up the command into the keyboard.
  • #36
AdamF said:
Hence, my initial interest in models which do not even involve electricity.
In which case, you're very far away from modern computers.
 
  • Like
Likes Vanadium 50
Technology news on Phys.org
  • #37
Rive said:
6502 is a good CPU, but I would rather recommend an available one instead - even if you get an old Commodore or like, it'll still have a few abstraction layers, but you will have to fight the missing documentation too...
Documentation for the C64 isn't missing. You can still find everything online ,
http://www.classiccmp.org/cini/pdf/Commodore/C64%20Programmer%27s%20Reference%20Guide.pdf

Stackoverflow works as well. There is a very active community.

The commodore 64 is a very good machine for this, since it is relatively easy to do fun stuff with sprites/sound etc. by writing to the chips directly. You will need some experience with programming however, and you might not want to start with Commodore basic.
 
  • #38
PeterDonis said:
These are all one question, because the computer does not store numbers, sound, or images; it just stores bits.
In the short lived era of CRT based memories, it could be considered that the computer did store "images", and the CRT's scanning was used to interpret the "pixels" on the monitor screen as bits.

An actual example of an imaging device would be the Tektronix 4010 vector graphics monitor. It literally stored the image produced by the vector commands until it was commanded to erase the entire screen. There are no bits on the screen, just permanent persistence phosphors painted by the vector controlled electronic beam.

https://en.wikipedia.org/wiki/Tektronix_4010

QR or bar codes are examples where an "image" can be printed on a piece of paper and later scanned to convert the image back into a string of bits.
 
Last edited:
  • #39
PeterDonis said:
Keyboards generate scan codes--sequences of bits that tell the computer what keys were pressed and in what order. ASCII and Unicode are interpretations of sequences of bits as text. It so happens that, if you press an ordinary alphabetic key on the keyboard, the scan code (sequence of bits) that gets sent to your computer corresponds to the ASCII code (sequence of bits) for the letter that's on the key.
I'm not aware of any standard PC keyboard where the scan code equals the ASCII code. For example pushing down on the letter A on a keyboard produces a scan code of hex 1E or hex 1C (depending on scan code set), and doesn't correspond to hex 41 (ASCII upper case A) or hex 61 (ASCII lower case A).

https://en.wikipedia.org/wiki/Scancode
Rive said:
6502 is a good CPU, but I would rather recommend an available one instead - even if you get an old Commodore or like, it'll still have a few abstraction layers, but you will have to fight the missing documentation too.
I don't know about the Commodore 64, but the Atari 8 bit family of computers: 400 / 800 / 65 XE / 130 XE are also 6502 based (they run at 2 mhz), and there are forums at web sites like AtariAge that have a lot of information on the Atari 8 bit systems and their peripherals, and access to toolsets (assemblers, basic interpreters, ...) . There are now Atari peripheral bus to USB interfaces that allow a PC to act as an Atari peripheral (usually as a floppy disk).
 
Last edited:
  • #40
rcgldr said:
I'm not aware of any standard PC keyboard where the scan code equals the ASCII code.

Hm, I must have been misremembering. Or perhaps I was mixing up PC scan codes with codes from earlier keyboards.
 
  • #41
Checkout the Turing Tumble toy at turingtumble.com. Its a marble based computer.

Each marble represents a digital pulse. The marble gates represent electronic ones which activate when a digital pulse is input.

The toy can do binary arithmetic as well as solve logic puzzles and play logic games.

This illustrates some aspects of how a cpu works.
 
  • #42
In general things are very abstracted in computers nowadays. Keyboard scan codes identify the key that is pressed. A device driver maps it to the locale specific code point to be stored in an input buffer.

Some examples of locale specific code sets are ascii or extended ascii or unicode.

Later at display time, the locale code point selects a character from the specified font table and the font data is rendered on screen or printed.
 
  • #43
jedishrfu said:
Checkout the Turing Tumble toy at turingtumble.com. Its a marble based computer.

Each marble represents a digital pulse. The marble gates represent electronic ones which activate when a digital pulse is input.

The toy can do binary arithmetic as well as solve logic puzzles and play logic games.

This illustrates some aspects of how a cpu works.

Oh, this is awesome, I'm going to pick one up, thanks so much!

Is the main reason that electricity is used for the modern computer is because electricity moves so much faster?
 
  • #44
jedishrfu said:
In general things are very abstracted in computers nowadays. Keyboard scan codes identify the key that is pressed. A device driver maps it to the locale specific code point to be stored in an input buffer.

Some examples of locale specific code sets are ascii or extended ascii or unicode.

Later at display time, the locale code point selects a character from the specified font table and the font data is rendered on screen or printed.

By the way, in the Turing Tumble, the bottom area that collects the marbles would be analogous to a form of "memory", right?
 
  • #45
You might find this thread helpful. The link is to a post in it in which I included a link to a download for the Circuit Scramble Android game, which is a fun app for building understanding of the workings of logic gates.
 
  • #46
Okay, so the idea of the computer memory is kind of like the wiring in a house, where you can turn off the power to the house, but when you turn it on again, the electricity will flow to the areas that were on before because the circuits are still being completed there, regardless of whether or not they have power?
 
  • #47
AdamF said:
Is the main reason that electricity is used for the modern computer is because electricity moves so much faster?
Yes. There seems to be some research on optical computers, in which the signals would be sent by lasers, but there are difficulties converting between optical and electrical signals, so this type of computer seems to be down the road a few years.
AdamF said:
By the way, in the Turing Tumble, the bottom area that collects the marbles would be analogous to a form of "memory", right?
I don't think so. The bottom area just collects the marbles that have gone through the various doodads. They don't "remember" what gates they have gone through. A better analogy I think would be a battery that powers a cellphone.
AdamF said:
Okay, so the idea of the computer memory is kind of like the wiring in a house, where you can turn off the power to the house, but when you turn it on again, the electricity will flow to the areas that were on before because the circuits are still being completed there, regardless of whether or not they have power?
This is a better analogy than some you've come up with. The switches in a house correspond pretty closely with the capacitors in a static RAM chip, a kind of memory that preserves its state even when the power is off, such as in solid-state external hard drives. That's in contrast to dynamic RAM, which loses its state when it's no longer powered.

I looked at the Turing Tumble web site. That might be fun for very young kids, but if you really want to learn about computers, my advice would be to get a real computer, such as an Arduino or Raspberry PI, or a kit with one of the CPUs already mentioned in this thread, and learn how to program it, preferably in C and later, in assembly.
 
Last edited:
  • #48
AdamF said:

In the turing model the tape is the only memory with the machinery reading and writing values to the tape. The tape controls what the machine does.

It is the most fundanental of computers and is used in exploring many fundamental computer science theorems most notably the halting problem.
 
  • #49
jedishrfu said:
In the turing model the tape is the only memory with the machinery reading and writing values to the tape. The tape controls what the machine does.

It is the most fundanental of computers and is used in exploring many fundamental computer science theorems most notably the halting problem.
All well and good, but if I wanted to know about computer architectures and such, I would want to work with some actual hardware.
 
  • #50
Mark44 said:
All well and good, but if I wanted to know about computer architectures and such, I would want to work with some actual hardware.

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.

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.

But I am 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.
 
  • #51
jedishrfu said:
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.
jedishrfu said:
But I am 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:
  • Like
Likes jedishrfu
  • #52
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).
 
  • Like
Likes sysprog
  • #53
jedishrfu said:
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:

 
  • #55
Mark44 said:
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.

Mark44 said:
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.
 
  • #56
rcgldr said:
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.
 
  • #57
Mark44 said:
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.

Mark44 said:
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.
 
  • #58
jedishrfu said:
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?
 
  • #59
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.
 
  • #60
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.
 
  • #62
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.
 
  • Like
Likes Tom.G and PeterDonis

Similar threads

Replies
14
Views
2K
  • Programming and Computer Science
Replies
25
Views
2K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
14
Views
1K
  • Programming and Computer Science
Replies
10
Views
5K
  • Quantum Interpretations and Foundations
6
Replies
204
Views
7K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
833
  • Programming and Computer Science
Replies
3
Views
2K
Back
Top