Adding Things - Nand2Tetris
Wait... Everything is an Addition? It always has been.

Building intuitive and engaging (customer, developer, user, visual) experiences is my Ikigai.
Search for a command to run...
Wait... Everything is an Addition? It always has been.

Building intuitive and engaging (customer, developer, user, visual) experiences is my Ikigai.
No comments yet. Be the first to comment.
In this series, I will publish my notes, understandings and learnings from the Nand2Tetris course available on Coursera. I will also include additional real world tidbits throughout my posts.
The crux of how chips come to life.
sagatu telugodi aavedana
![Scalability, Reliability and Maintainability [Tenglish]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1759079554176%2F86761c98-abd6-4c0a-a763-cb7578149542.png&w=3840&q=75)
Gotta learn the art of references from my prof now

Take some time. 'a' is definitely not the answer.

OCD Intensifies

import { curves } from "bezier-curves";

Some of the quotes and information are part of the Nand2Tetris course available on Coursera.
A decimal can be represented as a sum of powers of 2. In this way,
99 = 64 + 32 + 2 + 1 = 1100011
A word is a unit of data with a fixed number of bits. It tells us, how big of a number a computer can or particularly a processor can evaluate. Now we have 0 or 1 that we can represent using just a single bit. What happens if we want to represent maybe the number 2 or 3? We use 2 bits. So, the length is varying depending on the decimal number. We don't want a computer to guess if 110 is a 12 or if it's a 6. A word defines that length. Now, if we have a 4-bit word, we represent 110 as 0100.
The most fundamental thing in an ALU is the Addition functionality.
We build the basic arithmetic this way:
Addition -> Negation -> Subtraction -> Comparision -> (Multiplication -> Division)
Multiplication and Division are implemented in software rather than in the hardware as they are easy to build that way. Multiplication is built using Addition and Division is built using Subtraction. That's the reason why Multiplication is less expensive than a Division operation. So, why is subtraction more expensive you ask. Good question, cause we subtract using a method like this.
y - x = y + (-x)
Initially, we used something called a sign bit, but it's kinda not elegant.
Usually if you don't have something elegant, it is going to bite you.
So, now we use 2's complement to do this stuff, which is elegant. In 2's complement we represent all numbers as 2^n - x.