Computers and Data Processing

Let's have a brief look at how computers work, and how they process data electronically. This will make it easier to see the possibilites with data—and how to seize those opportunities.

Hardware: Processors and Memory

We mentioned earlier that a computer's hardware is roughly divided into processor and memory. In addition, input and output devices are relevant when it comes to data. Let's look at these in turn.

Processors

A processor is a unit that processes or handles data, following instructions from a program. (Note that we are using processing in a more general sense here than when we previously talked about the data lifecycle). The instructions are retrieved from the memory. A processor can only process bits.

Memory

When it comes to memory, we distinguish between two types:
  • Primary memory: Also known as internal memory and working memory. This holds the data when it is being processed. We typically speak about RAM as primary memory. RAM is short for Random Access Memory. RAM is emptied when the computer is turned off completely.
  • Secondary memory: Stores data after processing, for example on a Solid State Drive (SSD) or a Hard Disk Drive (HDD). These can still retain the data when you power off the computer.

Input and Output Devices

An input device is a device that can receive, capture or register data. This can, for example, be a sensor, a sound card or, as mentioned, a keyboard.
An output device is a device that can present information to a user, for example a monitor, a printer or a sound card. As we see here, some things, like a sound card, can be both an input device and an output device.

Software: Algorithms, Programs and Programming

Computers cannot interpret nuances or read between the lines, or do anything at all on their own initiative. Without precise and specific instructions, they cannot do anything at all. The computer does exactly what it is told—neither more nor less.
Thus, we, who give these instructions, have to be completely precise in our descriptions.

Algorithms

Such instructions are called algorithms. As you've already learned earlier in the course, it's through algorithms that we tell the machine how to solve a given task. The algorithm is really a step-by-step recipe that tells the machine what to do.
Everything a machine does is built up of a series of these logical instructions. When you press a key on the keyboard, an algorithm tells the machine to create a letter in your text document. When you enter a search in Google, algorithms are run to fetch relevant results.
A set of algorithms that a computer can use to perform specific functions and tasks, is called a program. Writing code to create these programs is called programming.

Programming

The history of programming is older than computers. Already at the turn of the 1800s, for example, there were automatic weaving machines, which were programmed using so-called “punched cards”.
These cards are exactly what they sound like: Cards—made of cardboard or similar—with lots of holes punched through them. The binary numeral system is used: Whether there is a hole or not at a specific position determines whether the position is read as 0 or 1, and thus which instruction is given. Punched cards were also used in the first digital computers.
Today, we thankfully have far more effective ways of programming than punching out physical holes with instructions in binary—even though the instructions still ultimately boil down to 0 and 1.

Programming Languages

Machine code is not particularly intuitive for humans when we need to give complex instructions. Therefore, we usually utilise various programming languages (that are more readily understandable to humans) which are then automatically translated into machine code.
  • Low-level programming languages are closer to the machine code language, i.e., 0 and 1
  • High-level programming languages are more abstract, i.e. further removed from the underlying binary, thus being more intuitive for humans .
Although the languages are different, they ultimately follow the same logical principles, and are all translated into machine code when processed by the computer.
Some well-known examples of programming languages are Python, Java, C, C++, and JavaScript.
The reason we need more than one such language is primarily because they are designed to accomplish different things. Some languages are like multi-tools that can be used for almost anything, while others are like specialised tools that are perfect for very specific tasks.
The language you choose to work with depends on the task you are going to do, but what is important to know is that all programming languages have some logical basic principles in common. If you learn one language, it’s easier to learn another.

Programming Languages—and other computer languages

There are many different programming languages, with cryptic names like Python, Java, C, C++, JavaScript, C#, SQL, and R.
Also, there are other types of computer languages, which have a more limited usage compared to programming languages. For example, markup languages like HTML and query languages like SQL.
Some computer languages are suitable for a range of tasks (everything from creating apps to data analysis), while others have specific uses such as working with databases or creating websites.
You can read a bit more about some selected languages in the boxes below.

Fun fact

Object-oriented programming—a Norwegian invention!

Java—which you encountered above—is an example of a so-called object-oriented programming language. Even if you have not heard this term before, it is nevertheless something you encounter everywhere in the apps and programs you use every day.
This actually originated here in Norway with the programming language Simula, which was invented at the University of Oslo, the Norwegian Computing Center, and SINTEF in the 1960s. Simula introduced concepts like classes and objects in programming, which are central to modern programming languages like Java and C++.
We're about to take a closer look at coding and programming. But first, let's get even more familiar with digital data.