Learning about computers from nothing

A current thread about computer architecture Why was the stored program concept developed? made me realize that although I’ve used personal computers for decades, I know next to nothing about how they work. Decades ago I got a tiny grounding is now-obsolete programming such as Basic and DOS 5 batch files but never really learned to program beyond the “See Dick and Jane run” level.

So imagine starting to teach a 7-year old about computers. Their current understanding of computers is: “computers are boxes that do things. They run on electricity. They have things called bytes inside them that tell them what to do. Sometimes the computer doesn’t work right; then you have to turn it off and start over again. If it still doesn’t work you take it to the computer repair shop”.

So from that level, where do you start?

Depends on what your goal is. Do you want to learn how to fix OS (Windows/iOS) problems? Hardware problems? Do you want to learn programming? Networking? etc etc etc

Luckily in this day and age, google’s your friend. Just about anything you want to learn will have websites, reddit subs, youtube videos etc that can teach you, regardless of your current skill level.

Beyond that, once you know what your goal is, just keep working towards it.

It depends on where you want to end up. Are you trying to learn the basics of how an operating system works? Do you want to know what the different hardware components do? I assume you’re not talking about being a user of a computer since you indicate a lot of experience there.

I’m a professional and I have to know how a computer works for my career, and the way that I got started was reading books geared toward teaching CompTIA A+ computer certification (which was my doorway into a real career). A good A+ book handles things pretty well from both the software and hardware end.

Now, I wouldn’t recommend this to a 7-year-old, but I don’t think you’re a 7-year-old.

There’s a book for that. :slight_smile:

There are kits where you can construst a working processor out of discrete components

But, maybe, start with some elementary logic stuff but mainly (higher level than logic gates) programming? That way you can understand how to “tell a computer what to do”.

If you like video games, there are any number of programming games, from Robot Odyssey to Human Resource Machine and dozens of others.

For the low level functionality of a computer look at these steps. This is nearly all that most people will ever need to know about it.

Explain that computers look at everything as a bunch of 1’s and 0’s. It’s not hard to explain how binary numbers work just looking at the numbers 0 to 15 and how in computer memory a 1 is stored as one voltage and a 0 at a different voltage. Since they’ll encounter words like Bit, Byte, Word, etc. explain how those are just different sizes of binary numbers. Down the road you can explain the basic logic operations, AND, OR, XOR, NOT, and how negative numbers are represented.

Explain that text you see on the screen are contained in memory as binary numbers, and that there is a unique number for each character. Explain how memory is numbered list of binary numbers and text would be contained in memory as a consecutive set binary numbers.

Follow that by explaining that images on a screen consist of an array of pixels, a fixed number of pixels wide, another fixed number of pixels high. For each pixel there is a binary number held in memory that controls the color and intensity of each pixel.

To introduce someone to how computers work at the high level you need to introduce programs. It’s pretty easy to explain to a 7 year old how a Hello World program works. It does get more difficult as the student gets older though. It helps to add something like a loop to print Hello World 10 times for people to get a better understanding. From this point it has to get deeper into a programming language and techniques. Luckily there are plenty of online tutorials for anyone interested enough to get started.

All along the way you have to impart that these basics can be built upon each other to create more complex processes.

Buy them an analog computer. Same thing as a computer but with analog switches.

Like the Digi-Comp II. (not sure if you can still buy one)

It uses balls running down a track and is a wonderful illustration of how a modern computer works.

ETA: I should have said mechanical and not analog above. (can’t edit posts with a video in it)

I’d strongly consider getting them set up to play with an Arduino (or newer microcontroller board - say, a RaspberryPi Pico) - initial investment around $30. It won’t teach everything about personal computers, but it can take an interested person fairly far.

In that case, you have to NB: Arduino is Harvard architecture, which is kind of it’s own thing, while a Pico is ARM which is more ubiquitous.

I agree it depends on what you want to get out of it. But if you want to understand from the bottom up, I’d recommend finding really old computer science textbooks on computer architecture and operating systems. Old as in 40 years old. Things back then were much simpler than today, and these will give you a good background which you can build on when reading more recent books and pages.
The approach I was going to use for my potential book was examining what happens when someone hits enter while running a program like Word. That covers hardware, in communication from the keyboard to the computer and getting the pressed key into memory, the operating system, the program which is waiting for input.
Another idea is to take a look at the instruction set of an Intel or ARM processor. Once you understand that, you understand a lot of the microarchitecture, and then you’ll be ready for the next level up, which is instruction scheduling.
Some people might want to concentrate on file systems and the memory architecture. If you are really starting from nothing, this could help a lot. My wife who is a biologist has a hard time distinguishing the view of files from within Word and from File Explorer.
I could understand why it’s tough. Half of computer science wasn’t invented yet when I was a CS major, so we learned both computer engineering and computer science. No databases, no networking. Simpler times.

Going on the basis that you seek the joy of understanding how they work, I’m thinking of a few ways.

FORTH is a fascinating old language that is very close to the metal (meaning the programmer thinks more nearly at the hardware level). It can be small; I remember the Pygmy FORTH package was only 15k in size. There’s a version from C. H. Ting that starts with MASM programming and then builds on itself (much of FORTH is written in itself); I loved learning that various conceptual things (the pad, the number stack, the return stack, strings) lived in specific places in the memory. This FORTH version doesn’t come with any binary file, just the text you type into MASM and then FORTH. Ting himself once gave a concert playing Bach music by connecting his PC’s printer port to an audio amp through a carefully chosen set of resistors. There are also beautiful books by Leo Brodie (especially Starting FORTH) that make such sense of it all. Somewhere along the way I came across a discussion of a small version of FORTH and felt like I’d been sitting under a banyan (or fig) tree when I came to the revelation that the Inner Interpreter was a single RTN microprocessor instruction.

At a lower level than that, it was pretty neat to come across a description of how an adder works. This is a bit of hardware at the transistor level that delivers the sum of its two digital inputs.

I have a big paperback book called The Best of Byte, a compendium of articles from Byte magazine. I love that book! You pick up all manner of insight from those articles!

In more recent years I got into some metaprogramming at work. This is when your computer program outputs text data that is actually valid program code. There’s reflective metaprogramming, where both your programming and the output code are in the same language, and nonreflective, where they’re different languages. I used it for fluid structure interaction.

The other advice is excellent, too. You should cast a wide net at first and discover which kinds of thing are most interesting or useful for you.

Meta programming? That’s a new one to this old compiler writer.
Back when I was in grad school we ran on the Multics O/S. They taught stuff in Pascal, but only could get it to work, despite having the Jensen/Wirth compiler, when they translated it into PL/1. I finally got the compiler to compile itself, and then used it as the basis of my new language. Would that be metaprogramming?