Introduction to Computer and Programing Thanachat Thanomkulabut.

Slides:



Advertisements
Similar presentations
Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
COSC 120 Computer Programming
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
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.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
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.
Computers & Logic An Overview. Hardware Hardware is the equipment, or the devices, associated with a computer. For a computer to be useful, however, it.
CS102 Introduction to Computer Programming
Computers and Programming อนันต์ ผลเพิ่ม Anan Phonphoem
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
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.
Introduction to Programming. Our Book in CS Why Program? Lets watch a video
Computer Hardware and Software Jinchang Wang. Hardware vs. Software Hardware is something tangible. Computer hardware includes electronic circuitry and.
Introduction to C# Programming ณภัทร สักทอง Application Program Development.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming 1.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Introduction to Computers and Programming – Computer Programming.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Introduction to the Computer System. What is a computer ? A computer is an electronic device that can accept data and instruction, process them or store.
1 nd Semester Module1 Introduction to Computer and Programming Thanawin Rakthanmanon Create by: Aphirak Jansang Computer.
Chapter 1: An Overview of Computers and Programming Languages
Introduction to Computer and Programing Thanachat Thanomkulabut.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Introduction to Computer and Programing Thanachat Thanomkulabut.
1 st Semester Introduction to Computer and Programming Computer Engineering Department Kasetsart University, Bangkok, THAILAND.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to Computer and Programing Thanachat Thanomkulabut.
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang
Computers and Programming ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
1 nd Semester Module2 C# Basic Concept Thanawin Rakthanmanon Computer Engineering Department Kasetsart University, Bangkok.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Chapter 1 An Overview of Computers and Programming Languages.
2 nd Semester Module1 Introduction to Computer and Programming อภิรักษ์ จันทร์สร้าง Aphirak Jansang
Introduction to Computer Programming using Fortran 77.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 1: Introduction to Computers and Programming.
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1: An Overview of Computers and Programming Languages
BASIC PROGRAMMING C SCP1103 (02)
Introduction to Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computer Programming-1 CSC 111
Chapter 1: Introduction to Computers and Programming
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Introduction to Computer and Programing Thanachat Thanomkulabut

Outline 2  Introduction to computer  Programming Languages  C# Language Overview

Definition of Computer 3  Devices for performing computations at high speeds with great accuracy  A machine that can be programmed to manipulate symbols.  A machine that can quickly store and retrieve large amounts of data.  Physical components are known as “Hardware” Introduction to computer

Computer Categories 4 Desktop Computer Laptop, Notebook Tablets, Smart Phones Personal Computer High Computation Power Servers, etc Supercomputer and Mainframe Introduction to computer

Computer Systems  Hardware  Actual physical machines (equipment) that make up the computer 5  Software  Programs written for a specific application are often called software Introduction to computer

Computer Components CPU (Central Processing Unit)Primary storage (memory) Secondary storage (disks, tapes, etc.)Input devices (mouse, keyboard, etc.) Output devices (screen, printer, etc.) 6 Introduction to computer

Data Processing INPUT Processing Primary storage OUTPUT Commands Data results Secondary storage Introduction to computer

Computer Storage RAMROM 8 Introduction to computer Primary Storage Secondary Storage Read Only Non - Volatile Can Read/Write Volatile Much Faster More expensive Slower Less expensive Computer Storage

Data Representation 9  Data in computer is represented in “ bit ”  bit = binary digit 0 or 1  Byte = 8 bits  1 byte can represent many kinds of data 1 byte = the above 1 byte represents character “a” or 97 the meaning of 1 byte depends on the program 1 Kbyte = 2 10 = 1024 bytes 1 Mbyte = 2 20 = 1,048,576 bytes 1 Gbyte = 2 30 = 1,073,741,824 bytes 1 Tbyte = 2 40 = 1,099,511,627,776 bytes Introduction to computer

ASCII Table 10

Outline 11  Introduction to computer  Programming Languages  C# Language Overview

Programming Languages 12  Program  A set of instructions for a computer to follow, written in specific programming language  Types of programming language  High-Level Language  Assembly Language  Machine Language Programming Languages

High-level VS Assembly VS Machine Language 13  High-level Language  Nearly like human word SUM := A * 2 + ALPHA/3;  Assembly Language  Some key words are understandable MULL3A, #2, R ADDL3R6, R7, SUM  Machine Language  Only “ 0 ” and “ 1 ” Computer itself understands only Machine language

Language translator 14 Hello! _ High-level language static void Main( ) { Console.WriteLine("Hello!"); } Interpreter / Compiler Assembly language pushl %ebp movl %esp, %ebp subl $8, %esp andl $-16, %esp Machine language Assembler Machine Programming Languages

15 Language Translation: Interpreter Interpreter Input Output Prog.py Source Code Programming Languages

16 Language Translation: Compiler Compiler Input Output prog.cs Source Code prog.exe Machine Code Programming Languages

IDE Software  Integrated Development Environment  Code editor  Compiler/interpreter  Debugger  E.g., SharpDevelop 17 Programming Languages

High-Level Languages  Procedural Language  Fortran  Cobol  Basic  C  Pascal  Object-Oriented Language  C++  Java  C#  Functional Language  Lisp  Logic Language  Prolog 18 Programming Languages

Outline 19  Introduction to computer  Programming Languages  C# Language Overview

A simple C# Program 20 Grouping using { } C# Language Overview

A simple C# Program 21 A statement must be ended with semicolon “;” C# Language Overview

A simple C# Program 22 C# syntax is case-sensitive namespaceNAMEspace Main()main() C# Language Overview

A simple C# Program 23 White space means nothing static void Main(string[] args) { Console.WriteLine("Hello World!"); } static void Main(string[] args){ Console.WriteLine("Hello World!");} C# Language Overview

A simple C# Program 24 Anything between /* */ or after // is considered a comment Comments will not be translated C# Language Overview

Program Structure  The starting point of the program is:  This is known as the method Main  A method is put inside a class  A class may be put inside a namespace static void Main () {... starting point... } static void Main () {... starting point... } 25 C# Language Overview

Program Structure  In C#  A program can contain several namespaces  A namespace can contain several classes  A class can contain several methods  In other words  Think of a namespace as a container of classes  Think of a class as a container of methods method1 method2 namespace Class Class 26 C# Language Overview

Program Structure  For this course  Program with only one class and at most one namespace  For now until sometime before midterm  Program with one method (i.e., Main) namespace HelloW { class HelloWClass { static void Main () { System.Console.WriteLine("Hello World!"); System.Console.ReadLine(); } namespace HelloW { class HelloWClass { static void Main () { System.Console.WriteLine("Hello World!"); System.Console.ReadLine(); } 27 C# Language Overview

Naming  C# allows user to give a name to something.  A user-defined name can be any word with some rules.  Remember!!! C# is a case-sensitive language. * Case Sensitive Example KU ≠ kU ≠ku KU ≠ kU ≠ ku C# Language Overview 28

Naming Rules  Letters, digits and underscores(_)  First character must be a letter or _  Up to 63 characters long  Must not be a reserved word C# Language Overview 29 Example nameName _data 9point class class_Aclass_"A" point9

C# Reserved Words C# Language Overview 30

More Resources  How Bits and Bytes Work (  Byte (  Computer hardware (  Software (  Programming language (  List of programming languages ( nguages) nguages 31

Any question?