CS270 Colorado State University =================================== Introduction: Computer Organization =================================== ------------- Introductions -Roll will be taken. -Put username and preferred email address on sign up sheet. ------ Layers (Zooming In) Problem Examples: connect four (given current board state, what should next move be given the goal is to win) Algorithms "Anything that can be computed, can be computed with a computer" Universal Turing Machine is model for what can be computed. (CS 301) Language Used to implement algorithms. Examples: Java, C, Fortran, C++, Python, and many more. Machine ISA and Operating System Machine code and corresponding assembly language. Examples: LC3, MIPS, x86, sparc OS kernel calls Examples: sleep(), malloc(), etc. Logic Circuits Physical gates that implement digital logic such as AND and NOT. Sequential circuits are capable of maintaining state. Examples: DRAM Devices Not covered in this course. Examples: transistors ----------- Class Outline (Zooming Out) Number representation -How we represent numbers using only zeros and ones. -Operations using binary number representations. Circuits -Combinational and Sequential circuits. -How circuits can be used to implement finite state machines. Instruction Set Architectures, Machine Architecture -LC3 - LD-ST architecture, 16-bit instructions, 15 different instructions -Microarchitecture is how LC3 ISA is implemented using sequential and combinational circuits. -The control unit in the LC3 microarchitecture can be modeled with a finite state machine (CS 301). The C programming language Basics of compilation % gcc main.c -Generates a.out executable. Not the same as Java byte code. -main.c is source file that contains C code. When useful -systems programming when it is necessary to play around with pointers to memory, Java cannot easily do that. Linux/unix platforms implemented in C. -widely used especially in lower-level code such as drivers -the syntax of many languages derives from C: C++, Java, php, perl, scripting languages, ... -when performance really matters When not as useful -high-level application programming The interaction between C and MIPS (Zooming in a little bit) -MIPS is a real assembly language. -Function calls between languages. -Recursion, recursion, recursion. ----------- Course themes -Learn the levels from the bottom up -Program development on the command line -compiler: gcc -build system: make -debugging: gdb, valgrind -revision control: subversion -documentation: man -Unit testing is important. -Comments are important. -Software organization is important. -Instruction Set Architectures share many common characteristics. - You will learn: LC3 and MIPS - We will discuss: x86 -Start assignments early or you will regret it. ----------- Administrivia -Hand out syllabus and PA0 packet. -Look at webpage: http://www.cs.colostate.edu/~cs270 -Look at schedule for programming assignments. -Discuss that homeworks and programming assignments are combined into programming assignments. -Labs will be given in recitations. First one will be after PA2 is done. -Recitations will be covering programming assignments. -Discuss student responsibilities on syllabus. ------------------------ mstrout@cs.colostate.edu, 8/22/08