Skip to content

Latest commit

 

History

History
22 lines (22 loc) · 670 Bytes

README.md

File metadata and controls

22 lines (22 loc) · 670 Bytes

nand2tetris

About

Optimizations

I focused on the optimization when I implement projects.

[Project 4] Machine Language

[Project 7] VM I: Stack Arithmetic

Arithmetic commands

command # of instructions assembly
add 5 instructions
sub 5 instructions
neg 3 instructions
eq 8 instructions if x = y
11 instructions otherwise
gt 10 instructions if x > y
12 instructions otherwise
lt 10 instructions if x < y
12 instructions otherwise
and 5 instructions
or 5
not 3

Memory Access commands