Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

14 Questions on Language Compiler Design - Assignment 4 | CS 322, Assignments of Computer Science

Material Type: Assignment; Professor: Porter; Class: LANG COMPILER DESIGN; Subject: Computer Science; University: Portland State University; Term: Unknown 2006;

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-web
koofers-user-web 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS-322 Compiler Design
Page 1
Homework 2
Due Date: Thursday, January 26, 2006, 2:00
Your Name:___________________________________
Question 1 Consider the “gdb” debugger. Which command do you use to... (Just show
the command name, not any arguments.)
Set a breakpoint? ______
Continue execution after a breakpoint is reached? ______
Begin execution of a program? ______
Display a data value? ______
Examine memory contents? ______
Change a register? ______
Display a routine’s instructions? ______
Execute the next (machine) instruction, skipping over any called subroutines?
______
Execute the next (machine) instruction, including all instructions in called
routines? ______
Execute the next (source language) statement, skipping over any called
subroutines? ______
Execute the next (source language) statement, including all instructions in called
routines? ______
Display the contents of the routine calling stack? ______
Display the contents of all registers (show the parameter)? ______
Question 2 How many bits are in a single precision floating point number? _____
How many bits are in a double precision floating point number? _____
Question 2a How many bytes are in a single precision floating point number? _____
How many bytes are in a double precision floating point number? _____
pf3

Partial preview of the text

Download 14 Questions on Language Compiler Design - Assignment 4 | CS 322 and more Assignments Computer Science in PDF only on Docsity!

Homework 2

Due Date: Thursday, January 26, 2006, 2:

Your Name:___________________________________

Question 1 Consider the “gdb” debugger. Which command do you use to... (Just show the command name, not any arguments.)

Set a breakpoint? ______

Continue execution after a breakpoint is reached? ______

Begin execution of a program? ______

Display a data value? ______

Examine memory contents? ______

Change a register? ______

Display a routine’s instructions? ______

Execute the next (machine) instruction, skipping over any called subroutines?

______

Execute the next (machine) instruction, including all instructions in called

routines? ______

Execute the next (source language) statement, skipping over any called

subroutines? ______

Execute the next (source language) statement, including all instructions in called

routines? ______

Display the contents of the routine calling stack? ______

Display the contents of all registers (show the parameter)? ______

Question 2 How many bits are in a single precision floating point number? _____

How many bits are in a double precision floating point number? _____

Question 2a How many bytes are in a single precision floating point number? _____

How many bytes are in a double precision floating point number? _____

Question 3 What is the second to the last double precision floating point register named?


Question 4 What SPARC instruction will move a quad precision value from memory to a floating point register? ________ What instruction will move a single precision value from a floating point register to memory? ________ Question 5 What is the value (expressed as a decimal number) of these fixed-point binary numbers: 0.1? ____________ 0.01? ____________ 0.11? ____________ 11.1? ____________ 11.01? ____________ 11.001? ____________ 11.111? ____________ 1100.1011? ____________ Question 6 Can every decimal fraction be represented exactly using a binary number (with finite precision)? ______ Question 7 What does NAN stand for? ______________________ Question 8 What are 3 values that can be represented with a floating point number that are not themselves numbers? (Given symbolic names, not actual hex values.)




Question 9 About how many decimal digits of accuracy are available in a double precision floating point number? ______ What is the range of the exponent, in decimal? ____________