Computer Architecture Overview
42 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary function of the input unit in a computer?

  • To accept coded information (correct)
  • To coordinate between different computer parts
  • To store data permanently
  • To display processed results to the user
  • Which device is used as a graphic input device?

  • Joystick (correct)
  • Microphone
  • Printer
  • Monitor
  • What is an example of hard copy output?

  • A video displayed on a screen
  • An audio file played through speakers
  • A printed report (correct)
  • Data stored in cloud storage
  • Which of the following is NOT a function of the control unit?

    <p>Translating data into binary code</p> Signup and view all the answers

    What type of output is considered non-permanent?

    <p>Text displayed on a computer screen</p> Signup and view all the answers

    Which of the following devices would serve dual functions of input and output?

    <p>Graphic display</p> Signup and view all the answers

    Which of the following types of output includes multimedia?

    <p>Combination of text and graphics</p> Signup and view all the answers

    Microphones are primarily used in computers to capture which type of input?

    <p>Audio</p> Signup and view all the answers

    What is the main characteristic of direct addressing mode?

    <p>Uses an address field that directly refers to the operand's address</p> Signup and view all the answers

    What does indirect addressing mode involve?

    <p>Finding the operand's address by using the contents of a memory location</p> Signup and view all the answers

    Which of the following is an advantage of register addressing?

    <p>Allows for faster execution with no memory fetch</p> Signup and view all the answers

    What is a disadvantage of indirect addressing mode?

    <p>It requires multiple memory accesses to find the operand</p> Signup and view all the answers

    Which type of addressing allows for nested or cascaded operations?

    <p>Indirect Addressing</p> Signup and view all the answers

    What is a key feature of register addressing compared to direct addressing?

    <p>Has a very small address field</p> Signup and view all the answers

    Which of the following is NOT a characteristic of direct addressing mode?

    <p>Requires multilevel addressing</p> Signup and view all the answers

    What does the notation 'EA = (A)' indicate in indirect addressing?

    <p>The effective address is found in the address of A</p> Signup and view all the answers

    What does the instruction 'beq' do in MIPS architecture?

    <p>Branch to a label if two registers are equal</p> Signup and view all the answers

    What is the purpose of the instruction 'j' in MIPS?

    <p>Unconditionally jump to a specified address</p> Signup and view all the answers

    Which operand types are used in MIPS instructions?

    <p>Register, Memory, Immediate</p> Signup and view all the answers

    What is the function of data transfer instructions in MIPS?

    <p>Transfer data between memory and registers</p> Signup and view all the answers

    How does the 'skip' instruction operate unconditionally?

    <p>It increments the instruction counter to skip the next instruction</p> Signup and view all the answers

    In the context of conditional instructions, what happens if the condition is not met?

    <p>Execution continues with the subsequent instruction</p> Signup and view all the answers

    Which statement regarding MIPS branch instructions is true?

    <p>They can only branch if a comparison is true</p> Signup and view all the answers

    What is true about the operands used in arithmetic instructions in MIPS?

    <p>They must come from a predefined set of registers</p> Signup and view all the answers

    What does the 'shamt' field in a MIPS instruction specify?

    <p>The number of positions to shift</p> Signup and view all the answers

    When performing a shift left logical (sll) operation by 2 bits on the binary number 0000 1001, what is the resulting value?

    <p>0010 0100</p> Signup and view all the answers

    Which registers in MIPS assembly language correspond to registers $s0 to $s7?

    <p>16 to 23</p> Signup and view all the answers

    What does pseudodirect addressing utilize for the jump address?

    <p>The 26 bits of the instruction concatenated with the upper bits of the PC</p> Signup and view all the answers

    Which addressing mode involves using the upper bits of the Program Counter along with instruction bits?

    <p>Pseudo Direct Addressing Mode</p> Signup and view all the answers

    What is the result of performing a shift right logical (srl) operation by 3 bits on the binary number 0001 1000?

    <p>0000 00011</p> Signup and view all the answers

    In MIPS, what does the instruction 'bne register1, register2, L1' do?

    <p>Go to label L1 if register1 does not equal register2</p> Signup and view all the answers

    Which statement accurately describes RISC architecture?

    <p>RISC focuses on a simplified instruction set to reduce cycles per instruction.</p> Signup and view all the answers

    What is the primary goal of CISC architecture?

    <p>To allow a single instruction to perform multiple tasks</p> Signup and view all the answers

    What operation does the NOT instruction perform on a binary number?

    <p>Inverts all the bits</p> Signup and view all the answers

    Performing an AND operation on 1110 and 1010 results in what binary value?

    <p>1100</p> Signup and view all the answers

    How do RISC and CISC architectures differ in their approach to performance?

    <p>RISC minimizes cycles per instruction; CISC minimizes the number of instructions per program.</p> Signup and view all the answers

    What happens during a shift left logical operation?

    <p>Bits are shifted to the left and filled with 0s</p> Signup and view all the answers

    What limitation led to the evolution of CISC architecture?

    <p>The tedious and error-prone nature of assembly language programming</p> Signup and view all the answers

    Which addressing mode specifically refers to how the instruction and PC relate?

    <p>PC Relative Addressing Mode</p> Signup and view all the answers

    When shifting the binary value 0000 1001 left by 4 positions, what is the final value obtained?

    <p>1001 0000</p> Signup and view all the answers

    Which of the following statements best describes how RISC handles instruction complexity?

    <p>It uses a uniform, simplified set of instructions.</p> Signup and view all the answers

    Which of the following statements about logical operations in MIPS is true?

    <p>OR operation can produce a result that increases the number of 1s</p> Signup and view all the answers

    Study Notes

    Control Unit

    • Coordinates all actions of the computer

    Input Unit

    • Receives coded information from various sources
    • Keyboard translates key presses into binary code
    • Touchpad, mouse, joystick, trackball, and other graphic input devices are used with displays
    • Microphones capture audio
    • Cameras capture video
    • Digital communication facilities like the Internet provide input from other computers and servers

    Output Unit

    • Sends processed results to the user
    • Examples include printers
    • Graphic displays can provide both output (showing text and graphics) and input

    Types of Output

    • Hard copy: Printed on paper or other permanent media
    • Soft copy: Displayed on a screen or using other non-permanent methods

    Multimedia

    • Combines text, graphics, audio, and video

    Branch Instructions

    • beq (branch if equal):
      • Format: beq $s1, $s2, label
      • Branches to the address specified by the label if the value in register $s1 equals the value in register $s2
    • j (jump unconditional):
      • Format: j label
      • Unconditionally jumps to the address specified by the label

    Conditional Branch Instruction

    • Allows altering the program flow based on a condition

    Unconditional Branch Instruction

    • Always executes the branch

    Branch/Jump Instruction

    • A key instruction for program control

    Operands

    • Values used in arithmetic and logical operations

    Types of Operands

    • Register operands: Located in special hardware components called registers
    • Memory operands: Access data stored in memory
    • Constant or immediate operands: Fixed values directly included in instructions

    Register Operands

    • Restricted to a limited number of registers
    • Instructions involving arithmetic operations act only on registers

    Memory Operands

    • Data transfer instructions move data between memory and registers
    • ADD A: Adds the contents of the memory cell at address A to the accumulator

    Indirect Addressing

    • The effective address of the operand is the contents of the memory location whose address is in the instruction
    • ADD (A): Looks in the memory location A to find the address of the operand and then adds that operand to the accumulator
    • ADD (A), R0: Same as above, but the result is stored in register R0

    Register Addressing

    • The operand is the content of the register specified in the instruction
    • Example: Add R1, R2: Adds the content of register R1 to register R2
    • Advantages:
      • Shorter instructions
      • Faster instruction fetch
      • Very fast execution due to no memory access
    • Disadvantages:
      • Very limited address space

    MIPS Assembly Language

    • Uses specific registers for different purposes
    • $s0 to $s7 map to registers 16 to 23
    • $t0 to $t7 map to registers 8 to 15

    Logical Operations

    • Work on individual bits in the operands
    • Include AND, OR, NOT, and XOR

    Shift Operations

    • Used to move bits within a register
    • shamt (shift amount) specifies the number of positions to shift
    • Shift left logical (sll): Shifts bits to the left, filling with 0s; multiplying by 2 to the power of the shift amount
    • Shift right logical (srl): Shifts bits to the right, filling with 0s; dividing by 2 to the power of the shift amount

    AND Operations

    • Returns a 1 if both input bits are 1, and a 0 otherwise

    OR Operations

    • Returns a 1 if at least one input bit is 1, and a 0 otherwise

    NOT Operations

    • Inverts the bits of an operand; changes 0s to 1s and 1s to 0s

    Instructions for Making Decisions

    • Used to control program flow based on conditions
    • beq register1, register2, L1: Branch to label L1 if the values in register1 and register2 are equal
    • bne register1, register2, L1: Branch to label L1 if the values in register1 and register2 are not equal

    Pseudodirect Addressing

    • Used in jump instructions, where the jump address is formed by concatenating the upper bits of the program counter (PC) with the 26 bits of the instruction

    Addressing Modes

    • Different ways the CPU calculates the address of an operand
    • Immediate Addressing Mode: The operand is directly specified as part of the instruction
    • Register Addressing Mode: The address of the operand is stored in a register
    • Base or Displacement Addressing Mode: The address of the operand is calculated by adding a displacement value to the contents of a register
    • PC Relative Addressing Mode: The address of the operand is calculated relative to the program counter (PC)
    • Pseudodirect Addressing Mode: The jump address is formed by concatenating the upper bits of the program counter (PC) with the 26 bits of the instruction

    RISC (Reduced Set Instruction Set Architecture)

    • Emphasizes simplicity of hardware and uses a limited set of basic instructions
    • Aims to reduce the cycles per instruction, even if it means more instructions per program.

    CISC (Complex Instruction Set Architecture)

    • Allows more complex and powerful instructions, but can lead to increased cycles per instruction

    Performance

    • Both RISC and CISC aim to improve CPU performance
    • RISC focuses on reducing cycles per instruction, sacrificing instructions per program
    • CISC focuses on reducing instructions per program, sacrificing cycles per instruction
    • The rise of high-level programming languages has favored RISC architecture, as it simplifies instruction set design

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Unit 3 .pptx

    Description

    This quiz explores the fundamental components of computer architecture, including the control, input, and output units. You'll learn about the various input devices and types of output, along with multimedia fundamentals and branch instructions in programming. Test your knowledge on how these elements work together in a computer system.

    More Like This

    Use Quizgecko on...
    Browser
    Browser