Computers in simple terms

What do all those acronyms actually DO?

The mark of a good engineer is the ability to explain complex things in simple terms.

Many people are interested in how their computer works but whenever they ask, they’re overwhelmed with technical jargon and acronym soup. Too much and the brain shuts down and stops paying attention.

This is more or less a copy/paste job of a conversation I recently had with a friend.

Disclaimer: many things here are deliberately simplified or possibly even not 100% correct for the purposes of comprehension.

*cracks knuckles* ALLOW ME TO MANSPLAIN…

Basic stuffs that will become clearer (maybe) in The Future:

Processor (CPU): Basically does a shitload of really complex maths (by breaking it down into a fuckload of smaller, simpler maths) very very fast. Like, millions of maths per second.

Motherboard: What it says on the tin. Mothers all the components and makes sure they can talk to each other and not fight (too much). The last thing about fighting is actually fairly close to the truth.

Memory (RAM): Stores information & shit. Very fast.

Hard drive (Disk): Also stores information & shit. Not very fast at all (relatively).

Graphics card (GPU): Helps with drawing complex graphics — think video games running at a high resolution or 3D graphics.

Motherboards

The thing I was saying about the Motherboard being a “mother board” is reasonably accurate.

It handles hardware-level communication between stuff that wants to talk to other stuff, like the CPU wanting to talk to memory or graphics cards wanting access to RAM or disks.

It uses a series of “Buses” (yes it’s the actual term) to do this.

A bus is just a pipe for information to flow down and stuff picks it up and does things with it.

To make sure that a device doesn’t go off the fucking reservation and drown out everyone else with its yammering it uses a series of “Interrupts” to regulate data flow. Other things can also use interrupts.

Sometimes a device WILL go bad and for whatever reason start to spam whatever hardware bus it’s connected to, leading to weird stuff happening. Usually it’s noticed pretty quick and shut down by the motherboard.

Or not and everything goes horribly weird and stops working.

The motherboard “mothers” other components, slaps down ones that are throwing a screaming tantrum and makes things play nice together.

CPU:

Basically a CPU (Central Processing Unit) a collection (about several billions) of transistors (fancy switches that open and close when you apply a current to them to let MORE current through).

You can arrange these to do rudimentary (and later on, very complex) logical operations.

These are done on “bits” — the smallest unit of information in a computer:

1 or 0. On or Off.

There’s lots more but basically the CPU is a giant, superfast (by human standards) arithmetic and logic engine that can do a whole load of complicated maths very very fast.

Here’s where it gets interesting.

The CPU can’t hold much of the information it’s working on inside itself. It has basically no memory of its own. It only concerns itself with stuff it needs to do in the next couple microseconds, if that.

This is where RAM (Random Access Memory) comes in.

Think of a paper-based desk. 
You’re the CPU. 
The open file (literal envelope file) in front of you is the stuff you’re dealing with.

The single sheet you’re looking at and scribbling on is what you’re working with right this second.

Stuff you’re probably going to need soon — stuff from inside the same file, let’s say — is what RAM is used for. The shit you need SOON but not RIGHT NOW.

The stuff you think you might need but aren’t necessarily in a huge rush about is stored down in Archives. That’s your hard disk.

The time difference between flicking to a page in the same folder that’s in front of you and mooching down to Archives and asking the people down there to fetch your file is about accurate in terms of orders of magnitude.

RAM responds to requests for bits of data in nanoseconds (millionths of a second).

Disks will respond in milliseconds (thousandths of a second — six orders of magnitude slower).

Where this analogy breaks down a bit is to do with the nature of RAM. It requires power to store those ones and zeroes. As soon as the lights go out, everything disappears forever or, worse still, gets horribly mangled by QUANTUM PHYSICS.

In any event, the outcome is the same. No data.

RAM is where your CPU and other things store information they’re likely to want to interact with in the very near future.

Operating Systems & programs

Your OS — Windows, Linux, Mac, etc — (simplifying MASSIVELY here) decides, with some intelligence, what to load into RAM when.

Sometimes it does this itself but mostly it’s in response to other programs going “Hey I’d really like this stuff to be available to me quick-like because I’m working on it”.

It also handles the memory allocation (size of desk, if you will) for programs (processes).

Poorly-designed programs will tend to “leak” memory — keep on asking for more without reusing what they don’t need anymore (which is fucking stupid and bad on a whole load of levels)

Page files

When you run low on memory, your OS doesn’t freak out (usually) and grind to a halt because nothing else can start or work.

It has a thing called a “Page File” or “Swap File”.

The pagefile is a virtual “file” that gets created on your hard drive (the slow-ass storage) by the OS to use as “Pretend RAM”.

That’s okay for short bursts while the OS gets shit back under control and frees up Actual RAM but if it finds it has to make programs put their shit in the page file then Bad Things happen.

It’s like the office manager saying to you “You can have as much as you can hold in one hand. Any more info and you’ll have to ask the filing clerks to get it for you”

That’s why your computer will suddenly go from running smoothly to hitting a wall of suck until you close some of the 200 Google Chrome tabs and free up RAM.

Graphics Cards

And other miscellaneous devices

Every discrete bit of hardware also has its own processor made to be horribly efficient at performing the sort of calculations associated with its job and ranging from mediocre to appalling at doing stuff it’s not meant to do.

They also have some amount of RAM of their own for reasons which will become clear.

Finally, they have some sort of interface they use to talk to other bits of the system. Usually this is the PCI Bus (an Interconnect for Peripheral Components).

The bandwidth — the size and speed of the pipe — of the bus the graphics card is connected to, for instance, is less than that of its own memory. This is why graphics cards, network cards, sound cards, etc have their own onboard RAM.

The onboard memory is faster for the card’s processor to access, sometimes because it is faster than your system RAM and often because it’s closer. The system RAM is farther away, both physically and it’s also shared among other things needing to use it so the time taken to do stuff in system memory is far higher than using your own.

It’s like having your own chopping board in a kitchen rather than having to walk around the stove to use one that’s shared.

Once it’s done with whatever magic it needs to do, it can shove the RESULTS on the “talking to the rest of the world” bus.

This is like the difference between someone asking you to multiply something and then you having to tell them every step of the calculation out loud rather than just the results.

That’s why “onboard” graphics cards are mediocre at best, although they’re constantly getting better and better.

It’s not that your main processor is *slow* — it’s anything but; it’s more that it’s just not very good at doing the sorts of maths that graphics processors do efficiently and quickly. It’ll get there, but it’ll take longer.

The technical term is that they are optimised for the specific task they’re doing.

That and it has all the OTHER stuff to deal with, so it has to split its attention between doing WEIRD MATHS and lots of NORMAL MATHS at the same fucking time.

Graphics cards are also built to be able to do the weird maths in parallel.

Putting it all together

Assembling a computer is very much like assembling IKEA flatpack furniture. Bits that fit in a specifically-shaped slot will, as a rule, work together.

To make them work even better, the manufacturers often release drivers, which are just a set of instructions that tell the OS how best to use that piece of hardware. When it doesn’t have these, the OS will try to make the hardware work with generic instructions — graphics cards can be reasonably assumed to do things like compute graphics, network cards send and receive network traffic, etc.

Drivers help the OS make full use of the features the particular bit of hardware has.

In conclusion

I hope this has cleared up some things about how bits of computers work.

If you like this, please share/recommend it!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.