Basic Computer Architecture – A Beginner’s Crash Course

INTRODUCTION

WHAT IS COMPUTER ARCHITECTURE?

Welcome to a beginner’s tutorial on the basic computer architecture. When it comes to the world of computers, we have desktops, laptops, tablets, smartphones, and so many different kinds of gadgets. But they all share a few common traits – All of them have a central processing unit (CPU), random access memory (RAM), and a storage component (hard disk or memory card).

That is computer architecture at work here, and it is pretty much the “outlines” behind how computers should be designed, how they should work. Just how does a basic computer architecture look like? What is the history behind it? Read on to find out!

 

 

 

SECTION A

VON NEUMANN MODEL

When it comes to computer architecture, this is one of the very first things that every cyber-educated geek has to know – The Von Neumann Model or the Princeton architecture.

 

WHAT IS THE VON NEUMANN MODEL?

John von Neumann is this handsome guy here, a Hungarian-American physicist, mathematician, and pioneer computer scientist.

Source: Wikipedia

In the year 1945, he came up a design architecture for digital computers, which we later call the Von Neumann architecture:

Source Wikipedia

In a nutshell, this model has a couple of components:

  • A central processing unit, containing an arithmetic logic unit (ALU) and control unit.
    • The ALU is basically like an advanced calculator that can do all sorts of Math yoga, crunch data.
    • The control unit acts like a middle-man that controls how a program runs, and coordinates between the components.
  • Memory to store data and instructions.
  • Input and output devices.

 

WHY IS THIS SO IMPORTANT?

Even though computer architecture has evolved a lot over the years, the Von Neumann architecture is still the ancestor and the very basis of what our modern-day computers are built upon. If you look closely, this model still pretty much holds true today:

  • CPU – Has a control unit and ALU that does all the data crunching.
  • Memory – The CPU cache, RAM, hard disks.
  • Input devices – Keyboard, mouse, touchscreen, game controllers.
  • Output devices – Monitor, speakers.

 

A MODERN EXAMPLE

In the context of a smart home today, an example of how this model applies could be:

  • A program that controls the home lighting is loaded into the memory.
  • The control unit then fetches the light levels from a light sensor (input device).
  • ALU crunches the data, compares and determines if the current light levels are too low.
  • If the room is too dark, the control unit will automatically switch on the lights in the room (output device).

 

 

SECTION B

REGISTERS & MEMORY

Now that we are done with the basics, let us look take a deeper look into the CPU – On the finer details of processing and memory.

 

THE HAVARD ARCHITECTURE

Source: Wikipedia

In the original Von Neumann architecture, there is only one “source” of memory – Which in the modern day world, is a very bad design. Why is that so? That is because running programs will have to fight for the limited resource:

  • The program itself is loaded into the memory.
  • Control unit has to read the program and create temporary variables to keep track of the execution progress.
  • The ALU also needs to use the memory for calculations as well.
  • This causes a massive “traffic jam”. With the control unit having to read the program/instructions, and the ALU has to wait for the reading to complete before being able to use the memory for calculations.

To solve this problem, smart monkeys later introduced the Harvard architecture, where memory used for the program/instructions are separate from the data memory.

 

REGISTERS & CACHES

While the Harvard architecture is a good idea, but it does not guarantee that a “traffic jam” will not occur. So in the course of time, a lot more gimmicks were introduced.

  • Register: This is a temporary storage area in the CPU, and you can kind of call it the “highest level in the memory chain”. Registers are the immediate area where the CPU uses to execute instructions and will perish once done. There are several different registers depending on the design, but here are a few common ones.
    • Instruction register: The “current line of code”.
    • Program counter: Keeps track of the currently running program, which are the current and next instructions to execute.
    • Accumulator register: Used by the ALU for calculations.
    • I/O register: Used for working with various input/output devices.
    • Data register: Used as temporary storage for data acquired from input devices, or data to be transmitted to output devices.
  • Cache: Also a part of the temporary storage in the CPU. Remember the traffic jam situation? That is usually caused by a slower memory component, and thus, the cache is a necessary buffer to store parts of data and instructions – Ensuring a smooth uninterrupted flow.
  • Primary/main memory: Or what we call random access memory (RAM). Let’s just say that applications these days have become so resource hungry that the tiny register/cache in the CPU is simply not enough… For that, we need these “extra” memory modules.
  • Secondary memory/storage: Refers to your hard disks, flash drives, memory cards, and other permanent data storage devices.

 

REGISTER OPERATIONS

Just how do the registers work? What happens behind the scenes is usually a 3-steps repetitive operation:

  • Fetch: Load the instructions from either the main memory or directly from the user through the input device.
  • Decode: Interpret what the instructions mean.
  • Execute: Run the instructions, usually producing some sort of results – Which is then displayed on the screen or output to a device.

 

 

SECTION C

SYSTEM BUS

Finally, in this last section of the guide, we will explore how data is being transferred around in a computer – On data lines we call the bus.

 

WHAT BUS?

It is kind of confusing, but yes, those “electrical lines” the connect components together in a computer are called “bus”. It is not quite related to the 4-wheeled vehicles we call buses on the roads, but it shares the same origin from the Latin word “omnibus” – or “for all”.

 

TYPES OF BUSES – NOT A SINGLE LINE

Source: Wikipedia

Remember how a bottleneck will be formed when instructions and data are all squeezed onto a single memory device? The same will happen if we only have “one lane bus” – This is why in most basic designs, the system bus is split into 3 different parts:

  • Control bus: Carries the commands from the CPU.
  • Address bus: Carries information on the target component the instructions are meant for.
  • Data bus: Carries the actual data itself.

 

 

SECTION D

SUMMARY & LINKS

That’s it for the basic architecture of a computer, and here is a summary of everything plus links that may be useful to you.

 

IN A NUTSHELL

The basic components of a computer consist of:

  • Processor: The heart of the computer that does most of the data processing.
    • ALU: Does the numbers and data crunching.
    • Control Unit: The traffic controller and coordinator.
  • Memory: The storage areas of the computer.
    • Registers: The immediate area where the CPU use to execute instructions.
    • Cache: A high-speed memory area used to hold the immediate data.
    • Primary memory: The RAM.
    • Secondary memory: The permanent storage devices.
  • Bus: Electrical lines that connect the components, used to send/receive data.
    • Control Bus: Carries control command signals from the CPU.
    • Address Bus: Carries identification data, of which component the CPU is communicating with.
    • Data Bus: Carries the actual data itself.
  • Input and output (I/O) devices: Should be straightforward – Keyboard, mouse, printer, monitor, speaker, etc…

 

 

LINKS & REFERENCES

 

CLOSING

WHAT’S NEXT?

Thank you for reading, and we have come to the end of this guide. I hope that this has helped you to better understand the basic architecture of computers, and if you have anything to share with this guide, please feel free to comment below. Good luck and may the digital force be with you.

Leave a Comment

Your email address will not be published.