Computer Science  >  EXAM  >  CSE 230 Exam | Answered with complete solutions (All)

CSE 230 Exam | Answered with complete solutions

Document Content and Description Below

CSE 230 Exam | Answered with complete solutions In the compilation process, the ______ arranges the symbol table in memory and generates final executable machine code. Backend Select which of the f ... ollowing are part of the compilation process: Lexical Analysis Syntax Analysis Optimization Linking Code Generation In the compilation process, the ______ performs program analysis and optimization. Middle Stage Which of the follow best matches the definition for Syntax Analysis? Performs syntax rules checking and constructs a symbol table and abstract syntax tree. Which of the follow best matches the definition for Lexical Analysis? Separates the input source code text into tokens. Which of the follow best matches the function of the Middle Stage in the compilation process? Performs program analysis and optimization. In the compilation process, the ______ separates the input source code text into tokens. Lexical Analyzer (lexer) A computer consists of five major modules. What module do registers belong to? Data Path The ______ of the CPU stores a small number of pieces of information, commonly the temporary results of calculations. Registers Which of the following best matches the definition of the Bus? Carries data between the ALU, registers, memory, and peripherals. The ______ of the CPU acts as an interface between the processor and the outside world, including long-term storage and user interfaces. IO / Peripherals A computer consists of five major modules. What module does ALU belong to? Data Path If two computers made by different companies have the same machine language, that means they have the same: Architecture Which of the following best matches the definition of the Datapath? Contains the ALU and Registers, and the interconnection between them. The ______ of the CPU carries data between the ALU, registers, memory, and peripherals. Bus The ______ of the CPU contains the ALU and Registers, and the interconnection between them. Datapath Which of the following best matches the definition of the Control Unit? Coordinates the flow of information around the processor. The ______ of the CPU stores a small number of pieces of information, commonly the temporary results of calculations. Registers Instruction cycle fetch, decode, execute, store Decode Hardware Data Memory Control Unit Fetch Hardware Instruction Memory Program Counter Execute Hardware ALU Store Hardware Data Memory Program Counter System Clock Coordinates Activity Latches Memory Select the hardware that is active during the Execute Stage of the instruction cycle: ALU Which of the following are stages in the instruction cycle? Execute Decode Fetch Store Which of the following are NOT stages in the instruction cycle? Link Jump A program consisting of 323 instructions is executing on a simple processor. Each instruction takes 4 cycles to complete, with a clock rate of 339 KHz. How long will it take to execute the program? Give your answer in units of milliseconds with at least 1 decimal place of precision. 3.8 Select the hardware that is active during the Store stage of the instruction cycle: Data Memory Program Counter Select the hardware that is active during the Fetch Stage of the instruction cycle: Program Counter Instruction Memory A program consisting of 946 instructions is executing on a simple processor. Each instruction takes 2 cycles to complete, with a clock rate of 6 MHz. How long will it take to execute the program? Give your answer in units of microseconds with at least 1 decimal place of precision 315.3 clock frequency f = 1/T (1Hz = 1 cycle per second) Speed 1 Program Execution / Time X is n times faster than Y SpeedX / SpeedY = n TimeY/TimeX = n Pareto Principle 80% of results generated by 20% of code What design effort can improve the performance of a computer? Decrease the clock cycles used by the program. Decrease the CPI In comparing two computers, we execute a benchmark on each and measure the resulting speeds: Computer A: 733 Computer B: 979 How many times faster is Computer A than Computer B? .7 Which of the follow best matches this definition: The total number of instructions in a given program. Instruction Count Which of the follow best matches this definition: The duration of one clock cycle in seconds. Clock Period Which of the follow best matches this definition: The frequency of the clock signal, in cycles per second. Clock Rate In comparing two computers, we execute a benchmark on each and measure the resulting execution times: Computer A: 85 Computer B: 243 How many times faster is Computer B than Computer A? .3 propagation delay the time taken for an electrical signal to travel through a wire or logic system A designer chooses to use a cheaper polymer for packaging that decreases the transfer of heat to a heat sink. All else being constant, will the performance likely increase, decrease, or stay the same? Decrease Select the items below that a designer can modify to effect propagation delay (select all that apply). Manufacturing Process Processor Organization A designer chooses to use a manufacturing process that decreases the feature size on the processor. All else being constant, will the performance likely increase, decrease, or stay the same? Increase A designer chooses to use an organization that increases the logic depth of the processor. All else being constant, will the performance likely increase, decrease, or stay the same? Decrease A designer chooses to use an organization that decreases the logic depth of the processor. All else being constant, will the performance likely increase, decrease, or stay the same? Increase A designer chooses to use a manufacturing process that increases the feature size on the processor. All else being constant, will the performance likely increase, decrease, or stay the same? Decrease The execution time E = IC CPI T E= (IC*CPI)/F E= (IC1CPI1+IC2CPI2+...)/f E= (IC1CPI1+IC2CPI2+...)T IC = instruction count CPI = cycles per instruction T = clock period F = clock rate How many symbols are used in the binary number system? 2 How many symbols are used in the decimal number system? 10 A binary "0" is represented by what physical phenomena in a modern computer? Low Voltage A binary "1" is represented by what physical phenomena in a modern computer? High Voltage What indicates a negative number in the two's complement representation? The most significant bit is 1 A variable of type signed short stores a value of -32768, If the variable value is decremented what exception will occur? Underflow. A variable of type unsigned char stores a value of zero. If the variable value is decremented, what exception will occur? Underflow. A variable of type signed int stores a value of -2147483648, If the variable value is decremented what exception will occur? Underflow. A variable of type signed short stores a value of 32767. If the variable value is incremented what exception will occur? Overflow. Which of the following are causes of overflow? Adding to a variable when its value is at the upper end of the datatype range. A variable of type unsigned short stores a value of zero. If the variable value is decremented, what exception will occur? Underflow. A variable of type unsigned short stores a value of 32767. If the variable value is decremented, what exception will occur? No exception. A variable of type unsigned int stores a value of 4,294,967,295 If the variable value is decremented what exception will occur? No exception. Which of the following are causes of underflow? Subtracting from a variable when its value is at the lower end of the datatype range. A variable of type unsigned int stores a value of zero. If the variable value is decremented, what exception will occur? Underflow. In which of the following situations will endianness become an issue? Transferring a memory block from a Little-Endian processor to a Big-Endian processor. Transferring a memory block from a Big-Endian processor to a Little-Endian processor. Select the definition of big-endian The most significant byte of a multi-byte datatype is stored at a lower address than the least significant byte. Select the definition of little-endian. The least significant bit of a single byte datatype is stored at a lower address than the most significant bit. What register stores a return value of a procedure? $v0 What register stores a temporary value that the caller procedure must save before calling a nested procedure? $t0 What register stores a parameter value of a procedure? #a0 What are the main reasons for writing procedures in assembly programs? Select all that apply. Easier to reuse the code Easier to understand and to debug What register stores the return address of a procedure? $ra What register stores a temporary value that the callee procedure must save before performing it's task? $s0 What register does the "jal" instruction automatically update? $ra In a procedure call, what is responsible for saving the $s0 - $s7 registers? Callee Procedure In a procedure call, what is responsible for saving the $t0 - $t9 registers? Caller Procedure In MIPS, the stack pointer is manipulated using the instruction addiu $sp, $sp, XX where "XX" is a number that may be positive or negative. If we need to reserve enough room on the stack for 8 integers in addition to the $ra register, what is the value of XX? -36 A procedure does not call another procedure. How does it differ from a procedure that does call another procedure? Register $ra does not need to be saved to stack In a procedure call, the $a0-$a3 registers are used for what purpose? Passing Parameters [Show More]

Last updated: 9 months ago

Preview 4 out of 12 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Loading document previews for CSE 230 Exam | Answered with complete solutions

Loading document previews ...

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$15.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

10
0

Document information


Connected school, study & course


About the document


Uploaded On

Feb 26, 2025

Number of pages

12

Written in

All

Seller


Profile illustration for Ajay25
Ajay25

Member since 5 years

133 Documents Sold

Reviews Received
25
4
1
0
4
Additional information

This document has been written for:

Uploaded

Feb 26, 2025

Downloads

 0

Views

 10

Document Keyword Tags

Recommended For You

Get more on EXAM »

$15.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·