Auke Klazema

[0001] What is a computer?

A computer is a device that can be instructed to either store, retrieve or process data. This device could be mechanical, but I will be talking about the electronic kind. A computer usally consists of a CPU, short term memory, long term memory, and input and output devices.

A CPU stands for Central Processing Unit. It will fetch instructions and perform those instructions. Some of the instructions will have values that need to be stored. The CPU can store a few values in its own fast memory. The fast memory has dedicated sections and they are called registers. Some CPU architectures have many registers and others have only a few. Most instructions use the values in the registers to perform some tasks. Many tasks are very simple, like adding two values, but some CPU architectures can perform complex tasks with a single instruction.

If the CPU would perform only tasks on its own memory it would add litle to no benifit to the user. Its when it interacts with devices outside of itself that it performs usefull tasks. One of these external devices is the short and long term memory. Together they can hold programs and data and the output can be stored for later use. The short term memory generally has faster read and write actions. Most times programs get loaded out of the long term memory into the short term memory. This allows programs to run faster. The amount of short term memory is usually also smaller than the long term memory. One reason is that faster memory tends to be more expensive.

Some computers run only one program. This computer is dedicated to one task. Other computers were designed to run multiple programs. In order to manage these multiple programs another program is needed. This program is called a kernel. Together with other specialized programs it forms the Operating System as called the OS. An OS is needed because normally only one program can be run on a CPU. The kernel is called periodically to have it select which program it needs to run next. By switching out program often the illusion of multiple programs running is created.

The activity of creating a program is called programming. It is also called Software Development or Software Engineering. Programs can be directly created in the instructions that the CPU accepts. The CPU instructions are are so called opcodes and all the available opcodes together are called the machine language or machine code. Working with machine code is difficult to read and write by programmers. This is because the language deals with really low level abstractions and it has to be encoded in only numbers.

To make the machine code more readable the assembly language was created. Every CPU has its own assembly language and it encodes the machine codes into mnemonics. Even though its more readable its still really low level. In order to perform the simpelest tasks on the CPU many instructions are needed. To allow for more abstract way of writing programs more high level languages were created. Some examples are Algol, LISP, C, Python, Javascript.

So in the end the computer is nothing more than a very expensive calculator that can be extended with other devices. And it is up to us to turn the numbers coming out of it into useful things. The numbers could mean letters in a text documents or colors used in a game.

Attribution

Charles Babbage [1] and is regarded as the first person to have created a programmable computer. His design was a mechanical machine.

Alan Turing [2] came up with a simple design for the modern computer. He called it the Universal Computing machine but is better know as the universal Turing machine [3].

John von Neumann [4] proposed an architecture used by many modern computers. Its know as the Von Neumann architecture [5]. Its a simpler design than the Harvard architecture [6]. The main difference between the two is if data and code resides in the same memory. Many modern architectures use a limited version of the Harvard architecture that on the surface works looks like a Von Neuwmann. This architecture is called a moddified Harvard architecture [7].

Further reading

Wikipedia has a nice article on the Computer [8].

References

[1] Wikipedia article on Charles Babbage

[2] Wikipedia article on Alan Turing

[3] Wikipedia article on the Universal Turing machine

[4] Wikipedia article on John von Neuwmann

[5] Wikipedia article on Von Neuwmann architecture

[6] Wikipedia article on Harvard architecture

[7] Wikipedia article on Modified Harvard architecture

[8] Wikipedia article on the Computer