Question

An analog to digital converter returns 16 bit values. Bits 7-0 are the converted value. Bit 8. 8 is an error flag. If its se

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ALGORITHM:

==============

INPUT: array ADC of 12 16bit-values

OUTPUT: array VALID of 12 8bit-values

j \leftarrow0

for i \leftarrow0 to 11 do

if ADC[i]<0x0100 then

temp=ADC[i] & 0x00ff // bitwise AND operation to extract bits 7-0 only

VALID[j] \leftarrowtemp // copy converted value to array VALID's j'th position

increment j

endif

endfor

return VALID

=====================

Add a comment
Know the answer?
Add Answer to:
An analog to digital converter returns 16 bit values. Bits 7-0 are the converted value. Bit...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT