<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nand2tetris on Coding braindump</title><link>https://dev-initely.me/nand2tetris/</link><description>Recent content in Nand2tetris on Coding braindump</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 05 Feb 2022 23:58:00 +0700</lastBuildDate><atom:link href="https://dev-initely.me/nand2tetris/index.xml" rel="self" type="application/rss+xml"/><item><title>Week 4 - Machine Language</title><link>https://dev-initely.me/nand2tetris/nand2tetris_project4/</link><pubDate>Sat, 05 Feb 2022 23:58:00 +0700</pubDate><guid>https://dev-initely.me/nand2tetris/nand2tetris_project4/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;Machine language or instruction set is a critically important aspect of building a computer system. This can in fact be done beofre building a computer by simulating this in java code for example and see what it needs to do.&#10;Three basic elements that machine language need to be able to do are:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;How to specify the instructions, exact instructions/operations&lt;/li&gt;&#10;&lt;li&gt;What specific instructions to perform via the program counter for example&lt;/li&gt;&#10;&lt;li&gt;Where to find inputs to instructions and where to put the outputs, i.e. addressing&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;We will look at this in more detail in the next section. Obviously machine language is really handy for the ALU and the computer itself, but really terrible for humans. So a programmer will almost never program in machine langauge, but a high level prrogramming language. A compiler will then translate the high-level code into machine language. In some cases, people will need to interact directly with machine language, e.g. highly optimized code.&#10;In this course we will need to think about machine language. Howevver, reading sequences of bits is terrible, so we will use Mnemonics, e.g. ADD for 0100010 and R3 for 0011, R2 for 0010 etc. There are 2 ways of thinking about this: that Mnemonics only exist in our interpretation or ii) that we could allow a machine language programmer to write code in this so-called assembly language. In this course we will need to look at the second interpretation, because in week 6 we will actually build an assembler.&lt;/p&gt;</description></item></channel></rss>