Date: Tue, 05 Nov 1996 20:51:31 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Fri, 27 Sep 1996 16:16:54 GMT Content-length: 3048
CS 354
Fall 1996 Section 2 | Name:_____________________ | |
Quiz #2 for Friday September 27
5 questions, 25 points total |
1. (8 points)
a. Express 22.4 (base 10) in base 2.
2. (4 points) What is the output of the following SAL program?
.data
str: .ascii "why?\n"
ch1: .byte 'x'
ch2: .byte 'x'
counter: .word 0
newline: .byte '\n'
int: .word 0
.text
__start: puts str
putc ch1
putc ch2
putc newline
move int, ch1
put int
done
3. (6 points)
a. Give an 8-bit two's complement representation for the decimal value -46.
4. (4 points)
A modified floating point representation is defined. It is just like the IEEE floating point standard, except for a few modifications. It is a 12-bit representation. The exponent field is 4 bits, and uses two's complement representation. What decimal value is represented by 0xa46 in this modified floating point representation?
5. (3 points)
Give the IEEE single precision floating point representation for the decimal value 6.125. Show the result in both binary and hexadecimal.