Notes CSCE150A Computer Science & Engineering 150A Administrivia Problem Solving Using Computers Overview Hardware Lecture 01 - Course Introduction Software Example Program Pseudocode Stephen Scott Flowchart (Adapted from Christopher M. Bourke) Control Structures Hello World Program Fall 2009 1 / 43 Notes Administrivia CSCE150A Administrivia Roll Overview Syllabus Hardware Software Course Webpage: Example http://cse.unl.edu/~sscott/teach/Classes/cse150AF09/ Program Prerequisite test/placement test: Pseudocode Flowchart http://ncite.unl.edu/cs_placement/ Control CSE: UNIX, logging in, usage agreement, CodeLab → Lab Structures Hello World Program 2 / 43 Notes Intro CSCE Courses CSCE150A CSCE 101: Fundamentals of Computing (Alice) gives a breadth-oriented overview of the field of computer science. CSCE 150A: Introduction to Problem Solving with Computers Administrivia (C) teaches fundamentals of problem solving via programming. Overview Hardware CSCE 150E: Introduction to Computer Programming for Software Scientists and Engineers (Fortran or Matlab) teaches fundamentals Example of problem solving via programming. Program CSCE 150M: Multimedia Approach to Computing (Python) Pseudocode teaches fundamentals of problem solving via programming. Flowchart CSCE 155: Computer Science I (Java) is the first course towards Control Structures the major or minor in CS. For those who pass 150 or score well on Hello World the Placement Exam: http://ncite.unl.edu/cs_placement/ Program CSCE 156: Computer Science II (C++) is the second course towards the major or minor in CS. 3 / 43
Notes Overview of Computers and Programming CSCE150A Administrivia Overview Computer Hardware Hardware Computer Software Software Software Development (Problem Solving) Example Program Pseudocode Pseudocode Flowchart Flowchart Control Structures Hello World Program 4 / 43 Notes Introduction to Computers CSCE150A Administrivia Computers receive, store, process, and output information. Overview Computers can deal with numbers, text, images, graphics, and Hardware sound, to name a few. Software Computers are useless without programming. Example Program Programming languages allow us to write programs and thus Pseudocode communicate with computers. Flowchart It takes our code and converts it into a format so the computer can Control Structures understand it. Hello World Program 5 / 43 Notes Different Types of Computers I CSCE150A Embedded Systems: iPod, cell phones, etc. Administrivia Overview Personal Computers: used by everyday people and typically used by Hardware just one person at a time Software Mainframes: used for real-time systems, ATMs, and such; very Example Program powerful and reliable computers Pseudocode Supercomputers: used by research laboratories for computationally Flowchart intensive applications such as weather forecasting; the largest Control capacity and fastest mainframes Structures Often configured as a cluster of several smaller computers Hello World Program 6 / 43
Notes Different Types of Computers II CSCE150A Administrivia Overview Hardware Software Example Program Pseudocode Figure: PrairieFire is a 98-node Beowulf cluster, originally constructed in 2002. Flowchart It originally scored an HPL benchmark number of 442.50 GFlops, which was then Control Structures the 107th most powerful supercomputer in the world, according to the TOP500 Hello World supercomputer list. See http://rcf.unl.edu/prairiefire/index.php Program 7 / 43 Notes Hardware vs. Software CSCE150A Administrivia Overview Hardware is the equipment used to perform the necessary Hardware computations. E.g. CPU, monitor, keyboard, mouse, printer, etc. Software Software is the programs that enable us to solve problems with a Example computers by providing it with a list of instructions to follow. Program Pseudocode Examples: Word, Firefox, games, etc. Flowchart Firmware - small programs stored in non-volatile memory Control Structures Hello World Program 8 / 43 Notes Computer Hardware CSCE150A Main Memory Administrivia RAM - Random Access Memory - Memory that can be accessed in Overview any order Hardware ROM - Read Only Memory - Memory that cannot be written to Software Secondary Memory - Hard disks, flash drives, CDs, DVDs, etc. Example Program Central Processing Unit (CPU) - Coordinating all computer Pseudocode operations and perform arithmetic and logical operations Flowchart Input/Output Devices - Monitor, printer, keyboard, & mouse Control Structures Computer Networks (not hardware, but configuration of the Hello World hardware) - WAN, LAN, MAN, Wireless LAN Program 9 / 43
Notes Memory I CSCE150A Memory is an essential component in any computer. Administrivia Overview Memory Cell - the storage location Hardware Software Address - the location of the memory cell relative to other memory Example cells Program Pseudocode Content - what is stored in the memory cell Flowchart All programs run in memory Control Every memory cell has content, whether we know it or not. So always Structures initialize variables Hello World Program 10 / 43 Notes Memory II CSCE150A Address Contents 0 -27.2 Administrivia 1 42 Overview 2 0.005 Hardware 3 -26 Software 4 H Example . . Program . . . . Pseudocode 998 x Flowchart 999 75.62 Control Structures Figure: Portion of Memory Cells Hello World Program 11 / 43 Notes Memory III CSCE150A bit - deriving from b inary dig it , is either a 0 or 1 byte - a memory cell is actually a grouping of smaller units called bytes. A byte is made up of 8 bits Administrivia Overview Example: A single character, H requires a byte to store Hardware kilobyte: 1024 bytes ( not 1000 bytes) Software In general, memory sizes are powers of two, 2 10 = 1024 is the power Example Program of two closest to 1 , 000 Pseudocode megabyte: 2 20 = 1 , 048 , 576 bytes (or 1024 kilobytes) Flowchart gigabyte: 2 30 = 1 , 073 , 741 , 824 bytes (or 1024 megabytes) Control Structures kilo-, mega-, giga- may refer to bytes in base-10 in some contexts Hello World Program (network data) or when discussing bits 12 / 43
Notes Memory Exercise CSCE150A Problem Administrivia A certain portable MP3 player is advertised as a having a “30GB” hard Overview drive. In reality, it has 30 , 000 , 000 , 000 bytes. How many actual (base-2) Hardware gigabytes does it have? Software Example Program Pseudocode Flowchart Control Structures Hello World Program 13 / 43 Notes Memory Exercise CSCE150A Problem Administrivia A certain portable MP3 player is advertised as a having a “30GB” hard Overview drive. In reality, it has 30 , 000 , 000 , 000 bytes. How many actual (base-2) Hardware gigabytes does it have? Software Example Program Divide by the number of bytes in a gigabyte: Pseudocode Flowchart Control Structures Hello World Program 13 / 43 Notes Memory Exercise CSCE150A Problem Administrivia A certain portable MP3 player is advertised as a having a “30GB” hard Overview drive. In reality, it has 30 , 000 , 000 , 000 bytes. How many actual (base-2) Hardware gigabytes does it have? Software Example Program Divide by the number of bytes in a gigabyte: Pseudocode Flowchart 30 , 000 , 000 , 000 bytes Control 1024 × 1024 × 1024 bytes-per-gigabyte Structures Hello World Program 13 / 43
Notes Memory Exercise CSCE150A Problem Administrivia A certain portable MP3 player is advertised as a having a “30GB” hard Overview drive. In reality, it has 30 , 000 , 000 , 000 bytes. How many actual (base-2) Hardware gigabytes does it have? Software Example Program Divide by the number of bytes in a gigabyte: Pseudocode Flowchart 30 , 000 , 000 , 000 bytes 1024 × 1024 × 1024 bytes-per-gigabyte = 27 . 93 GB Control Structures Hello World Program 13 / 43 Notes Computer Software I CSCE150A Administrivia Operating System - controls the interaction between machine and user Overview Hardware Communicate with user Software Example Manage memory Program Collect input/Display output Pseudocode Flowchart Read/write data Control Structures Hello World Program 14 / 43 Notes Computer Software II CSCE150A Administrivia Overview Hardware Software Example Program Pseudocode Flowchart Control Structures Hello World Program Figure: OS/device interaction 15 / 43
Recommend
More recommend