An Introduction to - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

An Introduction to

Description:

use large data words...64 bits or greater. mostly used for military defense and large business data processing ... not quite so cryptic ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 37
Provided by: anniegro
Category:

less

Transcript and Presenter's Notes

Title: An Introduction to


1
Chapter 2
  • An Introduction to
  • Computers
  • Microcomputers
  • Microprocessors

2
Types of Computers
  • Mainframes
  • largest and most powerful
  • massive amounts of memory
  • use large data words64 bits or greater
  • mostly used for military defense and large
    business data processing
  • examples IBM 4381, Honeywell DPS8
  • Minicomputers
  • scaled-down mainframes
  • smaller data words32 bits typically
  • used for business data processing, industrial
    control, and scientific research
  • examples DEC VAX 6360, Data General MV/800II,
    Sun Sparcstation

3
  • Microcomputers
  • range from small controllers that work with 4 bit
    words to the PCs we are familiar with that work
    with 32 bit words
  • modern microcomputers are becoming
    indistinguishable from early minicomputersfunctio
    nally speaking
  • large variety of uses from specialized controls
    like a printer to personal publishing
  • the CPU is usually 1 Integrated Circuit (IC)
    called a microprocessor
  • examples Intel 8051 controller chip, IBM PC,
    Apple Macintosh
  • Supercomputers
  • fastest and most powerful mainframes
  • contains multiple central processors
  • used for scientific applications, and number
    crunching
  • now have teraflop performance

4
Timesharing Systems
  • A computer, usually a mainframe or mini, can
    serve many users by dividing its time among the
    users
  • based on the fact that the rate at which a user
    enters data is extremely slower than the rate at
    which the computer can process that data
  • this is usually transparent to the user

5
Multitasking Systems
  • A computer can appear to be doing many tasks at
    the same time
  • becausethe computer is much faster than the
    machines connected to it, and the processes
    controlling those machines

6
A Bottleneck
  • The mainframe or minicomputer becomes
    saturated/overloaded
  • computer response time increases as the number of
    users and the amount of work increases
  • What if something happens to the computer?
  • Work stoppage
  • Potentially lots of lost data in case of a disk
    crash
  • What about maintenance?

7
Relieve the Bottleneck
  • Distribute the work!
  • This is a distributed processing system
  • Each user has a microcomputer (PC) connected over
    a LAN (Local Area Network) or even a WAN (Wide
    Area Network)
  • Now they can do some computing locally, and use
    the central computer as needed

8
A Distributed Environment
9
Microcomputer Structure
  • Central Processing Unit (CPU)
  • Memory
  • Input/Output (I/O) circuitry
  • Buses
  • Address bus
  • Data bus
  • Control bus

10
Memory
  • A mixture of RAM and ROMmay also include
    magnetic hard disks and optical disks
  • 2 purposes of memory
  • store the binary codes for the sequence of
    instructions specified by programs
  • store binary data that the computer needs to
    execute instructions

11
I/O
  • the way the computer communicates with the
    outside world
  • peripherals are connected to the I/O ports
  • printers, modems, keyboard, mouse, scanner
  • Universal Serial Bus (USB)
  • ports
  • physical devices needed to interface with the
    computers internal buses
  • actually a set of D flip-flops connected in
    parallel
  • how do we distinguish between an input port and
    an output port?

12
CPU
  • the brains of the computer
  • its job is to fetch instructions, decode them,
    and then execute them
  • contains
  • an Instruction Pointer register which contains
    the address of the next instruction
  • general purpose registers for temporary storage
  • circuitry to generate signals to the control bus

13
Address bus
  • consists of 16,20, 24, or 32 parallel signal
    lines (wires)
  • these lines contain the address of the memory
    location to read or written
  • just how many unique addresses can an address bus
    specify?

14
Data bus
  • consists of 8,16, or 32 parallel signal lines
  • these are bi-directional meaning that data can
    be read from/written to either memory or a port
  • only one device at a time can have its outputs
    enabled, even though many will have their outputs
    connected to the same data bus
  • this requires the devices to have three-state
    output

15
Control bus
  • consists of 4 to 10 parallel signal lines
  • CPU sends signals along these lines to memory and
    to I/O ports
  • examples Memory Read, Memory Write, I/O Read,
    I/O Write

16
A Typical CPU
17
Typical CPU Behavior
  • Goal
  • Read a word of data from a memory location
  • Process
  • CPU first sends out the address along the address
    bus to the memory device
  • CPU then sends the Memory Read signal along the
    control bus
  • the output from the memory device travels back to
    the CPU along the data bus

18
Executing a 3 Instruction Program
  • 1. Input a value from a keyboard connected to
    the port at address 05H.
  • 2. Add 7 to the value read in.
  • 3. Output the result to a display connected to
    the port at address 02H.

19
Executing a 3 Instruction Program (cont.)
20
Microprocessor Evolution
  • microcomputers are commonly categorized by the
    number of bits that their ALU can work with at a
    time
  • regardless of the number of address lines or data
    lines
  • the first commercial microprocessor was the Intel
    4004a 4-bit device combined with other devices
    to make a calculator
  • next came the Intel 8008an 8-bit device, but it
    required many additional devices to be a
    functional CPU
  • Intel 8080another 8-bit device, but it only
    required 2 additional devices
  • it also used different transistors making it much
    faster, and started the 2nd generation of
    microprocessors
  • then Motorola entered the market with the MC6800

21
Directions taken by Microprocessors
  • Embedded controllers
  • used to control smart machines
  • printers, auto braking systems
  • also called microcontrollers
  • Bit-slice processors
  • custom-designed hardware and custom-designed
    instruction set made by connecting deviceseach
    part becomes a slice needed for a specific
    application
  • these were created because general-purpose CPUs
    were not fast enough or did not have a rich
    enough instruction set

22
General Purpose CPUs
  • Intel released the 8086, a 16-bit microprocessor,
    in 1978
  • Motorola followed with the MC68000 as their
    16-bit processor
  • the 16-bit processor works with 16 bit words,
    rather than 8 bit words
  • instructions are executed faster
  • provide single instructions for more complex
    instructionsmultiply and divide

23
32 bit Processors
  • 16 bit processors evolved into 32 bit processors
  • now able to work with gigabytes (109 bytes) and
    terabytes (1012 bytes)
  • Intel released the 80386
  • Motorola released the MC68020

24
The 8086 Microprocessor Family
  • Characteristics
  • 16 bit microprocessor
  • 16 bit data bus
  • it can read from or write to memory and I/O ports
    either 8 or 16 bits at a time
  • 20 bit address bus
  • it can address 220 memory locations
  • each location is 1 byte (8 bits) wide, thus 16
    bit words will require consecutive memory
    locations

25
Members of this family
  • 8088
  • same as 8086 but has an 8 bit data bus
  • 80186/80188
  • enhanced instruction setbut still backwards
    compatible
  • 80286
  • designed for a multi-user, multi-tasking
    microcomputer
  • users a virtual address mode to prevent collision
    of users programs
  • 80386/80486
  • first Intel 32 bit processor
  • can directly address up to 4 GB of memory

26
Internal Architecture
  • Bus Interface Unit (BIU)
  • handles all transfers of data and addresses on
    the buses for the execution unit
  • Execution Unit (EU)
  • where stuff really happens
  • tells BIU where to fetch an instruction, decodes
    it, and then executes it

27
Execution Unit (EU)
  • contains control circuitry for internal
    operations
  • a decoder for translating instructions
  • a 16-bit ALU
  • registers

28
The Flag Register
  • a 16 bit register containing nine active flags
  • 6 conditional flags carry, parity, aux carry,
    zero, sign, and overflow
  • 3 control flags trap, interrupt, and direction
  • a flag is a flip-flop which indicates some
    condition produced by executing an instruction,
    or controls certain operations

29
General Purpose Registers
  • there are 8 8-bit general purpose registers
  • AH, AL
  • Accumulator
  • BH, BL
  • Base
  • CH, CL
  • Count
  • DH, DL
  • Data
  • can pair these together to store 16-bit
    words...AX, BX, CX, DX

30
The BIU Queue
  • if the BIU is not busy...the EU is decoding or
    executing without the need of any buses...it can
    pre-fetch up to 6 instruction bytes
  • these instructions are stored in a FIFO register
    set called a queue
  • an example of pipelining
  • doesnt provide an advantage when the instruction
    being executed is JMP or CALL

31
Segment Registers
  • the 220 bytes of addresses are divided in to 4
    64KB segments
  • code segment - CS register stores upper 16 bits
    of its starting address
  • where instructions are coming from
  • stack segment - SS register stores upper 16 bits
    of its starting address
  • stores addresses and data while a subprogram is
    executed
  • data segment - DS register stores upper 16 bits
    of its starting address
  • holds data
  • extra segment - ES register stores upper 16 bits
    of its starting address
  • holds more data
  • the lower 4 bits are always zero! why?
  • example if, the starting address of the code
    segment is 348A0, then CS contains the value
    348AH...this is called the segment base
  • the segments can overlap in the case of small
    program

32
Instruction Pointer Register (IP)
  • contains the 16-bit address of the next code byte
    in the code segment
  • this is called an offsetit must be added to the
    address contained in the CS register, which is
    called the base
  • example
  • CS contains the value 348AH
  • IP contains the value 4214H
  • whats the physical address of the next code
    byte?
  • you can represent an address in segment
    baseoffset form348A4214

33
Stack Pointer Register (SP)
  • Holds the 16-bit offset from the start of the
    stack segment where a word was most recently
    stored
  • the top of the stack
  • add this offset to the contents of the SS
    register to get the physical addresssound
    familiar?
  • you can use SSSP notation to represent physical
    address

34
Types of Programming Languages
  • Machine code
  • a series of 0s and 1s representing instructions
    to be executed
  • machine specific
  • Assembly language
  • not quite so cryptic
  • typically use a 4 field representation label
    field, opcode field, operand field, comment field
  • example NEXT ADD AL, 07H Add correction
    factor\
  • translated into machine code
  • often used when working very close to the
    hardware
  • High level language
  • english-like, I.e. BASIC, Pascal, C, C
  • easier and often quicker to write
  • requires a compiler (translator) to translate
    into machine code
  • can embed assembly instructions in some higher
    level languages

35
Accessing Immediate and Register Data
  • addressing modes
  • specify the different ways the processor can
    access data
  • immediate addressing mode
  • MOV CX, 437BH
  • puts the specified value, 437BH directly into CX
  • can you do this in 2 instructions?
  • register addressing mode
  • MOV CX, AX
  • a register is the source of the operand
  • MOV CX, BL ...legal?
  • direct addressing mode
  • MOV CX, 437AH
  • MOV 437AH, CX
  • an effective address (offset) is the source of
    the operand

36
Why Use Segmented Model?
  • Easier to manipulate 16 bit numbers than 20 bit
    numbersone less byte to deal with
  • Easier to timeshare and multitask
  • each users process can get its own logical
    segments for its code and data
  • these values are stored in the Process Control
    Block (PCB) for a process when it is swapped out.
Write a Comment
User Comments (0)
About PowerShow.com