lecture no 10 extending the processor’s power to other devices microcomputer processors creating...

52
Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Upload: jane-sharp

Post on 02-Jan-2016

257 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Lecture No 10

Extending the Processor’s Power to Other Devices

Microcomputer ProcessorsCreating Computer Programs

Page 2: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Extending the Processor’s Power to Other Devices

• All the components of the computer are tied into CPU by BUS.

• Can plug the devices into existing Sockets or Ports.• If no Ports available then install a board that includes

the required ports.

Page 3: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Extending the Processor’s Power to Other Devices

• Parallel Ports:- 25 holes.- It transfers 8 bits at a time.- Makes Data transfer several times faster than serial

ports.- Monitor is connected to the system through Parallel

port.

Page 4: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Extending the Processor’s Power to Other Devices

• Serial Ports:• 9-25 pins

• Data bits are transmitted one at a time.• PCs come with dedicated serial ports for

keyboard and mice.• UART (Universal Asynchronous Receiver

Transmitter):• It converts parallel data from the bus into

serial data that flows through serial ports.

Page 5: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Extending the Processor’s Power to Other Devices

• Specialized expansion ports:

- Extends the computer bus to establish links with peripheral devices.

Page 6: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Examples of Specialized Expansion Ports

• SCSI: (Small Computer System Interface)- 1 card, daisy chain the devices and Fast.• USB - connect up to 127 devices, 1 or 2 USB ports. • IEEE 1394 (FireWire)- 1 port. Used as standard for plugging video and High

data throughput devices.• Musical Instrument Digital Interface (MIDI) – Plug in musical instruments. For recording, writing

and performing. Lighting, drum machines, synthesizers.

Page 7: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

System Expansion

• When a user wants to have more of memory than the normally used memory or more sound, graphics capabilities than the normal ones, then that can be possible through Add-in Boards or PC cards.

Page 8: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Add-in Boards

• Add in Boards expand the functions of the system.• Card-Like pieces of circuitry that plug into Expansion

Slots within the system.• These enable the users to add specific types of

peripheral devices or expand the capabilities of the system.

• E.g. Accelerator Board, Fax\Modem Board, Sound Board etc

Page 9: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Plug and Play

• The Plug and Play standard makes it easier to install hardware via an existing port or expansion slot.

• Plug in the hardware, OS detects a new components automatically, checks the correct drivers and load the required necessary files.

Page 10: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

PC Card

• Another type of expansion card.• Almost the size of a credit card. • A PC card fits into a slot on the back or side of the

notebook computer to provide new functions.• It is used for variety of purposes, can house Disk

drives, network cards, memory.• Three types:• Type I ( To add Memory), Type II ( To add

Networking or sound capability), Type III ( Removable Hard drives)

Page 11: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Microcomputer Processors

• Intel

• Advanced Micro Devices (AMD)

• Motorola processors

• RISC

• Parallel processing

Page 12: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

CPUs Used in Personal Computers – Intel Processors

• Since 1978, Intel's processors have evolved from the 8086 and the 8088 to the 80286, 80386 and 80486, to the Pentium family of processors. All are part of the 80x86 line.

• Intel's Pentium family of processors includes the Pentium, Pentium Pro, Pentium with MMX, Pentium II,

Pentium III, IV, Celeron, and Xeon processors.

• The earliest Intel processors included only a few thousand transistors. Today's Pentium processors include 9.5

million transistors or more.

Page 13: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Latest Technology - Intel

• Speed doubles every 18 months.

• Pentium 4- up to 3.2 GHz, 50 Million transistors

• Pentium III /Xeon- up to 2.0 GHz, 50 Million

transistors.

• Celeron- up to 1.8 GHz, 40 Million transistors

• Itanium- up to 2 GHz, 32 bit.

• Centrino Mobile Technology.

Page 14: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs
Page 15: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

CPUs Used in Personal Computers –AMD Processors

• Advanced Micro Devices was long known as a provider of lower-performance processors for use in low-cost computers.

• With its K6 line of processors, AMD challenged Intel's processors in terms of both price and performance.

• With the Athlon, AMD broke the 1.0 GHz barrier, claiming the fastest processor title for the first time in IBM-compatible computers.

Page 16: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs
Page 17: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

CPUs Used in Personal Computers –Motorola Processors

• Motorola makes the CPUs used in Macintosh (680x0) and PowerPC computers.

• 1) 680x0 family 2) PowerPc Family

• Macintosh processors use a different basic structural architecture than IBM-compatible PC processors.

• With the release of the G3 and G4 PowerPC processors, Macintosh computers set new standards for price and performance. New G5, 64-bit.

Page 18: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Apple’s G4 computers are based on Motorola processors

Page 19: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

CPUs Used in Personal Computers- RISC Processors

• Most PCs are based on complex instruction set computing (CISC) chips which contain large 200-300 instruction sets.

• Reduced Instruction Set Computing (RISC) processors use smaller instruction sets. This enables them to process more instructions per second than (CISC) chips.

• RISC processors are found in Apple's PowerPC systems, as well as many H/PCs, workstations. Popular in minicomputers (AS/400), and mainframes.

Page 20: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Compaq’s Alpha Server computers are based onRISC processors

Page 21: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

CPUs Used in PC’s - Parallel Processing

or Symmetric multiprocessing (SMP)• In parallel processing, multiple processors are used in

a single system, enabling them to share processing tasks.

•In a Massively Parallel Processor (MPP) system, many processors are used.•Some MPP systems utilize thousands of processors simultaneously.

Page 22: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Creating Computer Programs

Page 23: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Computer Program

• A set of instructions or statements, also called code, to be carried out by the computer’s CPU.

Page 24: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Examples of Common Program Extensions

• Executable (.EXE) files• Dynamic link library (.DLL) files• Initialization (.INI) files• Help (.HLP) files

Page 25: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Files

• Typically, a program is stored as a collection of files. Some common file types used in programs are:

• Executable (.EXE) files actually send commands to the processor.

• Dynamic Link Library (.DLL) files are partial .EXE files.

• Initialization (.INI) files contain configuration information for a program.

• Help (.HLP) files contain information for the user.

Page 26: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Interrupt

• A preprogrammed set of steps that the CPU follows.

Page 27: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Machine Code

• Also called machine language.

• The 1s and 0s that form the language of computer hardware.

Page 28: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Programming Language

• A Higher-level language than machine language, enables the programmer to describe a program using a variation of basic English.

Page 29: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Source Code

• File where programming instructions are kept.

Page 30: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Ways to Convert Source Code to Machine Code

• Compiler – converts a source code program into machine language. Creates an executable file. – C++, Java, COBOL, Fortran, Visual Basic

• Interpreter – translates the code ‘on the fly’. Results immediately. No executable file produced. – BASIC, Unix, Perl

Page 31: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Program Control Flow

• The order in which program statements are executed

Page 32: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

How Programs Solve Problems – Program Control Flow

• The order in which program statements are executed is called program control flow.

• To determine program control flow, programmers may use a flowchart to map the program's sequence.

• Programmers may also create a simple text version of a program's code – called pseudo code – to determine how the program will flow.

Page 33: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Flowchart

• A chart that uses arrows and symbols to show the order in which a program’s statement will run.

Page 34: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs
Page 35: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Pseudo code

• Simplified text version of programming code.

Page 36: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Algorithm

• The steps represented in a flowchart that lead to a desired result are called an algorithm.

Page 37: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Common Flow Patterns

• To determine when and where to pass program control, a developer may use conditional statements or loops.

• A conditional statement determines whether a condition is true. If so, control flows to the next part of the program.

• A loop repeats again and again until a condition is met. Control then passes to another part of the program.

Page 38: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Common Flow Patterns

• Conditional statement:- A conditional statement determines whether a

condition is true. If so, control flows to the next part of the program.

• Loop:- A loop repeats again and again until a condition is

met. Control then passes to another part of the program.

Page 39: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs
Page 40: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Examples of Loops

• For

• While

• Do-while

Page 41: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

How Programs Solve Problems - Variables and Functions

• A variable is a named placeholder for data that is being processed. Programs contain variables to hold inputs from users.

• A function is a set of steps that are followed to perform a specific task. By assembling a collection of functions together, a developer can build a complete program.

Page 42: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Structured Programming

• The practice of building programs using a set of well-defined structures.

Page 43: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Three Control Structures of Structured Programming

• Sequence structure (flow of the program) – branch

• Selection structures (if blocks – T/F)

• Repetition or looping structures (checks a condition – loop repeats while condition is true

Page 44: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Syntax

• Programming language rules.

Page 45: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Syntax Examples

• Provide information in a certain order and structure

• Use special symbols

• Use punctuation (sometimes)

Page 46: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Three Programming Categories Based on Evolution

• Machine languages

• Assembly languages

• Higher-level languages

Page 47: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Fading Third-Generation Languages

• FORTRAN (FORmula TRANslator)

• COBOL (COmmon Business Oriented Language)

• BASIC (Beginner’s All-Purpose Symbolic Instruction Code)

• Pascal

Page 48: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Thriving Third-Generation Languages

• C

• C++

• Java

• ActiveX

Page 49: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Fourth-Generation Languages (4GLs)

• Builds programs with a front end, which is an interface that hides much of the program from the user

• Provides prototypes, which are samples of the finished programs.

Page 50: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Examples of Fourth-Generation Languages

• Visual Basic (VB)

• VisualAge

• Authoring environments

Page 51: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

Fifth-Generation Languages (5GLs)

• Advanced authoring environments considered by some to be 5GLs

Page 52: Lecture No 10 Extending the Processor’s Power to Other Devices Microcomputer Processors Creating Computer Programs

World Wide Web Development Languages

• HyperText Markup Language (HTML)

• Extensible Markup Language (XML)

• Wireless Markup Language (WML)

• Dreamweaver

• Flash

• Director