Introduction To Computers and Programming
Introduction To Computers and Programming
Introduction to
Computers and
Programming
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Agenda
1.1 Why Program ?
1.2 Computer Systems: Hardware and Software
1.3 Programs and Programming Languages
1.4 What Is a Program Made of ?
1.5 Input, Processing, and Output
1.6 The Programming Process
1.7 Procedural and Object-Oriented Programming
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
1.1
Why Program?
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Why Program?
Computers can do many different jobs because they are programmable.
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Main Hardware Component Categories:
1. Central Processing Unit (CPU)
2. Main Memory
3. Secondary Memory / Storage
4. Input Devices
5. Output Devices
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Main Hardware Component Categories
Figure 1-2
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Central Processing Unit (CPU)
Comprised of:
Control Unit
Retrieves and decodes program instructions
Coordinates activities of all other parts of computer
Arithmetic & Logic Unit
Hardware optimized for high-speed numeric calculation
Hardware designed for true/false, yes/no decisions
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
CPU Organization
Figure 1-3
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Main Memory
• Also called Random Access Memory (RAM)
• It is volatile. Main memory is erased when program
terminates or computer is turned off
• Memory Organized as follows:
– byte: 8 consecutive bits. Bytes have addresses.
– bit: smallest piece of memory. Has values 0 (off, false) or 1
(on, true)
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Main Memory
• Addresses – Each byte in memory is identified by a
unique number known as an address.
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Input Devices
• Devices that send information to the computer from
outside
• Many devices can provide input:
– Keyboard, mouse, scanner, digital camera, microphone
– Disk drives, CD drives, and DVD drives
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Output Devices
• Output devices are devices that the information is sent to
then these devices will format and present it.
• Common output devices are :
– Monitors, printers, and speakers
– Disk drives, USBs, CD drives, and DVD drives
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh
Software-Programs
• Software control all the operations of computer
• Categories of software:
– System software: programs that control and manage the
computer hardware and the programs that run on them.
Examples: operating systems, utility programs, software
development tools
– Application software: programs that provide services to the
user. Examples : word processing, games, programs to solve
specific problems
Copyright © 2012 Pearson Education, Inc. Updated and Recorded by Vo Minh Thanh