{"id":17223583,"url":"https://github.com/mlouielu/nand2vm","last_synced_at":"2026-01-25T20:10:56.506Z","repository":{"id":119594698,"uuid":"96097650","full_name":"mlouielu/nand2vm","owner":"mlouielu","description":"nand2vm - pure python implement of nand2tetris Hack platform","archived":false,"fork":false,"pushed_at":"2017-07-04T10:39:52.000Z","size":387,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T09:40:26.629Z","etag":null,"topics":["nand2tetris","operating-system","os","python","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlouielu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-03T10:05:04.000Z","updated_at":"2021-07-19T16:13:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"43296492-73bf-442d-a03b-9e1cab5561db","html_url":"https://github.com/mlouielu/nand2vm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlouielu/nand2vm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlouielu%2Fnand2vm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlouielu%2Fnand2vm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlouielu%2Fnand2vm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlouielu%2Fnand2vm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlouielu","download_url":"https://codeload.github.com/mlouielu/nand2vm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlouielu%2Fnand2vm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28757714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nand2tetris","operating-system","os","python","virtual-machine"],"created_at":"2024-10-15T04:08:41.858Z","updated_at":"2026-01-25T20:10:56.484Z","avatar_url":"https://github.com/mlouielu.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/mlouielu/nand2vm.svg?branch=master)](https://travis-ci.org/mlouielu/nand2vm)\n[![Coverage Status](https://coveralls.io/repos/github/mlouielu/nand2vm/badge.svg?branch=master)](https://coveralls.io/github/mlouielu/nand2vm?branch=master)\n\n![nand2vm logo](https://raw.githubusercontent.com/mlouielu/nand2vm/master/logo/nand2vm.png)\n\nnand2vm - pure Python implement nand2tetris\n-------------------------------------------\n\nThe goal of this project is to create a Python version of nand2tetris,\nnand2vm include the full test suite of nand2tetris, and assembler with python version.\n\nFundamental Elements\n--------------------\n\n### BitArray\n\nBitArray is used when manipulate bit data, using BitArray API,\nwe can quickly create a small endian bit array:\n\n```python\n\u003e\u003e\u003e import nand2vm\n# Init from list using big endian\n\u003e\u003e\u003e b = nand2vm.BitArray([True, True, False, True])\n\u003e\u003e\u003e b\n1101\n\u003e\u003e\u003e b[0]\nTrue\n\u003e\u003e\u003e b[1]    # Internal using small endian\nFalse\n\u003e\u003e\u003e b.data\n[True, False, True, True]\n\n# Init from integer, default using 16 bits\n\u003e\u003e\u003e b = nand2vm.BitArray(-1)\n\u003e\u003e\u003e b        # 16 bits 2's complement\n1111111111111111\n\n# Init from string\n\u003e\u003e\u003e b = nand2vm.BitArray('1101')\n\u003e\u003e\u003e b\n1101\n```\n\n### Nand gate\n\nThe only gate using python operator to construct\n\n```python\n\u003e\u003e\u003e def Nand(a: bool, b: bool) -\u003e bool:\n...     return not (a and b)\n\n\u003e\u003e\u003e nand2vm.Nand(True, True)\nFalse\n\u003e\u003e\u003e nand2vm.Nand(True, False)\nTrue\n\u003e\u003e\u003e\n```\n\nHow To Start\n------------\n\nProject 1 implement:\n\n* gate.not_g.Not\n* gate.and_g.And\n* gate.or_g.Or\n* gate.xor.Xor\n* gate.mux.Mux\n* gate.mux.DMux\n* gate.and_g.Not16\n* gate.and_g.And16\n* gate.or_g.Or16\n* gate.mux.Mux16\n* gate.or_g.Or8Way\n* gate.mux.Mux4Way16\n* gate.mux.Mux8Way16\n* gate.mux.DMux4Way\n* gate.mux.DMux8Way\n\nProject 2 implement:\n\n* gate.adder.ha\n* gate.adder.fa\n* gate.adder.Add16\n* gate.adder.Inc16\n* gate.alu.ALU\n\nProject 3 implement:\n\n* seq.bit.Bit\n* seq.register.Register\n* seq.ram.RAM8\n* seq.ram.RAM64\n* seq.ram.RAM512\n* seq.ram.RAM4K\n* seq.ram.RAM16K\n* seq.pc.PC\n\nProject 6 implement:\n\n* assembler\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlouielu%2Fnand2vm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlouielu%2Fnand2vm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlouielu%2Fnand2vm/lists"}