Jump to content

Question for the digital math guru's


Recommended Posts

I wrote an Avionics exam today and one question stumped me.

 

It should have been very easy. After doing this for 25 plus years you'd think I knew this!

 

I was given an A/D converter output of 0000 (Hex) for 0 volts. 10 volts was 7777 (Hex). I was asked what the value would be for 5 volts (in hex).

 

I decided to convert to 7777 Hex to decimal and came up with 20583. I divided by 2 and the result was 15291.5. That is where I was stumped. I was expecting an even number. Although I shouldn't have expected an even number.

 

I chopped off the decimal and converted 15291 to 3BBB Hex.

 

Was I in error? I know this should be easy. I even converted to binary and came up with the same result.

Edited by Scooby
Link to post
Share on other sites

As ADC outputs almost always use integer math and follow proportionality, your calculation is correct.

 

However, I find it odd that the question does not give you what Vmax is, and what the resolution of the ADC is (a 4-digit hex output likely implies 16 bits but the question should have made it clear). FInding the exact representation of 5V would require knowing the resolution and Vmax. If this question appeared in an engineering test, the entire class would have protested. 

 

The fact that they did not bother to specify the details tells me that they only care that you know about hex-to-decimal conversion and proportionality of ADC outputs; so your answer should be correct.

Link to post
Share on other sites
4 minutes ago, KursadA said:

As ADC outputs almost always use integer math and follow proportionality, your calculation is correct.

 

However, I find it odd that the question does not give you what Vmax is, and what the resolution of the ADC is (a 4-digit hex output likely implies 16 bits but the question should have made it clear). FInding the exact representation of 5V would require knowing the resolution and Vmax. If this question appeared in an engineering test, the entire class would have protested. 

 

The fact that they did not bother to specify the details tells me that they only care that you know about hex-to-decimal conversion and proportionality of ADC outputs; so your answer should be correct.

 

There were no other details. Thank-you for replies.

Link to post
Share on other sites

His reasoning seems to be that there are n+1 distinct points the between 0 and n; endpoints inclusive. However, the mid point is *not*  (n+1)/2. Your calculation is the right one; although from an engineer's standpoint what voltage that value precisely describes depends on   the ADC characteristics. 

 

 

Edited by KursadA
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...