Skip to main content
81 votes
Accepted

Why is the time constant 63.2% and not 50% or 70%?

Other answers haven't yet hit upon what makes e special: defining the time constant as the time required for something to drop by a factor of e means that at any moment of time, the rate of change ...
supercat's user avatar
  • 47.3k
50 votes

Why is the time constant 63.2% and not 50% or 70%?

It's built into the mathematics of exponential decay associated with first-order systems. If the response starts at unity at t=0, then after one "unit of time", the response is \$e^{-1} = 0.36788\$. ...
Dave Tweed's user avatar
  • 178k
38 votes
Accepted

Why does hardware division take much longer than multiplication?

A divider maps much less elegantly to typical hardware. Take Lattice ICE40 FPGAs as examples. Let us compare two cases: this 8x8 bit to 16 bit multiplier: ...
Marcus Müller's user avatar
37 votes
Accepted

Why is impedance represented as a complex number rather than a vector?

Complex numbers are similar to vectors, but have some extra mathematical properties that make them useful. Most notably, using the complex exponential \$e^{j\omega t}\$ instead of sines and cosines ...
Adam Haun's user avatar
  • 22.3k
33 votes
Accepted

How do computers calculate sin values?

Typically high resolution sin(x) functions would be implemented with a CORDIC (COrdiate Rotation DIgital Computer) algorithm, which can be accomplished with a small number of iterations using only ...
Spehro 'speff' Pefhany's user avatar
27 votes
Accepted

Order of operations and rounding for microcontrollers

This is not a compiler issue: doing the division first here is the legal behaviour, as division and multiplication have equal precedence and are evaluated left-to-right. (Also, when in doubt: use ...
ocrdu's user avatar
  • 9,310
22 votes

Why does this battery use 4.2 V when its nominal voltage is 3.7 V?

A lithium ion cell may start with 4.2V across it, when it's 100% charged, but it quickly falls to about 3.7V, at about 80% charge. Then it will stay at around 3.7V until charge falls to 20% or so, ...
Simon Fitch's user avatar
  • 47.3k
19 votes

Do working electrical engineers in circuit design ever use textbook formulas for rise time, peak time, settling time, etc

These calculations are absolutely used by professional EEs, for some on a daily basis. However, for many this job has been given to simulation software, such as LTSpice, which is also used on a daily ...
DerStrom8's user avatar
  • 21.6k
17 votes
Accepted

Solving an ideal opamp-circuit leads to a contradiction

The error is in the assumption the I2 = I1. The OpAmp can (in general) sink and source current. When it would be sourcing current, this current would have to go to ground, either through R2 or through ...
Huisman's user avatar
  • 10.9k
16 votes

How do computers calculate sin values?

Most computer trig libraries are based on polynomial approximations, which gives the best balance between speed an accuracy. For example, a dozen or so multiplication and add/subtract operations is ...
Dave Tweed's user avatar
  • 178k
15 votes

Why is impedance represented as a complex number rather than a vector?

Why are complex numbers used and not Vectors? simply because there is no vector division defined in vector algebra, so simply you cannot use Ohm's law in division form, thereby making calculations ...
Sanmveg saini's user avatar
14 votes

Order of operations and rounding for microcontrollers

This is a fundamental C issue: you need to be extremely clear whether you're doing integer or floating-point arithmetic. uint16_t temperature = reading*0.076295; ...
pjc50's user avatar
  • 47.1k
13 votes

Do working electrical engineers in circuit design ever use textbook formulas for rise time, peak time, settling time, etc

You refer to these basic formulae at first and then find the real world has a lot of non-linear characteristics like XOR phase detectors in a second PLL loop response when you exceed the phase limit ...
D.A.S.'s user avatar
  • 148k
12 votes

Why is impedance represented as a complex number rather than a vector?

Just to remark on that you can represent impedance as a matrix: $$ R + \mathrm j X \leftrightarrow \begin{bmatrix} R & X \\ -X & R \end{bmatrix} $$ This is in fact the matrix ...
fghzxm's user avatar
  • 229
11 votes

Why does hardware division take much longer than multiplication?

We can have multiple layers of logic per clock cycle but there is a limit, exactly how many layers of logic we can have an how complex those layers can be will depend on our clock speed and our ...
Peter Green's user avatar
  • 23.1k
11 votes

Why is the time constant 63.2% and not 50% or 70%?

The decay of an RC parallel circuit with capacitor charged to Vo v(t) = \$Vo(1-e^{-t/\tau})\$ , where \$\tau\$ is the time constant R\$\cdot\$C. So v(\$\tau\$)/Vo is approximately 0....
Spehro 'speff' Pefhany's user avatar
11 votes

Implementing an absolute value function in C

The standard C library is providing the optimized solutions for many problems with considerations based on the architecture, compiler in use and others. The abs() ...
Eugene Sh.'s user avatar
  • 10.1k
11 votes
Accepted

Using a PCB trace as a heater / Hilbert Curves

I have some experience with PCB heaters using copper traces on polyimide (flex circuit) substrate. My goal has always been to use uniform copper trace width with consistent trace-to-trace spacing so ...
user57037's user avatar
  • 29.5k
10 votes
Accepted

how to solve this op-amp circuit?

Your circuit doesn't have negative feedback: - Therefore it acts as a comparator with hysteresis and hence, the output changes state when the input voltage passes the hysteresis threshold points ...
Andy aka's user avatar
  • 473k
9 votes

Why does hardware division take much longer than multiplication?

Slow division is inherently iterative so it tends to take longer. There are somewhat faster slow division algorithms than the simple ones, using lookup tables. The SRT algorithm produces two bits per ...
Spehro 'speff' Pefhany's user avatar
9 votes

Acceleration when device is on tilt

Your main mistake is in not treating acceleration as a single vector. When the car is at rest, that vector will always be 1 g upwards. Don't look at just the X component of the raw accelerometer ...
Olin Lathrop's user avatar
9 votes
Accepted

Is a CPU declarative?

Aren't you both wrong? To me this sounds like arguing that if someone thinks in English then their neurons are wired in English, which is nonsensical. If you actually want to force application of the ...
DKNguyen's user avatar
  • 57.3k
9 votes

Conundrum: High pass filter passes DC?

The resolution to the conundrum is that there really is no conundrum. Your input, a step function, has infinite dc component (its Laplace Transform, \$1/s\$, goes to infinity as \$s\rightarrow 0\$). ...
rpm2718's user avatar
  • 2,912
9 votes

Conundrum: High pass filter passes DC?

You're confusing the steady-state response with the total response. The transfer function for that circuit is: $$H(s)=\frac{s}{s+\frac{1}{RC}}$$ and if you solve for the step response: $$h(t)=\text{e}^...
a concerned citizen's user avatar
8 votes

Do working electrical engineers in circuit design ever use textbook formulas for rise time, peak time, settling time, etc

Engineers design things because there is a customer that wants or needs something. The time parameters you are asking about and others effect how satisfied the customer will. I would say engineers ...
owg60's user avatar
  • 2,130
8 votes

Find the phase angle between two functions

Additionally, it seems to me which function leads which is rather relative as I can shift any function 360 deg, any easy reconciliation? Absolutely. What is leading or lagging is up for ...
Marcus Müller's user avatar
8 votes

How to choose correct resistor values when designing a circuit?

That's not even the simplest circuit and the voltage divider or the resistance values make no sense for a LED circuit. There is also one incorrect assumption - for a 5V LED and 3.3V LED in parallel, ...
Justme's user avatar
  • 172k
7 votes
Accepted

How are irrational numbers best represented and processed by computers?

There’s nothing special about computers in this context. An infinite number of nonrepeating decimal places cannot be stored or manipulated on a computer, on paper, or in a human brain. Irrational ...
Adam Haun's user avatar
  • 22.3k
7 votes
Accepted

Overdrive voltage of NMOS vs PMOS

Here are an N-channel MOSFET, and a P-channel one in a simple setup to demonstrate the conditions required to switch their channels "on" and "off": simulate this circuit – ...
Simon Fitch's user avatar
  • 47.3k

Only top scored, non community-wiki answers of a minimum length are eligible