Developing with @regmicmahesh

Developing with @regmicmahesh

Journey of nand2tetris — building own computer from principal gates

Journey of nand2tetris — building own computer from principal gates

Subscribe to my newsletter and never miss my upcoming articles

Hey everyone. It’s been few weeks I’ve dig in into this book. So, this book covers how a modern computer is built using just logical gates. Let me talk about the book structure first. So basically, you build a simple logic gates in first and in the next one take the logic gate you built as granted and develop ALU out of them, in the next chapter you add memory or sequential logic to your computer and so on you keep abstracting the learnt stuff and only worry about the usage not the implementation in the upcoming chapter.

You may be thinking how’s this possible to do at home (just like me). Well, these authors have done pretty good job for learners as they provide all sort of simulation tools and techniques so you can run and simulate every gates and logics from your computer. And they put projects on every chapter so you take away some knowledge by hands-on practice.

We are provided with a HDL ( Hardware Description Language ) which is very simple language which lets you write the specifications and implementation of sophisticated chips and simulate them and that’s what modern engineers on this field do, it looks like this…

Chip Something{

 IN a,b;
OUT out;

PARTS:
Xor(a=a,b=b,out=out1);
...
...
And(a=out1,b=out1,out=out);

}

This is how they laid it out, c<int> being a chapter level.

So talking about what I did so far, I have been following the book and also following a video course or lectures on Coursera made by the authors of the book which basically explains the stuffs if you’re a hardcore visual learner kinda like me. [ all links in bottom ]

So far I’ve completed all elementary gates using universal NAND Gate. Then, I made de multiplexer and negator which is quite complex as I had to frequent jump into my digital logic book to understand. Also, k-map was a plus point for me to generate boolean function quick to implement using gates.

Then joining on, I got into building half adder, full adder and also virtually implementing a subtractor which is basically addition but in 2’s form.

Then what I was able to build is a full ALU which is capable of taking instruction and processing out. I never thought it would be that clear although it is very basic one.

So, if anyone interested I put my ALU’s instruction set.

I decided not to upload any codes as interested learners may find it as spoilers. I’ve put the links below if you are interested.

 
Share this