Download presentation
Presentation is loading. Please wait.
Published byAlison Mosley Modified over 9 years ago
1
The Elements of Computing Systems (From NAND to Tetris) Building a Modern Computer from First Principles
2
Authors Professor Shimon Schocken Information Technologies and Dean of the Efi Arazi School of Computer Science, Interdisciplinary Center Herzliya Professor Noam Nisan Institute of Computer Science and Engineering, Hebrew University of Jerusalem
3
introduction students start with the primitive NAND gate, and using a hardware simulator and HDL, they build basic gates, using which they build an ALU (Arithmatical Logic Unit), going on to building an actual computer (in simulation). Then they create an assembly language for this computer, followed by a high level language, an operating system, and finally a game using the language they created, on the machine they created.
4
characters Designed to support one- or two-semester courses each chapter presents a key hardware or software abstraction the only pre-requisite being a programming experience http://www.diycomputerscience.com/cours es/course/the-elements-of-computing- systems
5
contents Designing elementary logic gates from a NAND gate using Hardware Description Language Building an ALU (Arithmatic Logic Unit) Designing Registers, RAM, etc Designing an assembly language Building the entire computer (in simulation) with the ALU, Registers, RAM, and the assembly language Building an Assembler for the assembly language we created Building a Virtual Machine (similar to the JVM - though much smaller in scope) Introducing a high level, object oriented programming language Writing a compiler for the high level language Writing an Operating System for our computer, using the high level language we created Some more fun (discussing improvements, and future directions)
6
1.Designing elementary logic gates from a NAND gate using Hardware Description Language Resources The hardware simulator HDL Activities
7
Activities Download and install the TECS Hardware Simulator TECS - Build a NOT gate(NAND ) TECS - Build an AND gate(NAND) TECS - Build an OR gate(NAND) TECS - Build an XOR gate(NAND, AND, OR) TECS - Build a MUX(NAND, AND, OR, XOR) TECS - Build a DMUX(NAND, AND, OR, XOR, MUX) TECS - Build a 16 bit NOT(NAND, AND, OR, XOR, MUX, DMUX) TECS - Build a 16 bit AND (NAND, AND, OR, XOR, MUX, DMUX) TECS - Build a 16 bit OR (NAND, AND, OR, XOR, MUX, DMUX) TECS - Build a 16 bit MUX (NAND, AND, OR, XOR, MUX, DMUX, 16-NOT, 16-AND, 16-OR) TECS - Build an 8 Way OR TECS - Build a 16 bit / 4 Way MUX TECS - Build a 16 bit / 8 Way MUX TECS - Build a 4 Way DMUX TECS - Build an 8 Way DMUX
8
2.Building an ALU (Arithmatic Logic Unit) Activities TECS - Build a Half Adder TECS - Build a Full Adder TECS - Build a 16 bit Adder TECS - Build a 16 bit Incrementer TECS - Build an ALU
9
3.Designing Registers, RAM, etc Activities TECS - Build a 1 bit binary cell(DFF) TECS - Build a 16 bit register(DFF) TECS - Build a 16-bit / 8-register memory(DFF) TECS - Build a 16-bit / 64-register memory(DFF) TECS - Build a 16-bit / 512-register memory(DFF) TECS - Build a 16-bit / 4096-register memory(DFF) TECS - Build a 16-bit / 16384-register memory(DFF) TECS - Build a 16-bit Program Counter(DFF)
10
4.Designing an assembly language Activities TECS - Get familiar with the assembler and CPU emulator TECS - Write a assembly language program to multiply two numbers TECS - Write an IO bound program using our assembly language IO handling: This program runs an infinite loop that listens to the keyboard input. When a key is pressed (any key), the program blackens the screen, i.e. writes "black" in every pixel. When no key is pressed, the screen should be cleared.
11
5. Building the entire computer (in simulation) with the ALU, Registers, RAM, and the assembly language Activities TECS - Create a (simulated) memory chip The Memory chip should be composed from three chips: RAM16K, Screen, and Keyboard. TECS - Build a (simulated) CPU chip using the ALU and register chips TECS - Build a (simulated) Computer chip using the Memory, and CPU chips we created in the past two activities. Add.hack Adds the two constants 2 and 3 and writes the result in RAM[0]. Add.hack Max.hack: Computes the maximum of RAM[0] and RAM[1] and writes the result in RAM[2]. Max.hack Rect.hack: Draws a rectangle of width 16 pixels and length RAM[0] at the top left of the screen. Rect.hack
12
6. Building an Assembler for the assembly language we created Activities TECS - Build an assembler Develop an assembler that translates programs written in Hack assembly language into the binary code understood by the Hack hardware platform. write a symbol-less assembler, then extend your assembler with symbol handling capabilities. use the following *.asm programs for testing your assembler, such as add, max, rect, ping-pong game
13
7. Building a Virtual Machine (similar to the JVM - though much smaller in scope) Activities TECS - Build the Stack Arithmatical part of the VM TECS - Build the Program Control part of the VM
14
8. Introducing a high level, object oriented programming language Activities TECS - Write a program using Jack
15
9. Writing a compiler for the high level language Activities TECS - Build a Compiler (Syntax Analysis) TECS - Build a Compiler (Code Generation)
16
10. Writing an Operating System for our computer, using the high level language we created Activities TECS - Build an operating system
17
11. Some more fun (discussing improvements, and future directions) Activities More fun to go
18
Stanford Computer Science 101 Stanford Online class
19
Instructor Nick Parlante has been teaching Computer Science at Stanford for over 20 years teaches programming best practices at Google produced the Google Python Class and codingbat.com code practice site, and the infamous Binky Pointer Fun videoGoogle Python Classcodingbat.comBinky Pointer Fun
20
Introduction teaches the essential ideas of Computer Science for a zero-prior-experience audience. uses small coding experiments in the browser to play with the nature of computers, understanding their strengths and limitations an excellent first step for someone who then wants to take a full programming course
21
Syllabus The nature of computers and code, what they can and cannot do How computer hardware works: chips, cpu, memory, disk Necessary jargon: bits, bytes, megabytes, gigabytes How software works: what is a program, what is "running" How digital images work Computer code: loops and logic Big ideas: abstraction, logic, bugs How structured data works How the internet works: ip address, routing, ethernet, wi-fi Computer security: viruses, trojans, and passwords, oh my! Analog vs. digital Digital media, images, sounds, video, compression
22
Workload 3-5 hours/week Registration Sign up for the "To be announced" session to be notified by email when the class is next run sign up for "Self-Study" to start browsing the class materials right away
23
Content Organization lecture videos eight and twelve minutes /chunk, two hours worth of video content /week Quiz programming assignments does not look like full, professional Javascript code written document
24
Lectures Week1 Introduction to Computing Principles(19 mins) Variables(6 mins) Introduction to digital images(13 mins) Image code(9 mins) Week2 For Loops(10 mins) Expressions(14 mins) Puzzies(4 mins) Graysclae(14 mins) Week3 If Logic(16 mins) Bluescreen( 12 mins) Hardware(15 mins) Optional Viedo:hard-drive Bites Bytes 1(9 mins) Bites Bytes 2(7 mins)
25
Lectures cont. Week4 Software Ⅰ (9 mins) Software Ⅱ (11 mins) Networking (16mins) TCP/IP(16 mins) Table Date(16 mins) Week 5 String(4 mins) Boolean Logic(11 mins) Count Ⅰ (5 mins) Count Ⅱ (15 mins) Analog Digital 1(22 mins) Week 6 Optional Video: Office Hours Analog Digital 2(24 mins) Digital Media(22 mins) Security(30 mins) Conclusions(14 mins)
26
conclusion Why does the course content and book materials vary so much Abroad university also has the similar computer foundation course What should we do? content or method How can we do? visualization, motivation
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.