BBS 514 - Yapısal Programlama (Structured Programming)1 BBS 514 Yapısal Programlama (Structured Programming)

Slides:



Advertisements
Similar presentations
Basic Computer Hardware and Software.
Advertisements

What Is A Computer System?
Chapter 1: Computer Systems
1 Networks & Data Representation Overview l Computer networks »Network connections »LANs »WANs l The internet. »Identifying computers on the internet »The.
Introduction to Computers
Hardware and Software ► Hardware  the physical, tangible parts of a computer  keyboard, monitor, disks, wires, chips, etc. ► Software  programs and.
1 12Lecture 15 The Internet Overview  Internet / Intranet  TCP/IP  IP address  IP address Classes  Calculating the IP address  Domain Names.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
How Do Computers Work? A Gentle Introduction
UNIT 9 Computer architecture
Introduction to Computer Terminology
Introduction to Computers Essential Understanding of Computers and Computer Operations.
Hardware and Software Basics. Computer Hardware  Central Processing Unit - also called “The Chip”, a CPU, a processor, or a microprocessor  Memory (RAM)
Introduction to Computers Section 1A. home Definition of a Computer A computer is an electronic device used to process data, converting the data into.
V Material obtained from summer workshop in Guildford County.
Chapter 3 – Computer Hardware Computer Components – Hardware (cont.) Lecture 3.
How Do Computers Work? A Gentle Introduction Poly Pride.
An Introduction to Hardware, Software, and the Internet
Computer Systems I’m ONLY a machine! Standard Grade Revision.
Introduction to Computers Personal Computing 10. What is a computer? Electronic device Performs instructions in a program Performs four functions –Accepts.
Flash Cards Computer Technology.
© 2006 Pearson Education 1  Obj: 1.2, to understand networks HW: Review sheet  Quiz next class Sections 1.0 – 1.2  Do Now: p.47 #1.4 and 1.5 C1 D3.
Learning Targets Identify the external parts of the computer Identify examples of input devices Identify examples of output devices Define basic computer.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
Java Software Solutions Foundations of Program Design
Welcome to Computing Presentation slides modified by M. A. Papalaskari from “Java Software Solutions Foundations of Program Design (3 rd ed.)” by John.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Mendel 162C Course website:
Introduction to Computers
Introduction to Computers
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
1 Introduction to Computers Lect 1 Won’t tell you much you don’t know. (Misleading– the course gets more conceptual as we create webpages.) Will go into.
Course ILT Basics of information technology Unit objectives Define “information technology” (IT), distinguish between hardware and software, and identify.
Chapter 1 Introduction. © 2004 Pearson Addison-Wesley. All rights reserved1-2 Announcements The first Weekly Quiz will be available on Blackboard this.
1 Introduction to Computers By Masseta ICT Dept. Mzumbe University.
1 Hardware and Software b Hardware the physical, tangible parts of a computerthe physical, tangible parts of a computer keyboard, monitor, wires, chips,
Computer Architecture
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
Computer Basic Vocabulary
© 2011 Pearson Education, publishing as Addison-Wesley Monday  Class Requirements  Earn hawk points today with the Name Game  Network Login.
Components of a Computer System
Chapter 1: Computer Systems Welcome to Intro to Java Programming Mrs. Vida.
© 2006 Pearson Education Chapter 1: Computer Systems.
1 A Computer Specification  Consider the following specification for a “simplified” personal computer: 950 MHz Pentium 4 Processor 512 MB RAM 30 GB Hard.
Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science by John Lewis, William Loftus, and Cara Cocking Java.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Basic Computer Hardware and Software. Guilford County SciVis V
Basic Computer Hardware and Software.
Computer Systems I’m ONLY a machine! Ashkarali P Asst. Professor GCM Wayanad Ashkarali, GCM.
SEPTEMBER 8, 2015 Computer Hardware 1-1. HARDWARE TERMS CPU — Central Processing Unit RAM — Random-Access Memory  “random-access” means the CPU can read.
Chapter 1: Computer Systems. 2 Computer Systems  We first need to explore the fundamentals of computer processing  We will focus on: components of a.
Review. Secondary Memory Devices Information is moved between main memory and secondary memory as needed Central Processing Unit Main Memory Floppy Disk.
Programming with Java. Chapter 1 Focuses on: –components of a computer –how those components interact –how computers store and manipulate information.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Information Technology (IT). Information Technology – technology used to create, store, exchange, and use information in its various forms (business data,
Computer Graphics HARDWARE. Computers  Computers are automatic, electronic machines that –accept data & instructions from a user (INPUT) –store the data.
Basic Computer Hardware and Software.
An Overview of the Computer System
UNIT 9 Computer architecture
Chapter 1: Computer Systems
Introduction to Computers
Basic Computer Hardware and Software.
An Overview of the Computer System
Introduction to Computers
Chap 2. Computer Fundamentals
Presentation transcript:

BBS Yapısal Programlama (Structured Programming)1 BBS 514 Yapısal Programlama (Structured Programming)

BBS Yapısal Programlama (Structured Programming)2 Course Information –Instructor: Name: Prof. Dr. İlyas Çiçekli Office: Dept. Of Computer Engineering, Room 109 Tel: Ext Course Web Page: Text Book: Programming in ANSI C, Ram Kumar and Rakesh Agrawal, West Publishing Company, 1992.

BBS Yapısal Programlama (Structured Programming)3 Course Organization (Exams) One midterm, one final exam. Dates and times will be announced on the web and in class. Programming assignments Grading policy on course web page

BBS Yapısal Programlama (Structured Programming)4 Course Organization (Syllabus) Introduction to Course Algorithms Introduction to C Variables, Assignment Statement, Simple IO Decision Statements Repetition Statement Functions Arrays Pointers More on Arrays and Pointers Characters and Strings Structures File Processing Recursion

BBS Yapısal Programlama (Structured Programming)5 Computers

BBS Yapısal Programlama (Structured Programming)6 Computers A computer is a device capable of performing computations and making logical decisions at very fast speeds. First electronic digital computer was ENIAC. –built in 1946 at University of Pennsylvania –used to compute ballistic tables –it was very huge Since from the first computer, computers are getting smaller, but they are getting much powerful. They are widely used in many areas of society. –banking, scientific research, schools, airplanes, space program, etc.

BBS Yapısal Programlama (Structured Programming)7 Hardware & Software The set of instructions controls computers are known as computer programs (software). –programs and data –a program is a series of instructions The physical structure of the computer is called as hardware. –the physical, tangible parts of a computer –keyboard, monitor, disks, wires, chips, etc. A computer requires both hardware and software Each is essentially useless without the other

BBS Yapısal Programlama (Structured Programming)8 Hardware A modern computer consists of five main components and they are all parts of computer hardware: –Memory –Central Processing Unit (CPU) –Input Devices –Output Devices –Secondary Storage

BBS Yapısal Programlama (Structured Programming)9 CPU and Main Memory Central Processing Unit Main Memory Chip that executes program commands Intel Pentium 4 Sun ultraSPARC III Primary storage area for programs and data that are in active use Synonymous with RAM

BBS Yapısal Programlama (Structured Programming)10 Secondary Memory Devices Central Processing Unit Main Memory USB Disk Hard Disk Secondary memory devices provide long-term storage Information is moved between main memory and secondary memory as needed Hard disks Floppy disks ZIP disks Writable CDs Writable DVDs Tapes

BBS Yapısal Programlama (Structured Programming)11 Input / Output Devices Central Processing Unit Main Memory USB Disk Hard Disk Monitor Keyboard I/O devices facilitate user interaction Monitor screen Keyboard Mouse Joystick Bar code scanner Touch screen

BBS Yapısal Programlama (Structured Programming)12 Computer Organization (Memory) Memory Store information (data + instructions) A sequence of memory cells. –a byte is 8 bits –a bit is smallest unit (0 or 1) Store, retrieve, update –changing pattern of 0 and 1s in memory cells –copying these patterns into some internal registers Stored information in memory is volatile. Size of a memory of a typical PC system: 512MB, 1GB, 2GB –KB, MG, GB

BBS Yapısal Programlama (Structured Programming)13 Computer Organization (CPU) CPU (Central Processing Unit) Process and manipulate information stored in memory. It can be divided into two units: CU (Control Unit) and ALU (Arithmetic Logic Unit) CU coordinates activities of the computer and controls other devices of computer. ALU processes arithmetic and logical instructions.

BBS Yapısal Programlama (Structured Programming)14 Computer Organization (Input and Output Devices) Input and Output Devices Provide the interface between the user and the computer. Input devices are used to enter instructions or data by the user. Output devices are used to give results of computations. Input Devices: keyboard, mouse Output Devices: monitor, printer

BBS Yapısal Programlama (Structured Programming)15 Computer Organization (Secondary Storage) Secondary Storage Computers have limited main memory and information stored in main memory is volatile. i.e. when a computer is switched off, information in its main memory disappears. There are additional data storage unit, called secondary storage units. Data stored in these secondary storage units are permanent, i.e. data does not disappear when you switch off the computer. Some secondary storage units: –Floppy Disks –Hard Disks –Tape Drive –Optic Disk (CD Drive, DVD Drive) –Flash Disk (USB Disks)

BBS Yapısal Programlama (Structured Programming)16 SOFTWARE Operating System –Controls all machine activities –Provides the user interface to the computer. –manages resources such as CPU and memory –Widows 95, Widows 98, Solaris, Unix Application Program –generic form for all other kind of software –games, word processors, compilers Most operating systems and application programs have a graphical user interface (GUI) Windows XP –an operating system –uses a graphical user interface. –consists of windows –you point the mouse and click there, you start a program

BBS Yapısal Programlama (Structured Programming)17 File/Directory File contains a document and Directory contains files or other directories. You will be able to create files and directories a file can contain different types of information, and normally the extension of that file reflects the content of that file. –.doc : a word document –.c : A C program file –.exe : Executable file –.java : a java program –.class: a class file –.html: a hypertext file used to represent a web page

BBS Yapısal Programlama (Structured Programming)18 A Computer Specification Consider the following specification for a personal computer: –2.8 GHz Pentium 4 Processor –512 MB RAM –80 GB Hard Disk –48x CD-RW / DVD-ROM Combo Drive –17” Video Display with 1280 x 1024 resolution –56 Kb/s Modem What does it all mean?

BBS Yapısal Programlama (Structured Programming)19 Memory Main memory is divided into many memory locations (or cells) Each memory cell has a numeric address, which uniquely identifies it

BBS Yapısal Programlama (Structured Programming)20 Storing Information Large values are stored in consecutive memory locations Each memory cell stores a set number of bits (usually 8 bits, or one byte)

BBS Yapısal Programlama (Structured Programming)21 Storage Capacity Every memory device has a storage capacity, indicating the number of bytes it can hold Capacities are expressed in various units: KB2 10 = 1024 MB2 20 (over 1 million) GB2 30 (over 1 billion) TB2 40 (over 1 trillion) UnitSymbolNumber of Bytes kilobyte megabyte gigabyte terabyte

BBS Yapısal Programlama (Structured Programming)22 Memory Main memory is volatile - stored information is lost if the electric power is removed Secondary memory devices are nonvolatile Main memory and disks are direct access devices - information can be reached directly The terms direct access and random access often are used interchangeably A magnetic tape is a sequential access device since its data is arranged in a linear order - you must get by the intervening data in order to access other information

BBS Yapısal Programlama (Structured Programming)23 RAM vs. ROM RAM - Random Access Memory (direct access) ROM - Read-Only Memory The terms RAM and main memory are basically interchangeable ROM could be a set of memory chips, or a separate device, such as a CD ROM Both RAM and ROM are random (direct) access devices! RAM probably should be called Read-Write Memory

BBS Yapısal Programlama (Structured Programming)24 Compact Discs A CD-ROM is portable read-only memory A microscopic pit on a CD represents a binary 1 and a smooth area represents a binary 0 A low-intensity laser reflects strongly from a smooth area and weakly from a pit A CD-Recordable (CD-R) drive can be used to write information to a CD once A CD-Rewritable (CD-RW) can be erased and reused The speed of a CD drive indicates how fast (max) it can read and write information to a CD

BBS Yapısal Programlama (Structured Programming)25 DVDs A DVD is the same size as a CD, but can store much more information The format of a DVD stores more bits per square inch A CD can store 650 MB, while a standard DVD can store 4.7 GB –A double sided DVD can store 9.4 GB –Other advanced techniques can bring the capacity up to 17.0 GB Like CDs, there are DVD-R and DVD-RW discs

BBS Yapısal Programlama (Structured Programming)26 The Central Processing Unit A CPU is on a chip called a microprocessor It continuously follows the fetch-decode-execute cycle: fetch Retrieve an instruction from main memory decode Determine what the instruction is execute Carry out the instruction

BBS Yapısal Programlama (Structured Programming)27 The Central Processing Unit The CPU contains: Arithmetic / Logic Unit Registers Control Unit Small storage areas Performs calculations and makes decisions Coordinates processing steps

BBS Yapısal Programlama (Structured Programming)28 The Central Processing Unit The speed of a CPU is controlled by the system clock The system clock generates an electronic pulse at regular intervals The pulses coordinate the activities of the CPU The speed is usually measured in gigahertz (GHz)

BBS Yapısal Programlama (Structured Programming)29 Monitor The size of a monitor (17") is measured diagonally, like a television screen Most monitors these days have multimedia capabilities: text, graphics, video, etc. A monitor has a certain maximum resolution, indicating the number of picture elements, called pixels, that it can display (such as 1280 by 1024) High resolution (more pixels) produces sharper pictures

BBS Yapısal Programlama (Structured Programming)30 Modem Data transfer devices allow information to be sent and received between computers Many computers include a modulator-demodulator or modem, which allows information to be moved across a telephone line A data transfer device has a maximum data transfer rate A modem, for instance, may have a data transfer rate of 56,000 bits per second (bps)

BBS Yapısal Programlama (Structured Programming)31 Networks A network is two or more computers that are connected so that data and resources can be shared Most computers are connected to some kind of network Each computer has its own network address, which uniquely identifies it among the others A file server is a network computer dedicated to storing programs and data that are shared among network users

BBS Yapısal Programlama (Structured Programming)32 Network Connections Each computer in a network could be directly connected to every other computer in the network These are called point-to-point connections This technique is not practical for more than a few close machines Adding a computer requires a new communication line for each computer already in the network

BBS Yapısal Programlama (Structured Programming)33 Network Connections Most networks share a single communication line Adding a new computer to the network is relatively easy Network traffic must take turns using the line, which introduces delays Often information is broken down in parts, called packets, which are sent to the receiving machine and then reassembled

BBS Yapısal Programlama (Structured Programming)34 Local-Area Networks LAN A Local-Area Network (LAN) covers a small distance and a small number of computers A LAN often connects the machines in a single room or building

BBS Yapısal Programlama (Structured Programming)35 Wide-Area Networks LAN A Wide-Area Network (WAN) connects two or more LANs, often over long distances A LAN usually is owned by one organization, but a WAN often connects groups in different countries LAN

BBS Yapısal Programlama (Structured Programming)36 The Internet The Internet is a WAN which spans the entire planet The word Internet comes from the term internetworking It started as a United States government project, sponsored by the Advanced Research Projects Agency (ARPA) - originally it was called the ARPANET The Internet grew quickly throughout the 1980s and 90s

BBS Yapısal Programlama (Structured Programming)37 TCP/IP A protocol is a set of rules that determine how things communicate with each other The software which manages Internet communication follows a suite of protocols called TCP/IP The Internet Protocol (IP) determines the format of the information as it is transferred The Transmission Control Protocol (TCP) dictates how messages are reassembled and handles lost information

BBS Yapısal Programlama (Structured Programming)38 IP and Internet Addresses Each computer on the Internet has a unique IP address, such as: Most computers also have a unique Internet name, which also is referred to as an Internet address: spencer.villanova.edu kant.gestalt-llc.com The first part indicates a particular computer ( spencer ) The rest is the domain name, indicating the organization ( villanova.edu )

BBS Yapısal Programlama (Structured Programming)39 Domain Names The last part of a domain name, called a top-level domain (TLD), indicates the type of organization: edu com org net - educational institution - commercial entity - non-profit organization - network-based organization Sometimes the suffix indicates the country: New TLDs have recently been added: biz, info, tv, name uk au ca se - United Kingdom - Australia - Canada - Sweden

BBS Yapısal Programlama (Structured Programming)40 Domain Names A domain name can have several parts Unique domain names mean that multiple sites can have individual computers with the same local name When used, an Internet address is translated to an IP address by software called the Domain Name System (DNS) There is no one-to-one correspondence between the sections of an IP address and the sections of an Internet address

BBS Yapısal Programlama (Structured Programming)41 The World Wide Web The World Wide Web allows many different types of information to be accessed using a common interface A browser is a program which accesses and presents information –text, graphics, video, sound, audio, executable programs A Web document usually contains links to other Web documents, creating a hypermedia environment The term Web comes from the fact that information is not organized in a linear fashion

BBS Yapısal Programlama (Structured Programming)42 The World Wide Web Web documents are often defined using the HyperText Markup Language (HTML) Information on the Web is found using a Uniform Resource Locator (URL): ftp://java.sun.com/applets/animation.zip A URL indicates a protocol (http), a domain, and possibly specific documents

BBS Yapısal Programlama (Structured Programming)43 Software The set of instructions controls computers are known as computer programs (software). a software is a series of instructions In this course, we will how to write computer programs using C programming language. Before, we start to learn C programming language we will talk about: –ALGORITHMS: a sequence of instructions to solve a problem