Decibels and how they relate to Voltage

Status
Not open for further replies.

That is cool, But you can round up to nearest power of two (using unsigned integers) with (C code):

x = (x+7) & -8;

Edit: My mistake.. the above code rounds up to the next multiple of 8. Not the next power of 2. I leave it as it is.
 
Last edited:
Hi,

What i do is just divide by 2. So if i have 2048 sorted elements, i look at element 1024. If that is greater than what i am looking for then i know my element must lie in the lower 1024 group, but if that is less than what i am looking for then i know my element must lie in the upper 1024 group.
If it was in the lower group for example, then i divide by 2 again to get 512 so next i look at the element 512 and do the same thing.
After enough iterations i end up with either the right element or the one just above and the one just below my search element.
So no log function required, but that's good for calculating the max number of tries that will be needed to find an object i think. Maybe log base 2.
 
L. Ghostman:
Voltage and decibel relation
Just a few values:

RMS <-> dBu

1mV = -58
7.7mV = -40
24.5mV = -30
77.4mV = -20
138mV = -15
0.24V = -10
0.43V = -5
0.775V = 0
1.38V = +5
2.45V = +10
4V = +14.3
6V = +17.8
8V = +20.3
10V = +22.2
 
Since the "attenuator" is on your function generator, pressing the "attenuator" 30 dB button will decrease the output level by 30 dB.

With no attenuator buttons pushed, the function generator would be at whatever level you set the output at. The attenuator attenuates the signal, that is, decreases the level you set by the dB button you pushed. If there are multiple buttons and you pressed more than one, the output would decrease by the sum of the buttons pressed.
 
MrAl
2048 is easy try 511
I just find it's easier if initial groups are 1 to 256 and 257 to 511 rather than 0 to 255.5 and 255.1 to 511. You get the idea.
 

Unfortunately, the number of atoms isn't the same, every heavy atom was made from lighter atoms. So every gold atom was once many hydrogen atoms that were squashed together in a star. In fact, you're made of stardust.

You'll find lot's of examples in science where as you go through school the simplified explanation you were given are replaced with more complex ones. Don't worry about it though as it's the only way to learn the complex stuff. I still don't fully understand some scientific stuff.

Edit, and with regard to your other thread, I'll never understand those creatures with the bumpy bits.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…