0% found this document useful (0 votes)
24 views

Practice Test

This document contains solutions to test problems related to digital signal encoding and floating point number representation. It includes problems converting between single precision floating point format and decimal, drawing NRZI and DATA STROBE encodings for an 8-bit value, identifying characteristics suited for high bandwidth buses, describing latency and throughput, and writing assembly routines for word counting in a string and signed saturated addition.

Uploaded by

AhmedBattar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Practice Test

This document contains solutions to test problems related to digital signal encoding and floating point number representation. It includes problems converting between single precision floating point format and decimal, drawing NRZI and DATA STROBE encodings for an 8-bit value, identifying characteristics suited for high bandwidth buses, describing latency and throughput, and writing assembly routines for word counting in a string and signed saturated addition.

Uploaded by

AhmedBattar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

EE 3724 Test #4 Solutions - Spring 01 Reese

1. (5 pts) Convert the following number in single precision floating point format to
its decimal value (no exponents allowed in the final decimal value).

Sign bit: 1
Exponent field: 01111110
Significand Field: 0100 0000 .0000
Exponent = Exp. Field - 127 = 7Eh - 127 = 126 - 127 = -1
Sign is negative, number = - 1. 0100 * 2-1 = -0.101 = - (0.5+0.125) = -0.625

2.

(5 pts) Draw the waveform for sending an 8 bit value of 43h using NRZI
encoding. Assume the initial value of the waveform signal is a low voltage.
43h = 01000011 Send LSB first, NRZI encoding

initial
value

D0

D1

D2

D3

D4

D5

D6

D7

3. (5 pts) Draw the waveform for sending an 8 bit value of 43h using DATA
STROBE encoding. Assume the initial values of both data and strobe are both
low voltage. Show the signaling for the 8-data bits only (no framing bits such as
start/stop)..
43h = 01000011 Send LSB first

Data
initial
value

Strobe
initial
value

D0

D1

D2

D3

D4

D5

D6

D7

4. (4 pts) For each pair of items, circle the one that would more likely be found in
high bandwidth bus:
multiplexed address/data

vs.

non-multiplexed address/data

limited swing voltage signaling vs.

full swing (gnd to power rail) signaling

asynchronous data transfer

vs.

synchronous transfer

narrow data width

vs.

wide data width

5. (5 pts) In a peripheral bus, what can be used to limit common mode noise?
Differential data signaling is used to reject common noise.
6. (6 pts) Define latency and throughput.
Latency is the time from when the operation is started to when the operation is finished.
Throughput is number of operations per unit time. For fixed bandwidth, if throughput is
increased, then latency is increased.

7. (6 pts) What pair of lines must go to every device on a bus if a central arbitration
scheme is used to support multiple bus mastering?.
Bus Grant and Bus Request

8. (6 pts) What three pieces of information are needed in a fixed disk to locate a
piece of data?
Cylinder, track, sector

9. (5 pts) Convert the number -2.0 to single precision floating point format:

Sign bit: -1
Exponent field: 10000000 (8 bits)
Significand field: 000000000 (23 bits)
-2.0 = -10.0 (binary) = -1.0 * 21
Exponent = 1 + 127 = 128 = 10000000
Significand is all zeros because everything to the right of the decimal point is zero.
10. (4 pts) How do you compute the number of horizontal lines in a raster display?
Horizontal Sync/Vertical Sync

11. (4 pts) In the IEEE floating point format, what field do I add bits to if I want to
extend the precision of a floating point number?
Significand

12. (5 pts) The USB signaling protocol is called a synchronous protocol but there is
no clock signal in the cable. How does USB maintain data sychronization?
NRZI encoding ensures a transition for every 0 bit. Bit stuffing is used to ensure
that there are enough transitions in the signal waveform within a fixed time
period in order to maintain clock sychronization (for every six consecutive 1
bits, stuff in a 0 bit).

13. (20 pts) Write a subroutine that will count the number of WORDS in a string. A
word is any set of ASCII characters separated by ONE OR MORE space
characters (a space character has the ASCII value of 20h). You can assume the
strings only have letters or spaces in them. The string is terminated by a zero
byte (00h) and the starting address of the string is passed in BX. Return the
number of words in the string in register AX (you can assume there is less than
65535 words in the string). Example: " A lazy person am I" has 5 words.
The first letter of the string can be a space or the end of the string.

wdcnt
lp1:

lp2:

proc
xor
mov
cmp
je
inc
cmp
je
inc
mov
cmp
je
inc
cmp
jne
jmp

exit:
ret

ax, ax
cl,[bx]
cl, 0
exit
bx
cl, 20h
lp1
ax
cl,[bx]
cl, 0
exit
bx
cl, 20h
lp2
lp1

;space loop

;loop while a space


; found a letter, inc word cnt
;letter loop

;loop while a letter

14.
(20 pts) Write a subroutine called SIGNED_SATADD that will do a signed 8-bit
saturated addition of the values passed in AH, AL with the result passed back in AL:
AL = AH + AL (signed 8-bit saturating addition).
If an overflow occurs during the addition, then the number has to be clamped to the
maximum negative or maximum positive 8 bit value. The jump instruction jo
(jump on overflow) may prove useful.

satadd

proc
add al,ah
jo
dosat
ret

;result in al

dosat:
test ah, 080h
je
oper_pos
mov al, 80h
ret
oper_pos:

mov
ret

satadd

endp

al, 07fh

; see if negative
;saturate to max negative

;saturate to max positive

You might also like