Basic Computer Architecture (Beginner’s Crash Course)

Welcome to a beginner’s tutorial on basic computer architecture. In the modern-day cyber world, we have all kinds of computers – Desktops, laptops, tablets, smartphones, and even game consoles. While they are different in size and function, the basic architecture is almost always the same.

All of them have a central processing unit (CPU), random access memory (RAM), and storage (hard disk or memory card). This is called the “computer architecture”, and it pretty much “outlines” how computers are designed. Just what does a basic computer architecture look like? What is the history behind it? Read on!

 

 

TABLE OF CONTENTS

Architecture Models Memory & Bus Useful Bits & Links
The End

 

ARCHITECTURE MODELS

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

 

THE VON NEUMANN MODEL

Source: Wikipedia

John von Neumann is this handsome guy here. A Hungarian-American physicist, mathematician, and pioneer computer scientist. In the year 1945, he came up with a design architecture for computers, which we later call the Von Neumann architecture:

Source Wikipedia

In simple terms:

  • The center “green part” is the computer itself.
    • Every computer should have a central processing unit (CPU) that consists of an arithmetic logic unit (ALU) and a control unit.
    • The ALU is a “big calculator” that crunches data.
    • The control unit manages how programs and applications run. It allocates system resources and does coordination between the system components.
    • Lastly, there is a memory unit to store data and instructions.
  • To feed data and instructions into the computer, we do so via input devices.
  • On processing the data, the computer may show the results or perform some other tasks on the output devices.

 

 

THE HAVARD ARCHITECTURE

Source: Wikipedia

While the original Von Neumann architecture works, it is also a bad design in the modern-day world:

  • There is only a single source of memory, used for both instructions (run applications) and data (read/write).
  • The CPU cannot run instructions and read/write data at the same time.
  • In short, this will grossly slow the computer down. When the CPU is running instructions, it cannot read/write data. When the CPU is reading/writing data, it cannot run instructions.

To solve this problem, smart people later introduced the Harvard architecture, where the memory used for the instructions is separate from the data. I.E. The CPU can run instructions and read/write data simultaneously.

 

WHY ARE THESE IMPORTANT?

Even though these models are “outdated” by today’s standards, the Von Neumann architecture is still the very basis of modern-day computers. It pretty much still holds true today:

  • CPU – All modern CPUs still have arithmetic cores that do data crunching and control units for coordination.
  • Memory – There are many “kinds” of memory today, but the CPU essentially still has its own memory cache. We also have RAM for temporary storage and hard disks for permanent storage.
  • Input devices – Keyboard, mouse, touchscreen, game controllers, microphones, webcam, etc…
  • Output devices – Monitors, speakers, printers, etc…

 

 

MEMORY & BUS

Now that we are done with the basic computer architecture, let us look take a deeper look at the CPU. Into the finer details of the CPU works with the memory, and “bus lines” where data is being transferred around.

 

PRIMARY & SECONDARY MEMORY

Primary Secondary Memory (Source: GeeksforGeeks)

Remember from 1 minute ago that you read something about “different kinds of memory”? Yes, in a modern computer, we have:

  • CPU Register: The “highest level in the memory chain”. This is blazing fast memory within the CPU itself to store immediate instructions; The instructions will perish once it is processed.
  • Cache Memory: Also blazing-fast memory within the CPU. Used to store data, but may not be for immediate processing.
  • Primary Storage:  Data storage that is immediately accessible to the CPU. That is, the hard disks and RAM.
  • Secondary Storage: Data storage that is not directly accessible to the CPU. That is, external storage devices.

 

TYPES OF REGISTERS

Source: tutorialandexample.com

There are several different “types” of registers depending on the design of the CPU, but here are a few common ones.

    • Instruction register: The “current line of code”.
    • Program counter: Keeps track of the currently running application, 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.

 

 

REGISTER OPERATIONS

Just how do the registers work then? What happens behind the scenes is usually a repetitive 3-steps 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.

 

SYSTEM BUS

A “bus” is simply “electrical lines” that connect components together inside a computer. It is not related to the 4-wheeled vehicles we call buses, but originates from the Latin word “omnibus” – “for all”.

 

 

TYPES OF BUSES

Source: Wikipedia

Remember how a bottleneck is formed when instructions and data are all squeezed into a single memory pool? The same will happen if we only have a “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.

 

USEFUL BITS & LINKS

That’s it for the basic architecture of a computer, and here are some links that may be useful to you.

 

LINKS & REFERENCES

 

THE END

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.