# Re: OT: This Swift thing

```On Wednesday, June 11, 2014 1:11:12 PM UTC+5:30, Gregory Ewing wrote:
> Steven D'Aprano wrote:
> > Everything *eventually* gets converted to heat, but not immediately.
> > There's a big difference between a car that gets 100 miles to the gallon,
> > and one that gets 1 mile to the gallon.```
```
> With a car, the engine converts some of its energy to
> kinetic energy, which is subsequently dissipated as heat,
> so it makes sense to talk about the ratio of kinetic
> energy produced to energy wasted directly as heat.

> But when you flip a bit, there's no intermediate form
> of energy -- the bit changes state, and heat is produced.
> So all of the heat is waste heat.

Actually the car-drive and the bit-flip are much more identical than
different.  Its just that the time-scales are minutes/hours in one
case and nanoseconds or less in the other so our powers of
visualization are a bit taxed.

In more detail:

One drives a car from A to B for an hour (assume no change in
height above sea level so no potential difference).
All the energy that was there as petrol has been dissipated as heat.

A bit flips from zero to one. Pictorially
(this needs to be fixed-pitch font!):

+-------------
|
|
|
-----------+

However in reality that 'square' wave is always actually sloped

+----------
/
/
/
-----------+

Now for say CMOS technology, one may assume no currents in both zero
and one states (thats the C in CMOS). However when its neither zero
nor one (the sloping part) there will be current and therefore heat.

So just as the car burns energy in going from A to B, the flipflop
burns it in going from 0 to 1

Steven D'Aprano wrote:
> Not the point. There's a minimum amount of energy required to flip a bit.
> Everything beyond that is, in a sense, just wasted. You mentioned this
> yourself in your previous post. It's a *really* tiny amount of energy:
> about 17 meV at room temperature. That's 17 milli electron-volt, or
> 2.7×10^-21 joules. In comparison, Intel CMOS transistors have a gate
> charging energy of about 62500 eV (1×10^-14 J), around 3.7 million times
> greater.
>
> Broadly speaking, if the fundamental thermodynamic minimum amount of
> energy needed to flip a bit takes the equivalent of a single grain of
> white rice, then our current computing technology uses the equivalent of
> 175 Big Macs.

Well thats in the same realm as saying that by E=mc² a one gram stone can yield
21 billion calories energy.

[Ive forgotten how the units stack up, so as usual relyin on google