Download presentation
Presentation is loading. Please wait.
1
CIS 260 Computer Programming I in C Prof. Timothy Arndt
2
Office location: BU 331 Office hours: 12:30pm – 2:30pm TTH, 7:00pm-8:00pm TH Office Phone: 687-4779 E-Mail: arndt@cis.csuohio.edu
3
Course Objectives 4 Develop algorithmic problem solving skills 4 Understand modern software engineering techniques for the design of program solutions 4 Learn the ANSI C programming language
4
Course Overview Introduction to computers & programming Problem solving; variables; expressions, printf 4 Top down design; functions 4 Selection structures; if and switch statements 4 Repetition and loop statements
5
Course Overview Modular programming 4 Data types and operators 4 Arrays Strings 4 Structure and Union Types 4 File Processing 4 Pointers and dynamic memory allocation 4 Stacks, Queues, Binary Trees
6
Texts 4 Problem Solving and Program Design in C, Hanly and Koffman, Addison-Wesley, 1996.
7
History of Electronic Computers 4 First electronic computer built in late 1930’s by Atanasoff and Berry 4 First general purpose computer called ENIAC, 1946 4 These computers used vacuum tubes. Later computers used integrated circuits, LSI, VLSI
8
Categorization of Computers 4 Microcomputers 4 Workstations 4 Mainframes 4 Supercomputers 4 Minicomputers 4 Servers
9
Computer Hardware 4 Main memory 4 Secondary memory 4 Central processing unit 4 Input devices –Keyboards –Mouses 4 Output devices –Monitors –Printers
10
Memory 4 The memory of a computer is an ordered sequence of storage locations called memory cells 4 Each memory cell has a unique address 4 The data stored in a cell are called the contents of the cell 4 A cell may contain diverse types of data - numbers, characters, or program data
11
Bytes and bits 4 A memory cell is a grouping of smaller units called bytes. 4 A byte is the amount of storage required to store a single character 4 A bit (binary digit) is the smallest unit a computer can deal with 4 A bit is either 0 or 1
12
Storage and Retrieval of Information in Memory 4 To store a value in a memory cell, the computer sets each bit of the cell to 0 or 1, destroying the previous values 4 To retrieve a value from a memory cell, the computer copies the contents of the cell to another area
13
Main memory 4 Random access memory (RAM) is volatile (data is lost when the computer is turned off). 4 Read only memory (ROM) is non-volatile and is often used to store the startup instructions of the computer 4 Cache memory is fast RAM
14
Secondary Storage Devices 4 Disk drives are read-write random access devices with files organized in directories and subdirectories –Hard disks –Floppy disks 4 CD-ROM drives are (usually) read-only random access devices 4 Tape drives are read-write sequential access devices
15
Central Processing Unit 4 Coordinates all computer operations 4 Performs arithmetic and logical operations on data 4 Stored programs are executed in a cycle of instruction fetch, instruction decode, data fetch, instruction execute, result store sequences
16
Input/Output Devices 4 I/O devices allow us to enter data for a computation and observe the results of the computation 4 Keyboard 4 Mouse 4 Monitor 4 Printer
17
Programming Languages 4 Machine languages are the native languages of the computer and are coded as strings of 0’s and 1’s 4 Assembly languages substitute symbolic names for strings of 0’s and 1’s 4 High-Level Language instructions correspond to sequences of assembly language instructions and are easier to read/write
18
Relationship Between High- Level and Machine Languages 4 In order to be executed by a computer, a program written in a high-level language (source program) must be translated to machine language 4 The translator is called a compiler 4 The resulting program is called an object program
19
Operating System 4 The software which controls the operation of a computer is called the operating system 4 Operating systems may have graphical interfaces (GUIs) command line interfaces (CLIs) or both
20
Software Development Method 4 Specify the problem requirements 4 Analyze the problem 4 Design the algorithm to solve the problem 4 Implement the algorithm 4 Test and verify the completed algorithm 4 Maintain and update the program
21
Case Study: Miles to Kilometers 4 Analyze the problem 4 Problem input: distance in miles 4 Problem output: distance in kilometers 4 Additional constraints on the solution?
22
Design 4 Algorithm –Get the distance in miles –Convert the distance to kilometers –Display the distance in kilometers 4 Refine the algorithm –The distance in kilometers is 1.609 times the distance in miles
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.