How to Handle an Exceeding Number of Digital Output Bits in a System?

In summary: Because, if you start from 0v and go up through the total 511 steps, an increment of 0.015625 V would take you to 511*0.015625 V, and on my calculator this does not equal 8.000V. So something is wrong!
  • #1
Femme_physics
Gold Member
2,550
1
Last edited by a moderator:
Physics news on Phys.org
  • #2


Overflow, and it starts again from the beginning?
 
  • #3


The largest number you can represent with 9 bits is (1 1111 1111)_2 = (511)_10 = 2^9 -1. (assuming that you don't use one bit for the sign, i.e. you also allow negative numbers).You can in fact represent 512 different numbers, but the first one is always 0.
 
  • #4


The largest number you can represent with 9 bits is (1 1111 1111)_2 = (511)_10 = 2^9 -1. (assuming that you don't use one bit for the sign, i.e. you also allow negative numbers).

So if I get a result that contains 10 bits and I have 9 bits does this mean I have to go to the highest possible value I can present?

I.e., Since I got 1000000000 (10 bits), I change it to 111111111 (9 bits) because I don't have more than 9 bits. Would that be valid in terms of my homework calculations?
 
  • #5


Femme_physics said:
So if I get a result that contains 10 bits and I have 9 bits does this mean I have to go to the highest possible value I can present?

I.e., Since I got 1000000000 (10 bits), I change it to 111111111 (9 bits) because I don't have more than 9 bits. Would that be valid in terms of my homework calculations?

What is the range for your voltage? (i.e. what is the minimum voltage and what is the maximum voltage) allowed for your digital representation?
 
  • #6


chiro said:
What is the range for your voltage? (i.e. what is the minimum voltage and what is the maximum voltage) allowed for your digital representation?

Min is 0 max is 8

(I wrote it above :) )
 
  • #7


Is something invalid here?
With 9 bits, you can represent up to 111111111 and this number is not = 2⁹

Res= 8 / (2ⁿ - 1)
 
  • #8


Res= 8 / (2ⁿ - 1)

Now I'm even more confused. Where does this -1 comes from? It did not appear in our teacher's resolution formula.

With 9 bits, you can represent up to 111111111 and this number is not = 2⁹

I understand that, so is it valid to say that the answer for the output of a binary (512)10 is indeed 111111111? ("9" times "1")
 
  • #9


9 bits allows (512)10 states, these range from 000000000 up to 111111111
N.B. the 1st output state of a 9-bit counter is 000000000 which we may pronounce "zero". The 2nd output state is 000000001 which we pronounce "one". ... The final output is that counter's 512th state which is all 1's and we pronounce that number "five hundred and eleven".

You want to use the binary words 000000000 - 111111111 to represent 0.000 - 8.000 volts
So you set 000000000 = 0.000V, and 111111111 = 8.000V

There are 511 counts/intervals/steps/increments between 000000000 and 111111111
so each step must represent what increment in voltage? As far as I can see, there can be only one correct answer. :uhh:

(It's possible that some people might consider the ADC's accuracy to be half of this figure, since you can digitize an analog sample without introducing a rounding/quantizing error of more than half that increment.)
 
  • #10


9 bits allows (512)10 states, these range from 000000000 up to 111111111
N.B. the 1st output state of a 9-bit counter is 000000000 which we may pronounce "zero". The 2nd output state is 000000001 which we pronounce "one". ... The final output is that counter's 512th state which is all 1's and we pronounce that number "five hundred and eleven".

You want to use the binary words 000000000 - 111111111 to represent 0.000 - 8.000 volts
So you set 000000000 = 0.000V, and 111111111 = 8.000V

I see. Then according to that logic the answer I wrote must apply.

There are 511 counts/intervals/steps/increments between 000000000 and 111111111
so each step must represent what increment in voltage?

Analog increment of the voltage
 
  • #11


NascentOxygen said:
There are 511 counts/intervals/steps/increments between 000000000 and 111111111 so each step must represent what increment in voltage?
I mean, determine how many volts? :smile:
 
  • #12


That would be the value of the resolution, of course: 0.015625 V !
 
  • #13


Femme_physics said:
That would be the value of the resolution, of course:
I believe it would be. :smile:
0.015625 V !
I thought I've been showing you how that can't be the correct value. :uhh:

Because, if you start from 0v and go up through the total 511 steps, an increment of 0.015625 V would take you to 511*0.015625 V, and on my calculator this does not equal 8.000V. So something is wrong!

For it all to make sense, the correct way to calculate resolution must be 8.000 ÷ 511, just as I demonstrated earlier (and despite what your teacher may or may not have told you).

Of course, 8 ÷ 511 is very close to 8 ÷ 512, but it's not close enough to avoid the problem that 111111111 isn't coming out as 8.000V. All clear now? :wink:
 
Last edited:
  • #14


PERFECTLY. :) Thanks.

But I should still use my original formula for resolution for general purposes, yes? Unless I see a contradition such as this-- then I can use your method!
 
  • #15


Femme_physics said:
PERFECTLY. :) Thanks.

But I should still use my original formula for resolution for general purposes, yes?
When you are a student, you do exactly as your teacher directs. :smile:
Unless I see a contradition such as this-- then I can use your method!
EVEN IF you see a contradiction; he's doing the marking! http://img651.imageshack.us/img651/4796/iconsmileclown.gif
 
Last edited by a moderator:
  • #16


EVEN IF you see a contradiction; he's doing the marking!

Yes and no, he's preparing us for an external test. He's just doing the pre-test. :)

When you are a student, you do exactly as your teacher directs.

Ahh...but we got a contradiction in this exercise which I don't recalled him telling us how to handle (TBH I think he skipped a bunch of material). Ergo, I must figure out my own way of handling it.

But I can just write an explanation, I guess, because I fully understood you :)

You're helping me a great deal, NascentOx.. I appreciate it
 
  • #17


Actually, the formula of the teacher is not really wrong.
The voltage range 0-8 V is divided into subranges that map onto a digital number.
0 matches with the range 0V up to but less than 8V*1/512.
511 matches with the range 8V*511/512 up to 8V.

In practice it's always a surprise how an electronic circuit actually maps these numbers.
Electronic engineers are usually not mathematically precise.
But I don't really expect 7.999 V to be mapped to 510.

Anyway, you can expect 8V to be mapped to 511, since a higher number is not possible with 9 bits.
 
Last edited:
  • #18


I like Serena said:
Actually, the formula of the teacher is not really wrong.
The voltage range 0-8 V is divided into subranges that map onto a digital number.
0 matches with the range 0V up to but less than 8V*1/512.
511 matches with the range 8V*511/512 up to 8V.

In practice it's always a surprise how an electronic circuit actually maps these numbers.
Electronic engineers are usually not mathematically precise.
But I don't really expect 7.999 V to be mapped to 510.

Anyway, you can expect 8V to be mapped to 511, since a higher number is not possible with 9 bits.

Thanks, that's what I did. Funnily enough I scored the notebook of someone who already took the course and he used the formula with the "-1" at the the denominator.
Either way, as long as it's all clear :)

Thanks
 
  • #19


I like Serena said:
Actually, the formula of the teacher is not really wrong.
The voltage range 0-8 V is divided into subranges that map onto a digital number.
0 matches with the range 0V up to but less than 8V*1/512.
511 matches with the range 8V*511/512 up to 8V.

In practice it's always a surprise how an electronic circuit actually maps these numbers.
Electronic engineers are usually not mathematically precise.
But I don't really expect 7.999 V to be mapped to 510.
I believe you are right. I was actually picturing the D-A converter while describing how to ensure that 0-511 maps neatly to the 0-8v range, and a denominator of 2ⁿ -1 ensures this.

I think you are correct about the A-D converter having 2ⁿ intervals between 0 and 8V.
Femme_physics said:
Thanks, that's what I did. Funnily enough I scored the notebook of someone who already took the course and he used the formula with the "-1" at the the denominator.
Either way, as long as it's all clear :)

Thanks
If you have a chance, can you see whether that 2ⁿ -1 denominator refers a DAC or an ADC?
 
  • #20


NascentOxygen said:
I believe you are right. I was actually picturing the D-A converter while describing how to ensure that 0-511 maps neatly to the 0-8v range, and a denominator of 2ⁿ -1 ensures this.

I think you are correct about the A-D converter having 2ⁿ intervals between 0 and 8V.

If you have a chance, can you see whether that 2ⁿ -1 denominator refers a DAC or an ADC?

To make it mathematically neat, a DAC converter should map 0 to 8V*0.5/512.
And it should map 511 to 8V*511.5/512.

That way forward and backward conversion would be identical and proof to noise, which are attractive features IMO.

Anyway, I highly doubt that DAC's in practice show this behavior.
Some people will feel that 0 should be mapped to 0V and/or 511 should be mapped to 8.0V, even though this generates an asymmetric conversion mapping.
Depending on the application they will probably have good reason too!

To the OP: I wouldn't worry overmuch about a denominator of 2n or 2n-1.
 
Last edited:
  • #21


If you have a chance, can you see whether that 2ⁿ -1 denominator refers a DAC or an ADC?

DAC according to the page
To the OP: I would worry overmuch about a denominator of 2^n or 2^n-1.

If I may correct for the probably 2nd time in my life, you meant "wouldn't" ;)

And thanks!
 
  • #22


Femme_physics said:
If I may correct for the probably 2nd time in my life, you meant "wouldn't" ;)

And thanks!

I had already edited it before your reply! :blushing:
 
  • #23


Alright alright I'll wait for another 2nd opportunity then :)
 
  • #24


When was that first opportunity?
 
  • #25


I knew you'd asked.

I know there was one, for sure, it'll just take me forever to look for all our posts just to point it out. I have no court evidence, your honor, but my conviction!
 
  • #26


Femme_physics said:
I knew you'd asked.

I know there was one, for sure, it'll just take me forever to look for all our posts just to point it out. I have no court evidence, your honor, but my conviction!

Well, I know of 2 opportunities. :blushing:

One time I mentioned that you should trust your visual queues.
(That was a typo. It should have been cues. You can probably still find it with google.)

And another time I mixed up the letters C and D in a mechanics problem.
(But then, there was no letter C.)
 
  • #27


YESSS! I knew it! ;)

The defendant pleads guilty! The lawyer gets a heart-attack.

Well, these are lame corrections, but there you go. :)
 

1. How do I know if my system is experiencing an exceeding number of digital output bits?

One way to determine if your system is experiencing an exceeding number of digital output bits is to monitor the output data and compare it to the expected values. If the output data consistently exceeds the expected values, it may be an indication that the system is struggling to handle the number of bits.

2. What are the potential consequences of having an exceeding number of digital output bits in a system?

An exceeding number of digital output bits in a system can lead to errors in data transmission, loss of data, and overall system instability. It can also result in incorrect or inconsistent output values, which can impact the accuracy and reliability of the system.

3. How can I prevent my system from experiencing an exceeding number of digital output bits?

One way to prevent this issue is to carefully design and test the system before implementation. This includes selecting components with appropriate bit handling capabilities and properly configuring them for the desired output. Regular maintenance and updates can also help prevent this issue.

4. Can software updates or patches help with an exceeding number of digital output bits in a system?

In some cases, software updates or patches can help address this issue by providing bug fixes or new features that improve bit handling capabilities. However, it's important to thoroughly test and validate these updates before implementing them in a production system.

5. What are some troubleshooting steps for addressing an exceeding number of digital output bits in a system?

If you are experiencing this issue, some troubleshooting steps you can take include checking the system for any faulty components, reviewing the system design and configuration for any potential issues, and updating any relevant software or firmware. It may also be helpful to consult with experts or reference documentation for further guidance.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Computing and Technology
Replies
4
Views
762
Back
Top