Bitcoin Forum

Other => Beginners & Help => Topic started by: Harvey on December 05, 2011, 09:33:40 PM



Title: What is a "signed int"?
Post by: Harvey on December 05, 2011, 09:33:40 PM
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi

What is a signed int and why should they be unsigned, according to Satoshi?


Title: Re: What is a "signed int"?
Post by: btc_artist on December 05, 2011, 09:37:16 PM
A signed integer can be either negative or positive (- or +), such as 55 and -55.  An unsigned int can only be positive.  If you only need to deal with positive numbers, you should use unsigned ints because the maximum integer number the type can hold will be twice as much as a signed int.


Title: Re: What is a "signed int"?
Post by: theymos on December 05, 2011, 11:54:26 PM
It's the "within the next 25 years" part that makes the quote funny. Representing time with a signed int doesn't become a problem for a long time, so Satoshi was being sarcastic.

Am I the only one who finds this quote funny? Maybe it needs more context.


Title: Re: What is a "signed int"?
Post by: dree12 on December 06, 2011, 12:06:02 AM
It's the "within the next 25 years" part that makes the quote funny. Representing time with a signed int doesn't become a problem for a long time, so Satoshi was being sarcastic.

Am I the only one who finds this quote funny? Maybe it needs more context.
I found it funny, but that's because I have background in Unix timekeeping and C jargon. I assume the average person doesn't have this knowledge, and therefore it would not make sense to them.


Title: Re: What is a "signed int"?
Post by: dark_st3alth on December 06, 2011, 02:50:06 AM
A signed integer can be either negative or positive (- or +), such as 55 and -55.  An unsigned int can only be positive.  If you only need to deal with positive numbers, you should use unsigned ints because the maximum integer number the type can hold will be twice as much as a signed int.

Correct.

We could get into the amount of values it can hold, but that maybe a little more advanced (like a 64 bit unsigned integer).


Title: Re: What is a "signed int"?
Post by: BTCurious on December 06, 2011, 03:20:34 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJO3YnoAAoJEFonJil8Kq9nW50H/RXpag1ZM9Yz9w1l/JDBa+tc
vA/VyZFRQbo2f+H+6TuQ7iFjgCraOuT6CUkRwpkXMw2cJ0ofD87ftnayLM7SxKH+
Xey8APQV7Vm3yXYKH7tDGcXuo9DrQLpT0pKkTuWmoOwH884evhDOVHPm1ev/lGot
lXARdBb6Jf1ANdaeOP22RxWL97UxZWF0ePvN0z3bPNehza/sHqmOlXdiETAjkiKy
juaQ6TdfhBFuhNY0QY50R9HEItkwG+69H2dguV3B472cjHcHvv5bUCTrK8wPCwhw
up/5WEsW56lv6e06mU4r0XNGTkAzQ5B5AgTLHTdMvUMabZ4Lfygzy7+5jU/QhJ4=
=scw1
-----END PGP SIGNATURE-----


Title: Re: What is a "signed int"?
Post by: btc_artist on December 06, 2011, 04:55:39 AM
@BTCurious  It took me 2 full seconds to get it.  I can't believe it took that long!  Good job. Would buy again.


Title: Re: What is a "signed int"?
Post by: ineededausername on December 07, 2011, 12:04:25 AM
It's the "within the next 25 years" part that makes the quote funny. Representing time with a signed int doesn't become a problem for a long time, so Satoshi was being sarcastic.

Am I the only one who finds this quote funny? Maybe it needs more context.
I found it funny, but that's because I have background in Unix timekeeping and C jargon. I assume the average person doesn't have this knowledge, and therefore it would not make sense to them.

I also found it funny.  Doesn't need more context right now, but maybe when "commoners" adopt Bitcoin...


Title: Re: What is a "signed int"?
Post by: antihexe on December 08, 2011, 02:57:32 AM
I wonder if he'll ever become more public about his identity. Certainly, at the very least, he's a funny guy.


Title: Re: What is a "signed int"?
Post by: finway on December 08, 2011, 08:16:45 AM
I don't get it  >:(


Title: Re: What is a "signed int"?
Post by: SomeoneWeird on December 08, 2011, 08:18:04 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJO3YnoAAoJEFonJil8Kq9nW50H/RXpag1ZM9Yz9w1l/JDBa+tc
vA/VyZFRQbo2f+H+6TuQ7iFjgCraOuT6CUkRwpkXMw2cJ0ofD87ftnayLM7SxKH+
Xey8APQV7Vm3yXYKH7tDGcXuo9DrQLpT0pKkTuWmoOwH884evhDOVHPm1ev/lGot
lXARdBb6Jf1ANdaeOP22RxWL97UxZWF0ePvN0z3bPNehza/sHqmOlXdiETAjkiKy
juaQ6TdfhBFuhNY0QY50R9HEItkwG+69H2dguV3B472cjHcHvv5bUCTrK8wPCwhw
up/5WEsW56lv6e06mU4r0XNGTkAzQ5B5AgTLHTdMvUMabZ4Lfygzy7+5jU/QhJ4=
=scw1
-----END PGP SIGNATURE-----

hahahaahahahahah


Title: Re: What is a "signed int"?
Post by: JusticeForYou on December 08, 2011, 08:30:16 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJO3YnoAAoJEFonJil8Kq9nW50H/RXpag1ZM9Yz9w1l/JDBa+tc
vA/VyZFRQbo2f+H+6TuQ7iFjgCraOuT6CUkRwpkXMw2cJ0ofD87ftnayLM7SxKH+
Xey8APQV7Vm3yXYKH7tDGcXuo9DrQLpT0pKkTuWmoOwH884evhDOVHPm1ev/lGot
lXARdBb6Jf1ANdaeOP22RxWL97UxZWF0ePvN0z3bPNehza/sHqmOlXdiETAjkiKy
juaQ6TdfhBFuhNY0QY50R9HEItkwG+69H2dguV3B472cjHcHvv5bUCTrK8wPCwhw
up/5WEsW56lv6e06mU4r0XNGTkAzQ5B5AgTLHTdMvUMabZ4Lfygzy7+5jU/QhJ4=
=scw1
-----END PGP SIGNATURE-----

Theymos a little humorous, but (±1) for BTCurious :)


Title: Re: What is a "signed int"?
Post by: deepceleron on December 08, 2011, 12:33:30 PM
int prob_of_overflow ( myAge , actuarial.lifeTable )


Title: Re: What is a "signed int"?
Post by: payb.tc on December 08, 2011, 12:53:19 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

7
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJO3YnoAAoJEFonJil8Kq9nW50H/RXpag1ZM9Yz9w1l/JDBa+tc
vA/VyZFRQbo2f+H+6TuQ7iFjgCraOuT6CUkRwpkXMw2cJ0ofD87ftnayLM7SxKH+
Xey8APQV7Vm3yXYKH7tDGcXuo9DrQLpT0pKkTuWmoOwH884evhDOVHPm1ev/lGot
lXARdBb6Jf1ANdaeOP22RxWL97UxZWF0ePvN0z3bPNehza/sHqmOlXdiETAjkiKy
juaQ6TdfhBFuhNY0QY50R9HEItkwG+69H2dguV3B472cjHcHvv5bUCTrK8wPCwhw
up/5WEsW56lv6e06mU4r0XNGTkAzQ5B5AgTLHTdMvUMabZ4Lfygzy7+5jU/QhJ4=
=scw1
-----END PGP SIGNATURE-----

i found another one:

http://www.freefoto.com/images/810/14/810_14_6664---40-kilometer-speed-sign_web.jpg


Title: Re: What is a "signed int"?
Post by: BTCurious on December 08, 2011, 12:55:14 PM
;D


Title: Re: What is a "signed int"?
Post by: btc_artist on December 08, 2011, 01:42:35 PM
I found another one too!

https://i.imgur.com/Pff8w.jpg


Title: Re: What is a "signed int"?
Post by: deepceleron on December 08, 2011, 02:05:46 PM
I don't get it  >:(

It's a lame joke, to use an alternate meaning of "signed" integers, besides "to include the negatives of non-zero natural numbers".


Title: Re: What is a "signed int"?
Post by: terrytibbs on December 08, 2011, 02:14:18 PM
I found another one too!

pic
No! That's a framed int.!


Title: Re: What is a "signed int"?
Post by: notme on December 08, 2011, 08:03:14 PM
I don't get it  >:(

It's a lame joke, to use an alternate meaning of "signed" integers, besides "to include the negatives of non-zero natural numbers".


If only signed ints included the negatives of all non-zero natural numbers.....


Title: Re: What is a "signed int"?
Post by: notme on December 08, 2011, 08:03:57 PM
I found another one too!

pic
No! That's a framed int.!

It's signed too.


Title: Re: What is a "signed int"?
Post by: SomeoneWeird on December 09, 2011, 02:00:35 AM
this thread wins.


Title: Re: What is a "signed int"?
Post by: dree12 on March 21, 2013, 08:15:36 PM
It's the "within the next 25 years" part that makes the quote funny. Representing time with a signed int doesn't become a problem for a long time, so Satoshi was being sarcastic.

Am I the only one who finds this quote funny? Maybe it needs more context.

Necro!

It turns out that this post contains an error; representing time with a signed int will in fact become a problem in only 25 years—exactly what Satoshi said.

Thread necromancy is better than starting a new thread, because things are less fragmented. Plus, this is the newbie section, and more topics on the same subject are exactly what it needs less of.


Title: Re: What is a "signed int"?
Post by: Gator-hex on March 21, 2013, 08:23:46 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D


Title: Re: What is a "signed int"?
Post by: Richy_T on March 21, 2013, 08:44:59 PM
Ooh, I found one.

http://i.istockimg.com/file_thumbview_approve/19286178/2/stock-photo-19286178-number-eight-on-american-sign-language-alphabet.jpg


Title: Re: What is a "signed int"?
Post by: BTCurious on April 29, 2013, 09:53:32 AM
There are 10 kinds of people, those that know binary and those that aren't really bothered by this quote not ending the way they thought it would.


Title: Re: What is a "signed int"?
Post by: JusticeForYou on July 01, 2013, 09:50:12 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?


Title: Re: What is a "signed int"?
Post by: notme on July 02, 2013, 05:03:10 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?

10 in binary is equivalent to decimal 2

100 in binary is equivalent to decimal 4


Title: Re: What is a "signed int"?
Post by: JusticeForYou on July 02, 2013, 05:32:26 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?

10 in binary is equivalent to decimal 2

100 in binary is equivalent to decimal 4

LOL, I guess you missed it.


Title: Re: What is a "signed int"?
Post by: notme on July 02, 2013, 05:36:20 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?

10 in binary is equivalent to decimal 2

100 in binary is equivalent to decimal 4

LOL, I guess you missed it.

Please explain, because I'm still missing it.

Unless you are being a grammar nazi and viewing it as a list of 3 items instead of a clause followed by a list of two items because of the usage of a comma rather than a colon.  If that's it then you should work on your comedy.  If that's not it, you should still work on your comedy since it needs explanation.


Title: Re: What is a "signed int"?
Post by: JusticeForYou on July 02, 2013, 08:12:22 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?

10 in binary is equivalent to decimal 2

100 in binary is equivalent to decimal 4

LOL, I guess you missed it.

Please explain, because I'm still missing it.

Unless you are being a grammar nazi and viewing it as a list of 3 items instead of a clause followed by a list of two items because of the usage of a comma rather than a colon.  If that's it then you should work on your comedy.  If that's not it, you should still work on your comedy since it needs explanation.

Meh... Ok

It was the irrelevance of the number itself. 10 kinds of people, etc... at first glance you divide 5 get it, 5 don't get it. Same with 4, 2 get it, 2 don't get it.

Better yet would be: There is 1 kind of person that gets binary, the one that does and the one that doesn't.



Title: Re: What is a "signed int"?
Post by: dree12 on July 02, 2013, 08:22:00 PM
Try this one geeks...

There are 10 kinds of people, those that understand binary, and those that don't.  :D

Wouldn't that be 4 kinds of people?

10 in binary is equivalent to decimal 2

100 in binary is equivalent to decimal 4

LOL, I guess you missed it.

Please explain, because I'm still missing it.

Unless you are being a grammar nazi and viewing it as a list of 3 items instead of a clause followed by a list of two items because of the usage of a comma rather than a colon.  If that's it then you should work on your comedy.  If that's not it, you should still work on your comedy since it needs explanation.

Meh... Ok

It was the irrelevance of the number itself. 10 kinds of people, etc... at first glance you divide 5 get it, 5 don't get it. Same with 4, 2 get it, 2 don't get it.

Better yet would be: There is 1 kind of person that gets binary, the one that does and the one that doesn't.



My personal take on this joke:

There is 1 type of person in this world: those who expected a different joke.


Title: Re: What is a "signed int"?
Post by: JusticeForYou on July 02, 2013, 08:38:54 PM
In any case, is 20 years up so I can finally sign the int?


Title: Re: What is a "signed int"?
Post by: BTCurious on July 03, 2013, 08:17:11 AM
In any case, is 20 years up so I can finally sign the int?
Shh, not so loud! You can sign it, but only if you don't tell Satoshi.