August 12, 2021

Building a computer is easy

 

On the first look the task of building a computer from electronics components is a demanding task. the problem is, that a relais has to be used as the main memory an other components are used to create the logic unit. It will takes many hours until the system is running. But, in compaarison with the task which is required after the computer was built, the hardware task is the easier one.
To make the situation easier to understand let us assume not a physical computer is created but only a virtual machine which can execute a program. The simplest possible machine is a brainfuck interpreter. It is a basically a computer but realized as a software program. Similar to building a computer, on the first look the task o creating such a machine seems to be very complicted. The interpreter has to fetch the next instruction, it has to analyze if the word is known and then the processing step follows.
But a short look into existing brainfuck compilers and interpreter will show that the task can be realized by a single person within a small amount of time. It is possisble to create such a machine and fix all the bugs.
The paradox situation is, that after the interpreter is ready the more complicated tasks wasn't adressed yet. An interpreter which is able to execute a program is useless if no software is available. That means somebody has to write the code which is executed on the machine. This task is the more challenging one. The amount of possible software is endless, in contrast there only a few possible ideas how to create a virtual machine. The chance is high that the principle is the same for a physical machine. That means, there are only 8bit computers, 16bit and some other types. In general the layout is the same, and if someone creates a computer from scratch he will come to the same design like in previous attempts. But suppose someone has built a homebrew cpu and all the parts are working great. What can this machine do? n case of doubt the only thing what the machine will do is to run a calcuator program or can figure out the prime numbers from 0 to 100. Everything else needs to be created first in software.
Sometimes it was mentioned that assembly programming is an easy task. From a hardware perspective, this is correct. In contrast to plug in cables manual assembly instructions are an elegant way to program a computer. But the same language will become hard and even unusable if the idea is to create a certain application for example a computer game or a text processing software. That means, the computer is no longer used as a simple machine which runs a program but the idea is to program a useful application for the machine. In such a case a low level hardware oriented language will become a bottleneck.