1 / 30

CISC105 General Computer Science

CISC105 General Computer Science. Class 1 – 6/5/2006. Important Notes!. The lab session has been moved from 040 Smith Hall to 009 Willard Hall. It will meet at the same day and time. Computer Hardware. Main Memory. Memory Cells Address Memory content Data Program Instruction

jgoodrich
Download Presentation

CISC105 General Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CISC105 General Computer Science Class 1 – 6/5/2006

  2. Important Notes! • The lab session has been moved from 040 Smith Hall to 009 Willard Hall. It will meet at the same day and time.

  3. Computer Hardware

  4. Main Memory • Memory Cells • Address • Memory content • Data • Program Instruction • RAM vs. ROM • Random Access Memory = volatile • Read Only Memory = non-volatile

  5. Bits and Bytes • Information stored in memory as bits • 8 bits = 1 Byte • 1 b vs. 1 B • 1 KB = 1024 B • 1 GB = 1024 MB = 1,048,576 MB = 1,073,741,824 B

  6. Secondary Storage • Secondary Storage is used for long term storage of programs and information • Information is stored in Files, directories and subdirectories

  7. Central Processing Unit (CPU) • “Brain” of the computer with 2 primary functions • Coordinate all computer operations • Performing arithmetic and logical operations on data • CPU follows instructions contained in a computer program • Fetch Instruction -> Interpret Instruction -> retrieve data (if necessary) -> carry out instruction • Uses Registers (high speed memory) to speed up retrieval

  8. Input Devices • Input Devices - Any device used to enter information into a computer • Keyboard, Mouse, Digitizer etc.

  9. Output Devices • Output Devices used to observe the results of the data manipulation • Monitor, printer, etc.

  10. Computer Network • Local Area Network (LAN) – computers and peripherals connected together in order to share resources. Usually contained in a building. • Network Printers, Scanners, secondary storage (file servers) etc.

  11. Computer Network (WAN) • Wide Area Network (WAN) – a network that attaches a large number of computers over a large geographic area. • The Internet is the most well know WAN (WWW and GUI via Browser)

  12. How to connect to Networks • Modem - Use a telephone line (modulator / demodulator) - transmit up to 50,000 bps • Digital Subscriber Line (DSL) – uses telephone line but can have simultaneous voice communication. (~1.5 Mbps) • Cable Internet access – uses the coax cable that is used to deliver TV to your house

  13. Computer Software • Operating System • Application Software • Computer Languages • Software Development Method

  14. Operating System • Operating System (OS) - Collection of programs that control the interaction of the user and computer hardware • Booting a computer – loading the OS into memory

  15. OS Responsibilities • Communicating with the computer users • Managing memory allocation, processor time and other resources • Collecting input from Input devices • Conveying output to screen, printer, etc • Fetch data from secondary storage • Write data to secondary storage

  16. Application Software • Application – software used for a specific task – word processing, email, accounting, etc • Applications are made available by installing them. • Must be compatible with the Hardware and operating system you are using.

  17. Computer Languages • Machine language – collection of binary numbers • Only understood by a specific CPU • Not very readable • Not standardized • Assembly Language – mnemonic codes that correspond to machine language • Suffers from same problems as Machine Language

  18. Computer Languages • High-Level language • CPU independent • Combine algebraic expressions • A compiler will translate a high-level source file into machine code • Syntax is very important! • Some developers use an IDE to

  19. Entering, Translating, and Running a High-Level Language Program

  20. Flow of information during program execution

  21. Software Development Method • PAD IT Man! • Problem Definition • Analyze the Problem • Design Algorithm • Implement the Algorithm • Test and verify the program • Maintain and Update the program

  22. Software Development Method (example) • Problem definition: Your job requires you to convert miles to kilometers. • Analysis: • Program input: distance in miles • Program output: distance in kilometers • Relevant Formula: 1 mile = 1.609 kilometers

  23. Software Development Method (example) Design • Get the distance in miles • Convert the distance to kilometers • Distance in kilometers is 1.609 times the distance in miles • Display the distance in kilometers Check the algorithm = 10 miles times 1.609 = 16.09km

  24. Software Development Method (example) • Implement and test

  25. Chapter 2 • C Language Elements • Variable Declaration and Data Types • Executable Statements • General Form of a C program • Formatting Numbers in Output • Interactive Mode, Batch Mode, and Data Files • Common Programming Errors

  26. Variable Declaration and Data Types • Variable – a name associated with a memory cell whose value can change • Variable Declaration – statements that communicate to the compiler the names of the variables in the program and the kind of information it stores. • Data Types – a set of values and operations that can be performed on those values

  27. Executable Statements • Assignment Statements – an instruction that stores a value or a computational result in a variable

  28. Executable Statements

  29. I/O Statements - printf • printf is an output statement supplied by the stdio.h library • printf is executed by running a function call • printf(“That equals %f kilometers.\n”, kms); • Function arguments • Format String (placeholders – multiple placeholders) • Print list • \n and the cursor

More Related