1 / 7

COP3502: Introduction to Computer Science

Learn about computer programming, programming languages, and translation mechanisms from high-level to machine code. Dive into C, C++, Java, and more!

flawrence
Download Presentation

COP3502: Introduction to Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COP3502: Introduction to Computer Science Yashas Shankar

  2. Computer programming • A program  a code that list instructions for computer to executes • There is a mechanism (compiler/translator) to change a program into machine code • Human cannot (easily) understand machine code  use programming languages such as C, C++, Java, Visual basic, etc. ** machine code ** 00110011 10101100 00001111 10011010 ** C-program ** for (i=0;i<10;i++) { x[i] = x[i-1] + y[i] }

  3. Languages • Machine language – 0000111100110011 • Assembly – easier for people to read, but still hard to develop applications • High-level language – easier for people to develop applications • Fortran, C, C++, Java, Lisp, Cobal, Basic, Algol, Scheme, Smalltalk, Prolog, etc.

  4. Translation: program  machine code ** Assembly code ** LOD #1 STO 128 LOD #0 ADD #1 ** C-program ** for (i=0;i<10;i++) { x[i] = x[i-1] + y[i] } ** Java program ** System.out.println (“Hello my name is Yashas”); ** machine code ** 00110011 10101100 00001111 10011010

  5. Translation: program  machine code ** C-program ** ** Assembly code ** ** Assembly code # 2 ** ** Java program ** Pentium-4 ** machine code ** Pentium-5 ** machine code **

  6. Your first program • See handout

  7. Before we leave • Homework#3 due next class • Next class: more on programming • Next week: HTML

More Related