Presentation is loading. Please wait.

Presentation is loading. Please wait.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.

Similar presentations


Presentation on theme: "©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing."— Presentation transcript:

1

2 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing

3 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Chapter Topics –Computer Systems: Hardware and Software –Programming Languages –The Complete Programming Process –Bits and Bytes –Object-Oriented Programming

4 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Computer hardware components are the physical pieces of the computer. The major hardware components of a computer: –The central processing unit (CPU) –Main memory –Secondary storage devices –Input and Output devices

5 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware

6 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Central Processing Unit Instruction (input)Result (output) Arithmetic Logic Unit Control Unit CPU

7 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Central Processing Unit –The CPU performs the fetch, decode, execute cycle in order to process program information. Fetch The CPU’s control unit fetches, from main memory, the next instruction in the sequence of program instructions. Decode The instruction is encoded in the form of a number. The control unit decodes the instruction and generates an electronic signal. Execute The signal is routed to the appropriate component of the computer (such as the ALU, a disk drive, or some other device). The signal causes the component to perform an operation.

8 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory known as random-access memory (RAM) RAM contains: –currently running programs –data used by those programs RAM is volatile, which means that when the computer is turned off, the contents of RAM are erased.

9 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory RAM is divided into units called bytes. A byte consists of eight bits. Each bit holds a binary value 0 or 1. Each byte in memory is assigned a unique number known as an address.

10 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Main Memory A section of memory is called a byte. A section of two or four bytes is often called a word. Main memory can be visualized as a column or row of cells.0x000 0x001 0x003 0x002 0x004 0x005 0x006 0x007 A byte is made up of 8 bits. 10101010

11 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Binary (base-2) vs. Decimal (base-10) Base-2 to Base-10 conversion –1110 2 = 1×2 3 + 1×2 2 + 1×2 1 + 0×2 0 = 14 10 Base-10 to Base-2 conversion Base-2 table 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1024 512 256 128 64 32 16 8 4 2 1 e.g. given a decimal number 156 1024 512 256 128 64 32 16 8 4 2 1 1 0 0 1 1 1 0 0 156 10 = 10011100 2

12 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Secondary Storage Devices Secondary storage devices are capable of storing information for longer periods of time (non-volatile). Common Secondary Storage devices: Hard drive Floppy drive CD RW drive CD ROM DVD drive Compact Flash card

13 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Input Devices Input is any data the computer collects from the outside world. That data comes from devices known as input devices. Common input devices: –Keyboard –Mouse –Scanner –Digital camera

14 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Hardware Output Devices Output is any data the computer sends to the outside world. That data is displayed on devices known as output devices. Common output devices: –Monitors –Printers Some devices such as disk drives perform input and output and are called I/O devices.

15 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Software refers to the programs that run on a computer. There are two classifications of software: –Operating Systems –Application Software

16 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems An operating system (OS) has two functions: –Control/Manage the system resources CPU scheduling Memory allocation –Provide the user with a means of interaction with the computer Operating systems can be either single tasking or multi-tasking.

17 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems A single tasking operating system is capable of running only one program at a time. –DOS A multitasking operating system is capable of running multiple programs at once. –Windows –Unix –Mac OS X

18 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Operating Systems Operating systems can also be categorized as single user or multi-user. –A single user operating system allows only one user to operate the computer at a time. –Multi-user systems allow several users to run programs and operate the computer at once.

19 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Single User Systems Examples: DOS Windows 95/98/ME

20 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Multi-User Systems Examples: Unix, Linux BSD Modern Windows Versions NT/2000/XP/Vista/7/8 OS/X

21 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Computer Systems: Software Application Software Application software provides a more specialized type of environment for the user to work in. Common application software: –Spreadsheets –Word processors –Accounting software –Tax software –Games

22 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages A programming language is a special language used to write computer programs. A program is a set of instructions with rigorous syntax a computer follows in order to perform a task. An algorithm is a set of well defined steps to complete a task. –English-like pseudo code –For example, to compute gross pay Get payroll data Calculate gross pay Display gross pay

23 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 1GL A computer needs the algorithm to be written in machine language (also called first generation programming language). –Machine language is written using binary numbers. Each CPU has its own machine language. –Motorola 68000 series processors –Intel x86 series processors –ARM processors, etc. Example of a machine language instruction: 1011010000000101 Machine code is tedious and unfriendly to human.

24 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 2GL Programmers developed assembly language (also called second generation programming language or low level language). Example: MOV id3, R2 MUL #60.0, R2 MOV id2, R1 ADD R2, R1 MOV R1, id1 Assembler made things easier but was also processor dependent.

25 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages: 3GL High level programming languages followed that were not processor dependent. Some common programming languages: Java BASICC++ C Python COBOL JavaScript Ruby PHP C# Visual Basic Pascal

26 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages 4GL and 5GL –Closer to natural languages –The language environment provides visual programming tools that allow non-programmers to create software applications

27 ©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Programming Languages Common Language Elements There are some concepts that are common to all programming languages. Common concepts: –Keywords –Operators –Punctuation –Programmer-defined identifiers –Strict syntactic rules


Download ppt "©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing."

Similar presentations


Ads by Google