Coder Social home page Coder Social logo

arasgungore / nandgame Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 4.97 MB

Solutions for The Nand Game, a game that teaches the fundamentals of computing by building a computer from scratch.

Home Page: https://nandgame.com

License: MIT License

arithmetic-logic-unit computer control-unit digital-design logic-gates logic-programming logic-unit memory nandgame processor switching hardware binary-logic fundamentals-of-computing solutions arithmetic-circuits nand-game random-access-memory logic-circuit thenandgame-solutions

nandgame's Introduction

NandGame

Solutions for The Nand Game, a game that teaches the fundamentals of computing by building a computer from scratch. Each level is accompanied by images of the logic gates used to build the components.

Table of Contents

Levels

Logic Gates

NAND Gate

2 components used. This is the simplest possible solution!

Invert

1 component used. 1 NAND gate in total. This is optimal!

AND Gate

2 components used. 2 NAND gates in total. This is optimal!

OR Gate

3 components used. 3 NAND gates in total. This is optimal!

XOR Gate

4 components used. 4 NAND gates in total. This is optimal!

Arithmetic

Half Adder

5 components used. 5 NAND gates in total. This is optimal!

Full Adder

9 components used. 9 NAND gates in total. This is optimal!

Multi-bit Adder

2 components used. 18 NAND gates in total. This is optimal!

Increment

2 components used. (Not counting 0 which does not contain any logic.) 145 NAND gates in total. This is the simplest possible solution!

Subtraction

3 components used. (Not counting 0 which does not contain any logic.) 161 NAND gates in total. This is the simplest possible solution!

Equal to Zero

4 components used. 10 NAND gates in total. This is optimal!

Less than Zero

0 components used. (Not counting splitter which does not contain any logic.) 0 NAND gates in total. This is the simplest possible solution!

Switching

Selector

4 components used. 4 NAND gates in total. This is optimal!

Switch

4 components used. 4 NAND gates in total. This is optimal!

Arithmetic Logic Unit

Logic Unit

7 components used. 352 NAND gates in total. This is the simplest possible solution!

Arithmetic Unit

5 components used. (Not counting 0 which does not contain any logic.) 434 NAND gates in total. This is the simplest possible solution!

ALU

6 components used. (Not counting 0 which does not contain any logic.) 1042 NAND gates in total. This is the simplest possible solution!

Condition

8 components used. (Not counting is neg which does not contain any logic.) 56 NAND gates in total. This is optimal!

Memory

Latch

1 component used. 4 NAND gates in total. This is optimal!

Data Flip-Flop

5 components used. 13 NAND gates in total. This uses the fewest possible components. (But it is possible to solve with a lower total of NAND gates.)

Register

2 components used. 26 NAND gates in total. This is the simplest possible solution!

Counter

4 components used. (Not counting 0 which does not contain any logic.) 418 NAND gates in total. This is the simplest possible solution!

RAM

4 components used. 484 NAND gates in total. This is the simplest possible solution!

Processor

Combined Memory

3 components used. 416 NAND gates in total. And 123904 for each kilobyte of RAM. This is the simplest possible solution!

Instruction

3 components used. (Not counting splitter which does not contain any logic.) 1162 NAND gates in total.

Control Unit

10 components used. (Not counting splitter and 0 which does not contain any logic.) 1297 NAND gates in total.

Computer

4 components used. (Not counting clock which does not contain any logic.) 2131 NAND gates in total. And 123904 for each kilobyte of RAM. (ROM storage not counted) This is the simplest possible solution!

Input and Output

3 components used. (Not counting lamp and button and bundler and splitter which does not contain any logic.) 6 NAND gates in total.

Author

👤 Aras Güngöre

nandgame's People

Contributors

arasgungore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.