lec1

Cards (49)

  • Modern computer categories
    • Embedded computers
    • Personal computers
    • Servers and Enterprise systems
    • Supercomputers and Grid computers
    • "Cloud" computing
  • Embedded computers
    1. Integrated into a larger device or system to automatically monitor and control a physical process or environment
    2. Used for a specific purpose rather than for general processing tasks
    3. Typical applications include industrial and home automation, appliances, telecommunication products, and vehicles
  • Personal computers
    1. Widespread use in homes, educational institutions, and business and engineering office settings
    2. Support a wide variety of applications such as general computation, document preparation, computer-aided design, audiovisual entertainment, interpersonal communication, and internet browsing
    3. Classifications: Desktop, Workstation, Portable/Notebook
  • Servers and Enterprise Systems
    1. Large computers meant to be shared by a potentially large number of users who access them from some form of PC over a network
    2. May host large databases
    3. Provide information processing for government agencies or commercial organizations
  • Supercomputers and Grid computers
    1. Offer the highest performance
    2. Most expensive and physically largest category of computers
    3. Used for demanding computations in weather forecasting, engineering design and simulation, and scientific work
    4. High cost
    5. Grid computers provide a cost-effective alternative by combining a large number of PCs and disk storage units in a physically distributed high-speed network, called a grid
    6. Managed as a coordinated computing resource
  • Cloud computing
    1. The latest trend in access to computing facilities
    2. PC users access widely distributed computing and storage server resources for individual, independent, computing needs
    3. Internet provides the necessary communication facility
    4. Cloud hardware and software service providers operate as a utility, charging on a pay-as-you-use basis
  • Functional Units of a computer
    • Memory > Interconnection network > I/O or Processor(arithmetic + control)
  • Output unit
    1. Sends processed results to the outside world
    2. Typical devices include text and graphics displays, printers
    3. Some units like graphic displays provide both output and input functions through touchscreen capability, hence named input/output unit
  • Input unit

    1. Computers accept coded information through input units
    2. Typical devices include keyboard, touchpad, mouse, microphone, camera, communication lines, the Internet
  • Processor
    • Composed of Arithmetic and Logic circuits, Timing and control circuits, Registers
  • Arithmetic and Logic Unit (ALU)

    • Executes most computer operations
    • Initiates arithmetic or logic operations by bringing required operands into the processor
    • Operates on data stored in high‐speed storage elements called registers
    • Each register can store one word of data
    • Access times to registers are shorter than access times to the cache on the processor chip
  • Primary (Main) memory
    • Fast memory that operates at electronic speeds where programs must be stored while being executed
    • Consists of large number of semiconductor storage cells, each capable of storing one bit of information
    • Cells are handled in groups of fixed size called words
    • Word length of the computer is typically 16, 32, or 64 bits
    • Each word has a distinct address associated with its location
    • Addresses are consecutive numbers, starting from 0
    • A particular word is accessed by specifying its address and issuing a control command to the memory
    • Random‐access memory (RAM) allows access to any location in a short and fixed time after specifying its address
    • Memory access time is typically <100ns
  • Cache memory
    • An adjunct to main memory to facilitate high instruction execution rate
    • Smaller faster RAM unit used to hold sections of a program currently being executed, along with associated data
    • Tightly coupled with the processor and usually contained on the same integrated‐circuit chip
  • Secondary memory
    • Used when large amounts of data and many programs must be stored
    • Less expensive and permanent compared to primary memory
    • Access times are longer than for primary memory
    • Examples include magnetic disks, optical disks (DVD and CD), and flash memory devices
  • Control Unit

    • Coordinates the operation of memory, ALU, and I/O units
    • Sends control signals to other units and senses their states
    • Physically distributed throughout the computer with a large number of control lines for timing and synchronization
  • Operation of a computer
    1. Accepts information through an input unit and stores it in memory
    2. Fetched under program control into an arithmetic and logic unit for processing
    3. Processed information leaves through an output unit
    4. Directed by the control unit
  • Your Program
    • Application software
    • System software
    • Compiler: translates HLL code to machine code
    • Operating System: supervising program that interfaces the user’s program
  • Fetching and executing instructions
    1. The processor control circuits send the address in PC to memory; issue Read
    2. Load instruction from memory into IR
    3. Increment PC to point to the next instruction
    4. Send address LOC to memory; issue Read
    5. Load word from memory into register R2
  • Processor Components
    1. The program counter (PC) register holds the memory address of the next instruction to be fetched and executed
    2. The instruction register (IR) holds the current instruction
    3. General-purpose registers hold data and addresses
    4. Control circuits and the arithmetic and logic unit (ALU) fetch and execute instructions
    5. The processor-memory interface is a circuit which manages the transfer of data between the main memory and the processor
  • Number Representation and Arithmetic Operations
    1. Numbers in a computer system are represented by a string of bits, called a binary number
    2. An n-bit number can represent an unsigned integer value in the range from 0 to 2^n - 1
    3. A 32-bit integer in positional binary notation has its bits labeled
  • Interrupts
    1. A device can raise an interrupt signal to cause a dedicated service program to be executed
    2. The interrupt signal causes the processor to suspend the current program and execute an interrupt-service routine
  • Handling I/O devices
    1. An application program can read data from an input device
    2. An application program can write data to an output display screen
    3. An application program can sense the readiness of an I/O device to perform a transfer
    1. bit number
    Representation of an unsigned integer value in the range from 0 to 2^n - 1
  • 32-bit integer
    Bits labeled as b31 b30 ... b1 b0
  • Sign-and-magnitude
    • Negative values are represented by changing the most significant bit from 0 to 1 in the corresponding positive value
  • Ways to represent signed integers
    • Sign-and-magnitude
    • 1’s complement
    • 2’s complement
  • Binary number
    A string of bits representing a number
  • 1’s complement
    • Negative values are obtained by complementing each bit of the corresponding positive number
  • To form the value -5, complement all bits of (+5) 0101 to obtain 1010 and then add 1 to obtain 1011
  • Addition of unsigned integers
    Add their n-bit representations, ignoring the carry-out bit from the most significant bit position
  • 2’s complement
    • Done by subtracting the number from 2^n or by adding 1 to the 1’s complement of that number
  • Signed integers
    Integers with a leftmost bit indicating the sign (0 for positive, 1 for negative)
  • 2’s complement representation is used in modern computers
  • Overflow in Integer Arithmetic
    When adding unsigned numbers, a carry-out of 1 from the most significant bit position indicates that an overflow has occurred. This is not always true when adding signed numbers. When adding two numbers in 2’s-complement representation, if both summands have the same sign, an overflow has occurred when the sign of the sum is not the same as the signs of the summands. When subtracting two numbers in 2’s-complement representation, overflow may occur only if the signs of A and B are different. Overflow occurs if the sign of the result, R, is different from the sign of A, or if the sign of the result, R, is the same as the sign of B.
  • Sign extension
    To represent a signed number in 2’s-complement form using a larger number of bits, repeat the sign bit as many times as needed to the left. This operation is called sign extension. Replicate the sign bit to extend 4-bit signed integers to 8-bit signed integers
  • 32-bit signed integer numbers have a limited range (−231 to +231 − 1) ≈ (−1010 to +1010)
  • Overflow examples

    When the answer does not fit in the number range
  • The most important measure of the performance of a computer is how quickly it can execute programs. Factors affecting speed include the speed of electronic circuits in the processor, access times to the cache and main memory, and the design of the instruction
  • Performance of a computer
    • The most important measure is how quickly it can execute programs
    • Factors affecting speed: Speed of electronic circuits in the processor, Access times to the cache and main memory, Design of the instruction set, Number of operations that can be done at the same time (parallelism), Compilers that translate programs to machine language
  • Response Time and Throughput

    • Response time: How long it takes to do a task
    • Throughput: Total work done per unit time
    • Factors affecting response time and throughput when replacing the processor with a faster version or adding more processors