Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Dumb question... (http://www.chiefdelphi.com/forums/showthread.php?t=75996)

xnaut 19-03-2009 17:01

Dumb question...
 
Does anyone know the actual comparative weight of lines of code?
yes i mean the weight of the little electrons and such

i heard someone else say in another thread --

Quote:

Originally Posted by DeepWater (Post 837617)
Each space = ~0.0001327 oz.


:p

Is this accurate?... it seems like a bunch over what it should be... just wondering...

tim_reiher 19-03-2009 17:09

Re: Dumb question...
 
Were you guys really that desperate on weight this year? :rolleyes:


If so, when in doubt, more 0's and fewer 1's. :P

xnaut 19-03-2009 17:12

Re: Dumb question...
 
Quote:

Originally Posted by tim_reiher (Post 838295)
Were you guys really that desperate on weight this year? :rolleyes:


If so, when in doubt, more 0's and fewer 1's. :P


lol... ya thats a good idea

our weight wasn't an issue this year, i was just curious and bored

martin417 19-03-2009 18:34

Re: Dumb question...
 
Discover magazine did an article several years ago, called "How much does the internet weigh?". In the article, they assumed that a zero weighed nothing, and a one weighed however many electrons it took to store that value on a mempry chip. If I remember correctly, all the data on the internet weighed way less than one billionth of an ounce.

OH look, here's the article!


Forgive any misrepresentations, I didn't re-read the article, and I may have mis-remembered the facts.

RyanCahoon 19-03-2009 18:45

Re: Dumb question...
 
Perhaps getting a bit more technical than is necessary, it's interesting to note that spaces themselves have no effect on 'weight' in compiled code. Whitespace characters [spaces, tabs, newlines (except in certain circumstances/languages)], along with comments, are thrown away by the Lexer, the part of the compiler that is responsible for taking the source code and turning it into a sequence of tokens, which is basically each word or symbol that appears in the source file. (Unless of course you're actually programming in White Space) Extra lines of code, however, may (in most cases yes, but they may actually get optimized away by the compiler) add 'weight' to the final compiled program. In order to control what may be written as 0s or 1s, however, you'll have to go to a lower level, in assembly code.

But seeing as each electron is 9.109 E−31 kg, you'd probably get more benefit with one pass of a metal file somewhere discrete. :rolleyes:

--Ryan

ay2b 19-03-2009 19:32

Re: Dumb question...
 
Quote:

Originally Posted by tim_reiher (Post 838295)
If so, when in doubt, more 0's and fewer 1's. :P

Ah, but which actually weighs more, a 1 or a 0? If you go with historical precedence (i.e. back to the punchcard days), I believe a "0" was unpunched and a "1" was punched, which means that a 0 weighs more than a 1.

tim_reiher 19-03-2009 20:25

Re: Dumb question...
 
Quote:

Originally Posted by ay2b (Post 838334)
Ah, but which actually weighs more, a 1 or a 0? If you go with historical precedence (i.e. back to the punchcard days), I believe a "0" was unpunched and a "1" was punched, which means that a 0 weighs more than a 1.

Hmm... interesting point...

I think if we had to have computers requiring punch cards on our robots, we might have bigger weight issues to worry about, though. :rolleyes:

GaryVoshol 19-03-2009 20:31

Re: Dumb question...
 
Zeros must weigh more - they're fatter.

(Hey, I resemble that shape) :p

Creator Mat 19-03-2009 23:13

Re: Dumb question...
 
so hypothetically speaking what would you do if your robot was so close to weight and everything physical was done away with until it was just structurally stable. And the weight of your code mattered:eek:.

Jibs 19-03-2009 23:20

Re: Dumb question...
 
Actually I believe 1s are heavier since a one represents a charged capacitor.

*read the article that was linked above* I'm not THAT geeky :p

Quote:

Originally Posted by Creator Mat (Post 838400)
so hypothetically speaking what would you do if your robot was so close to weight and everything physical was done away with until it was just structurally stable. And the weight of your code mattered:eek:.

Just another thing we can blame programmers for :D

Doug G 20-03-2009 00:07

Re: Dumb question...
 
Quote:

Originally Posted by Jibs (Post 838403)
Actually I believe 1s are heavier since a one represents a charged capacitor.

*read the article that was linked above* I'm not THAT geeky :p

Just another thing we can blame programmers for :D

I can't help myself.... A CHARGED CAP WEIGHS THE SAME AS A DISCHARGED CAP!! I've heard the same logic used incorrectly to explain that a dead battery weighs less than a fresh battery. CAP's store PE by separating charge, not storing one type of charge!! Ok, I'll leave it alone and not return... the teacher has left the room.

Nate Laverdure 20-03-2009 00:23

Re: Dumb question...
 
Quote:

Originally Posted by martin417 (Post 838313)
Discover magazine did an article several years ago, called "How much does the internet weigh?". In the article, they assumed that a zero weighed nothing, and a one weighed however many electrons it took to store that value on a mempry chip. If I remember correctly, all the data on the internet weighed way less than one billionth of an ounce.

OH look, here's the article!


Forgive any misrepresentations, I didn't re-read the article, and I may have mis-remembered the facts.

I remember enjoying that article immensely when I first read it. If you follow the figures published there, you'll find that data weighs 6.4 * 10^-31 oz per kilobyte. This means you'll need about 1.5 * 10^21 terabytes of 1s and 0s to have an ounce of data. Interestingly, this article provides further figures and even suggests that the entire internet weighs about two ounces.

Now, if you consider that the entire universe is made of math, then you can imagine how much data we're all messing with every day.

RyanCahoon 20-03-2009 00:28

Re: Dumb question...
 
Quote:

Originally Posted by Doug G (Post 838409)
I can't help myself.... A CHARGED CAP WEIGHS THE SAME AS A DISCHARGED CAP!! I've heard the same logic used incorrectly to explain that a dead battery weighs less than a fresh battery. CAP's store PE by separating charge, not storing one type of charge!! Ok, I'll leave it alone and not return... the teacher has left the room.

But what happens if it's not actually a capacitor, but a piece of NAND Flash memory using quantum tunnel injection? :cool:

Actually I have no idea what the answer is.

Here's an interesting concept however: If you pick up enough static from the regolith, can you get enough weight in extra electrons to give you a significant advantage over the competition? That all assumes you're not actually losing electrons to the floor instead...

--Ryan

Uberbots 20-03-2009 09:19

Re: Dumb question...
 
Quote:

Originally Posted by RyanCahoon (Post 838417)
But what happens if it's not actually a capacitor, but a piece of NAND Flash memory using quantum tunnel injection? :cool:

Actually I have no idea what the answer is.

Here's an interesting concept however: If you pick up enough static from the regolith, can you get enough weight in extra electrons to give you a significant advantage over the competition? That all assumes you're not actually losing electrons to the floor instead...

--Ryan

If you lose that much weight in electrons, you had better be prepared for one heluva static shock when you pick up the robot again.

xnaut 20-03-2009 18:46

Re: Dumb question...
 
wow... i never expected this thread to pick up... but then again here it goes... first teams suprise me everyday...


All times are GMT -5. The time now is 10:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi