Programing Introduction

How computers work

Let's just focus on the CPU and RAM first. Because it is most relevant to our programming tasks.

RAM (Random Access Memory) is a kind of memory the computer use for storing what is currently going on. Just like your short term memory when you do your current tasks, RAM gets erased and things will be forgotten when the computer power off.

The CPU is the "brain" of the computer. It is the part that makes the computer "think", precisely it allows the computer do logical operations.
It reads a list of things to do called "programs" and does those things in the lists in order. From top to bottom.

What a program is

As I previously mentioned, a "program" is like a list of things to do. Basically, it is a list of instructions that tells the CPU what to do.
It can be reading something from the RAM, changing something stored on it, or do some logical reasoning.

A simple program may look like this:

if a=2 then
	ShowMessageBox "a is now 2!!"

On the first like, it sets "a" to 1.
On the second line, "a" will become 2, because it sets "a" equal to "a" plus 1.
On the third line, it does some logical stuff. Obviously, it checks if "a" equals 2, if it does, a message box is shown with the message "a is now 2!!".

When the program runs, a message box will be shown with the message. Of course, the "a" calculation stuff and its logical reasoning won't be shown, only the message box will be visible to the user.


To conclude, I've mentioned CPU, RAM and what a program is. If you can remember what those are and able to understand what the simple program example does, you should have no problem in my following tutorials!

If you have any comments, feel free to email me.

Written by fish