Skip to content

Open-Machine/README

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Machine - The open-source computer

The goal is to to design and build a computer from scratch.

Stars Badge commits License Badge

open-machine


Objective

To understand how a computer works behind the curtains and do some things my way along the way.

🔖 Table of Contents


💡 The Idea

The idea came from an article I wrote about some tips for developers:

And a message for those (myself included) that still want to build apps entirely from scratch because "That's the only way it will feel my doing only":

There's nothing wrong with building it from scratch. On the contrary, you can learn so much more when doing so. However, don't fool yourself into thinking that you built it entirely yourself. No program is created by just one person. If you want to achieve this, go ahead and start picking up some stones to build your computer first, then you can create your programming language and only then, your program.

I was obviously not encouraging people in any way to do that, but a few weeks later I asked myself: "What if I do just that? Could I actually do it?".

[ ⚠️ Disclaimer: Of course, I am doing some research and using knowledge developed by many people over many years of study. So I'm still not building it entirely on my own. In fact, I don't think that's even an option anymore since everybody has some knowledge about computers today. ]

Anyway, with that out of the way, this is when everything started: a small doubt in my head was fuel enough to face the challenge.


💻 A few words about the history of computers

Developers usually have a good understanding of how a computer works. However, for me at least understanding a computer so deeply that you would be able to actually build one yourself seemed like an impossible task. So, in this section I want to break to you the most important pieces of the computer puzzle that you need to know in order to build your own computer from scratch using only circuits.

Circuits

At the beginning of programming, the cientists created machines that were able to perform repetitive computational tasks. The tasks were defined by big switches that were embedded in the computer. At that time, cientists create protocols that would define what computational task would be performed by each combination of switches. These protocols and switches are very similar to what we call machine code, which is binary code that are inside the computer and that the computer recognizes and runs it for computational purposes.

Click here to know more about how the circuits work.

At that time, computer programmers were mostly women! It's sad that nowadays the huge majority of programmers are men.

Code

Since the machine only understands bits of information and it would be very hard to actually memorise all these numbers, programmers created computer languages that could be translated to the bits that a machine can actually understand which is called Machine Code.

Assembly

At first each instruction in the programming language had an equivalent instruction in machine code and vice-versa. This type of language is called assembly.

Click here to know more about programming in assembly.

High-Level Languages

After some time, it became clear that those languages were not very productive to write, because you had to write so many lines of code to do simple things. That's when they created high-end languages: programming languages that had instructions that didn't have an equivalent machine code instruction. Instead, each instruction on the high-end language could mean several instructions in the machine code. These languages had to be translated to the machine code. Since this translation process is much more complex, it's called compiling.


⌨️ Code Examples

You can find examples of code in the Examples folder.

Examples List


📄 Contributing Guidelines

Check out the contributing guidelines here.

About

Explanation, setup and example for the Open Machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published