INTRODUCTION – COMPUTERS, BASIC C++, UNIX ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1.

Slides:



Advertisements
Similar presentations
Etter/Ingber Engineering Problem Solving with C Fundamental Concepts Chapter 1 Engineering Problem Solving.
Advertisements

ARDUINO CLUB Session 1: C & An Introduction to Linux.
Write a program step by step. Step 1: Problem definition. Given the coordinate of two points in 2-D space, compute and print their straight distance.
The Operating System. What is an Operating System? The software which makes it possible for you to use your computer The software which starts up when.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Computer Systems.
Computing Components 01/26/11. Announcements & Reminders Programs 1 due Friday, 9/2/11 What is my late policy? Proxy Codes for Labs  You should be able.
C Primer CAS CS210 Ying Ye Boston University. Outline Hello, world Basics in C Comparison of C and Java.
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Midterm Thursday Topics: First Midterm Instructions Set Architecture Machine Language Programming Assembly Language Programming Traps, Subroutines, & Interrupts.
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Prof. R. Willingale Department of Physics and Astronomy 2nd Year C+R 2 nd Year C and R Workshop Part of module PA2930 – 2.5 credits Venue: Computer terminal.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Why Program? Computer – programmable machine designed to follow instructions Program – instructions in computer memory to make it do something Programmer.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Chapter 1 – Introduction to Computer Systems & QBasic
CSE 390a Editing and Moving Files
Introduction to Shell Script Programming
COMPUTER SYSTEM.
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
How computers work Learning objective 2: Explain the four basic functions of a computer.
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
CS 444 Introduction to Operating Systems
Introduction to Computer Systems and the Java Programming Language.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. The Operating System Allocates memory for.
UNIX Introduction CSCE 221H Texas A&M University.
INTRODUCTION TO CSCE LAB BASIC OF COMPUTERS, C++, UNIX, AND HELLO WORLD.
CSCE 121: Introduction to Program Design and Concepts Dr. J. Michael Moore Spring 2015 Set 4: Computation 1 Based on slides created by Bjarne Stroustrup.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Introduction to Scripting Workshop October
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
C++ / G4MICE Course Session 1 - Introduction Edit text files in a UNIX environment. Use the g++ compiler to compile a single C++ file. Understand the C++
Chapter 1 09/04/13. Change Your Password  The command is: passwd In the lab first do : ssh -Y onyx  You will have to see me to change it, if you forget.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
THE WINDOWS OPERATING SYSTEM Computer Basics 1.2.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
PROGRAMMING 1 – HELPER INSTRUCTIONS ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1.
Introduction to Computer Programming using Fortran 77.
Chapter 16 Advanced Bourne Shell Programming. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To discuss numeric data processing.
Introduction to Scripting Workshop February 23, 2016.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
Tutorial Six Linux Basics CompSci Semester Two 2016.
Chapter 1: Introduction to Computers and Programming
Computer Systems – Hardware, Operating System, & Software
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Computer Fundamentals 1
Key Ideas from day 1 slides
University of Maryland Baltimore County Department of Computer Science and Electrical Engineering   CMPE 212 Laboratory (Discussion 2) Hasibul Hasan
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
Prepared By: G.UshaRani B.Pranalini A.S.Lalitha
Computer Science I CSC 135.
Computer Electronic device Accepts data - input
Lab: ssh, scp, gdb, valgrind
Computer Electronic device Accepts data - input
Computer Electronic device Accepts data - input
Understand the interaction between computer hardware and software
Video Notes.
Programming Logic and Design Eighth Edition
Computer System.
Presentation transcript:

INTRODUCTION – COMPUTERS, BASIC C++, UNIX ACKNOWLEDGEMENT: THE SLIDES ARE PREPARED FROM SLIDES PROVIDED BY NANCY M. AMATO AND JORY DENNY 1

COMPUTERS  Basic architecture  Memory stores the data and instructions  CPU is the brain  Arithmetic and logical operations  Controls  Peripheral devices: I/O devices 2 CPU ALU Registers Control Logic Input Devices Output Devices Memory Data Instruction s

COMPUTERS  Software layer : how program and user interacts with the computer 3 Hardware Operating SystemCompiler ProgramUser

C++ REVIEW (CH 1.1)  Data  Type – defines possible actions (primitives, classes – user-defined, templates)  Variable – instance in memory  Declaration – Tell the compile variable, function, or type exists  Definition – Initializing value of variable, full specification of type or function  Example  int i; //declaration : type of variable i is int  Foo bar(10); //declaration + definition 4

C++ REVIEW (CH 1.2)  Operators:  Mathematical (+, -, *, /, %)  Comparison or Relational (==, !=, >, <, etc)  Assignment (=)  Access ([], (), *, ->)  Boolean or Logical (&, ^, !, &&, ||, etc) 5

C++ REVIEW (CH 1.3)  Control Flow:  Branching :  If-else:  if( a <= b ) cout<<a; else cout<<b;  Switch:  switch(alphabet) { case ‘A’: cout<<“A”; break;... }  Loops  Basic for  for(int i = 0; i < 10; ++i);  for(iterator i = begin(); i != end(); ++i);  Basic while  while(!done) do_something();  Basic do while  do { something(); } while(!done); 6

C++ REVIEW (CH 1.4)  Functions  Function Declaration and Basic signature : Let compiler know of the existence of the function return_type function_name(param1, param2, …, paramN);  Function Definition: Stating the function body  Example  void foo(int, char); // declaration  Foo bar(int i, char c); //declaration  void sum (int i, int j) { i= i+j; } //definition 7

LINUX  PuTTY is an application to establish SSH connections  Development machine: linux.cse.tamu.edu  Open a PuTTY session and log into linux 8

BASIC UNIX COMMANDS  cd: change directory  mkdir: make directory  ls: list items in a directory  g++-4.7: invoke GNU’s C++ compiler  vim / emacs / nano: text editing 9 Quick start guide Vim cheat sheet Vim settings fileVim settings file – put in home directory labeled “.vimrc”

LINUX TOOLS  gdb – debugging tool for linux gdb  valgrind – memory leak detector/memory profiler valgrind  screen – helpful when working remotely in a terminal. Saves the terminal session even if the network connection cuts out screen  LaTex – tool for creating documents LaTex  top – monitor the system processes top 10

EXERCISE 11