Searching \ for '[OT] Math for Engineers :-)' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/method/math.htm?key=math
Search entire site for: 'Math for Engineers :-)'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Math for Engineers :-)'
2007\04\12@133029 by Gerhard Fiedler

picon face
<http://tinyurl.com/2dga47>
<http://www.edn.com/article/CA6430339.html?spacedesc=designideas&industryid=44217&nid=2431&rid=973981692>

I thought EDN was a magazine targeted at engineers...

"However, this Design Idea presents a solution to the problem. Given the
microcontrollerÿs power operating-voltage source, VDD, use the following
simple formula to obtain the hex-code value corresponding to an identified
input-analog-voltage level: VIN×VIN/(VDD/255)=result value=hex code. Note
that you must round off the result value to a whole number before
converting to a hex-code value for better accuracy. The following sample
calculation finds the hex-code value for a measured input-analog-voltage
level of 1.6V when using a known microcontrollerÿs VDD of
5V:1.6V/(5V/255)=81.6=82, or $52."

Gerhard

2007\04\12@155149 by William Chops Westfield

face picon face

On Apr 12, 2007, at 10:29 AM, Gerhard Fiedler wrote:

> <http://www.edn.com/article/CA6430339.html?
> spacedesc=designideas&industryid=44217&nid=2431&rid=973981692>
>
> I thought EDN was a magazine targeted at engineers...
>
*Electrical engineers* !

It's been my observation over the years that some really trivial
software stuff gets published columns like EDN's "Design Ideas."

BillW

2007\04\12@160605 by David VanHorn

picon face
> It's been my observation over the years that some really trivial
> software stuff gets published columns like EDN's "Design Ideas."

I was wondering about that.. Me too.

2007\04\12@160833 by Robert Young

picon face
>
>
>
> On Apr 12, 2007, at 10:29 AM, Gerhard Fiedler wrote:
>
> > <http://www.edn.com/article/CA6430339.html?
> > spacedesc=designideas&industryid=44217&nid=2431&rid=973981692>
> >
> > I thought EDN was a magazine targeted at engineers...
> >
> *Electrical engineers* !
>
> It's been my observation over the years that some really
> trivial software stuff gets published columns like EDN's
> "Design Ideas."
>

While this is is pathetic, I have worked with programmers who couldn't
add two numbers together without help, let alone figure out ADC values!

Rob

2007\04\12@162125 by William Couture

face picon face
On 4/12/07, Robert Young <spam_OUTrwyoungTakeThisOuTspamieee.org> wrote:

> While this is is pathetic, I have worked with programmers who couldn't
> add two numbers together without help, let alone figure out ADC values!

What's worse, I've worked with a control systems engineer (Ph.D., no
less) who could not divide by 2 in his head...

Bill

--
Psst...  Hey, you... Buddy...  Want a kitten?  straycatblues.petfinder.org

2007\04\12@163045 by Dario Greggio

face picon face
Robert Young wrote:

> While this is is pathetic, I have worked with programmers who couldn't
> add two numbers together without help, let alone figure out ADC values!

Quote from JoelOnSoftware Blog:

"You see, if you can’t whiz through the easy stuff at 100 m.p.h., you’re
never gonna get the advanced stuff."
http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html

--
Ciao, Dario il Grande (522-485 a.C.)

2007\04\12@163352 by Rolf

face picon face
Robert Young wrote:
{Quote hidden}

You said you wouldn't tell anyone ....... ;-)

Rolf

2007\04\12@181008 by Dwayne Reid

flavicon
face
At 02:21 PM 4/12/2007, William Couture wrote:

>What's worse, I've worked with a control systems engineer (Ph.D., no
>less) who could not divide by 2 in his head...

That's because he was having problems with the binary to decimal
conversion (in his head) after first converting the decimal value to
binary, then discarding the LSB.  <grin>

dwayne

--
Dwayne Reid   <.....dwaynerKILLspamspam@spam@planet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 22 years of Engineering Innovation (1984 - 2006)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

2007\04\12@193434 by Harold Hallikainen

face
flavicon
face

> At 02:21 PM 4/12/2007, William Couture wrote:
>
>>What's worse, I've worked with a control systems engineer (Ph.D., no
>>less) who could not divide by 2 in his head...
>
> That's because he was having problems with the binary to decimal
> conversion (in his head) after first converting the decimal value to
> binary, then discarding the LSB.  <grin>
>
> dwayne
>

This reminds me, I recently bought a textbook on digital design using
VHDL. EVERY textbook I've seen says that to figure out the decimal
equivalent of a negative twos complement number, take the twos complement
(making it positive), convert to decimal, then add the minus sign.

Something I read in BYTE magazine MANY years ago, that I have not seen
published elsewhere, is, I think, much simpler.

When using twos complement, make the sign of the weight of the msb
negative. Then add up bits times weights, as usual.

For example, in an 8 bit number, the msb weight becomes -128 instead of
128. So, 10101010 is:

1*(-128)=-128
0*64=0
1*32=32
0*16=0
1*8=8
0*4=0
1*2=2
0*1=0

and -128+32+8+2=-86.

Doing it the "hard way," we do this:

10101010
01010101 - ones comp
01010110 - add one to get twos comp
64+16+4+2=86, but this is the opposite of our original number, so the
original number was -86.

In both cases, you have to add the product of bits and weights, but in the
first method you don't have to twos complement.

I always thought it was pretty clever...

Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2007\04\13@084023 by Gerhard Fiedler

picon face
Harold Hallikainen wrote:

> Something I read in BYTE magazine MANY years ago, that I have not seen
> published elsewhere, is, I think, much simpler.
>
> When using twos complement, make the sign of the weight of the msb
> negative. Then add up bits times weights, as usual.
>
> For example, in an 8 bit number, the msb weight becomes -128 instead of
> 128. So, 10101010 is:
>
> 1*(-128)=-128
> 0*64=0
> [...]
> and -128+32+8+2=-86.

This is a derivative of the original rule of what two's complement means.
It's simply "folding" the values around at 0, which is equal to subtracting
256 if the value is over 127. This can be achieved by converting the number
into decimal as if it were unsigned, then subtracting 256 (or whatever your
range is) if it's outside the positive range:

0b10101010 = 2+8+32+128 = 170 (for 0b10101010 being unsigned)
0b10101010 = 170-256 = -86 (for 0b10101010 being two's complement)

Gerhard

2007\04\13@085221 by Gerhard Fiedler

picon face
Peter Feucht wrote:

> So in these cases a very fundamental description may be very helpful, even
> if it appears way too trivial for others.

I agree, in principle. I learn something simple almost every day :)

But the solution of a simple "Dreisatz" (not sure what the translation of
this term in English is) is not engineer's math, it is something most
pre-college students should be able to do:

"If 5V results in 255 counts (and the relationship is proportional), 1.6V
results in how many counts?"

"If with $5 you can buy 255 widgets, how many widgets can you buy with
$1.6?"

I don't think the solution of this "riddle" is a "Design Idea". An engineer
who has to memorize such "solutions" (instead of instantly creating them
when needed) probably has a hard time that cannot be relieved by reading
EDN :)

Gerhard

2007\04\13@100322 by Dennis Crawley

picon face
On Friday, April 13, 2007 9:39 AM [GMT-3=CET],
Gerhard Fiedler  wrote:

> Harold Hallikainen wrote:
>
> > Something I read in BYTE magazine MANY years ago, that I have not seen
> > published elsewhere, is, I think, much simpler.
> >
> > When using twos complement, make the sign of the weight of the msb
> > negative. Then add up bits times weights, as usual.
> >
> > For example, in an 8 bit number, the msb weight becomes -128 instead of
> > 128. So, 10101010 is:
> >
> > 1*(-128)=-128
> > 0*64=0
> > [...]
> > and -128+32+8+2=-86.
>
> This is a derivative of the original rule of what two's complement means.
> It's simply "folding" the values around at 0, which is equal to
subtracting
> 256 if the value is over 127. This can be achieved by converting the
number
> into decimal as if it were unsigned, then subtracting 256 (or whatever
your
> range is) if it's outside the positive range:
>
> 0b10101010 = 2+8+32+128 = 170 (for 0b10101010 being unsigned)
> 0b10101010 = 170-256 = -86 (for 0b10101010 being two's complement)
>
> Gerhard

...or

  sublw 0    ;take the two's complement (256 range -128 +127)



More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...