CSCI 2150
Fall 2000 Final Exam -- Answers
The following is the answer key to the Fall 2000 CSCI 2150
Final Exam. In some cases, where the HTML does not prohibit it,
I've elaborated on the process to get to the answers.
- If the zero flag (ZF) is set to one, what will the
processor do if it encounters the
instruction JG LABEL?
Answer: B
- If IP=1435 hex and CS=0407 hex, what is the physical address
of the next instruction to execute?
Answer:
Answer: Begin by shifting the segment register CS 4 bit positions to the left
and "back-filling" with zeros. This gives us
0407016. Then
add the result of this operation to the pointer register IP. This gives us:
0407016 + 143516 = 054A516
- If a processor takes 3 cycles to execute any instruction
(fetch, decode, execute), then how many cycles would it take
to execute 5 instructions if the processor is pipelined?
Answer:
piplined = 2 initial cycles + 1 cycles/instruction * 5 instructions
piplined = 7 cycles
- For each of the following assembly language instructions,
identify which registers and flags are affected and enter the
updated value if you have enough information. (Just put an
'X' in the box if it's impossible to know the new value.)
Use the memory contents shown in the chart below if necessary.
For each instruction, assume all registers contain 0 before
execution.
Answer:
Offset |
+0 |
+1 |
+2 |
+3 |
+4 |
+5 |
+6 |
+7 |
DS:1000 |
A516 |
5F16 |
4E16 |
F816 |
7416 |
ED16 |
DA16 |
2D16 |
Instruction
|
AX
|
BX
|
IP
|
Sign flag
|
Zero flag
|
mov ax,0125h
|
1003h |
|
X |
|
|
inc al
|
1004h |
|
X |
0 |
0 |
jmp 4567h
|
|
|
4567h |
|
|
- Name the two reasons covered in class for using
segmented addressing in the 80x86.
Answer:
- Allows for relocatable code
- Allows processor to access 20 address lines
using only 16-bit registers
- Of the following registers, which are 8 bit registers?
Answer: BH and CL
- Indicate whether the following statements are true or false.
Answer:
F -- The assembly language instruction CMP does not alter any processor flags
T -- To read from an I/O port, the ^IORC line is pulsed low.
T -- All Intel 80x86 and Pentium processors can address no more than 64K ports
F -- The newer bi-directional parallel ports have 16 data lines
F -- The 5 input and 5 output control lines of the parallel port cannot be used for general-purpose applications, i.e., non-printer applications.
F -- The printer port on a PC is interfaced to the processor with memory mapping.
T -- USB allows users to plug and unplug equipment without rebooting.
F -- A null modem is used to connect a DCE device to a DCE device.
- Draw the entire signal that is produced when a serial interface
transmits the character ';' with eight-bit data, one stop bit, and
odd parity. (ASCII ';' = 3Bh) In addition, identify each part of
the signal.
Answer:
- If it takes 2.5 microseconds (1 microsecond = 10-6 seconds)
to transmit one bit across a serial interface, what is the baud rate?
Answer:
BAUD rate = 1/bit time
BAUD rate = 1/2.5x10-6
BAUD rate = 400,000 bits per second
- If the baud rate is 9600 bits per second across a link with
1 stop bit, even parity, and 7 data bits, how many data bits per
second are being transmitted?
Answer:
data bits per second = BAUD rate * (# of data bits/# of frame bits)
data bits per second = 9600 * (7 data bits/(7 data bits + 1 start bit + 1 stop bit + 1 parity bit))
data bits per second = 9600 * (7 data bits/10 frame bits)
data bits per second = 6720 bits per second
- Classify each of the following characteristics as RS232
serial (R), USB (U), GPIB (G), or SCSI (S).
Answer:
U -- Two speeds -- 1.5 Mbps and 12 Mbps
R -- Serial point-to-point communications
U -- Can have up to 127 active devices on a single connection
G -- Can have at most 15 active devices on a single connection
U -- Contains power supply lines in a four conductor connection
R -- Uses voltage levels of -12 volts for a logic 1 and +12 volts for a logic 0
R -- Requires only three conductors for a minimum connection
S -- Primary applications include disk drives, tape drives, and CD drives.
- Assuming Vrl=0.5 Volts and Vrh=4.0 Volts,
produce the table of samples output by a three-bit ADC starting at
t=0 milliseconds with a sample taken every 5 milliseconds
(1 millisecond = 10-3 seconds).
Answer:
time | value |
0 ms | 001 |
5 ms | 001 |
10 ms | 101 |
15 ms | 110 |
20 ms | 100 |
25 ms | 101 |
30 ms | 110 |
35 ms | 100 |
- What would the accuracy (to 4 decimal places) of this system
be if we used a 10 bit ADC?
Answer:
accuracy = range/(number of increments)
accuracy = (4.0V - 0.5V)/(210 - 1)
accuracy = 3.5V/1023
accuracy = 0.003421
- What is the highest frequency we could measure with this system?
Answer: The highest frequency measureable with this system is
half the sampling rate. Since the sampling rate = 1/(time between
samples) = 1/5 milliseconds = 200 Hz, then the highest frequency
we can capture = 200 Hz/2 = 100 Hz.
- What do the following analog sensors read and what type of output
do they have?
Answer:
Sensor |
What does it measure? |
What does it output? |
Linear Variable Displacement Transformer |
linear position |
voltage |
Thermister |
temperature |
resistance |
Potentiometer |
position |
resistance |
Thermocouple |
temperature |
voltage |
- What is the purpose of a Wheatstone bridge?
Answer: To convert very small changes in resistance to measureable
changes in voltage.
Created by David Tarnoff for use by his sections of CSCI 2150.