Bitcoin Forum
December 08, 2016, 12:14:14 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: What is a "signed int"?  (Read 2204 times)
Harvey
Newbie
*
Offline Offline

Activity: 28


Egoist


View Profile WWW
December 05, 2011, 09:33:40 PM
 #1

"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?

@HarveyAlpha (https://twitter.com/#!/HarveyAlpha) | It would be foolish to assert that there is no power above mine. Only the attitude that I take toward it will be quite another than that of the religious age: I shall be the enemy of every higher power.
1481199254
Hero Member
*
Offline Offline

Posts: 1481199254

View Profile Personal Message (Offline)

Ignore
1481199254
Reply with quote  #2

1481199254
Report to moderator
1481199254
Hero Member
*
Offline Offline

Posts: 1481199254

View Profile Personal Message (Offline)

Ignore
1481199254
Reply with quote  #2

1481199254
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
December 05, 2011, 09:37:16 PM
 #2

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.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2506


View Profile
December 05, 2011, 11:54:26 PM
 #3

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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
dree12
Legendary
*
Offline Offline

Activity: 1232



View Profile
December 06, 2011, 12:06:02 AM
 #4

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.
dark_st3alth
Jr. Member
*
Offline Offline

Activity: 33



View Profile
December 06, 2011, 02:50:06 AM
 #5

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).

.: Canadian Programmer, Web Designer, Linux & Windows User, System/Server Administrator :.

Donate: 1PBTSrRPURRAXNvpZoj4dJ2pkApU6Uzp4p

What's up with AMD/ATI & Mining? Forum Link
BTCurious
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
December 06, 2011, 03:20:34 AM
 #6

-----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-----

btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
December 06, 2011, 04:55:39 AM
 #7

@BTCurious  It took me 2 full seconds to get it.  I can't believe it took that long!  Good job. Would buy again.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
ineededausername
Hero Member
*****
Offline Offline

Activity: 784


bitcoin hundred-aire


View Profile
December 07, 2011, 12:04:25 AM
 #8

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...

(BFL)^2 < 0
antihexe
Newbie
*
Offline Offline

Activity: 19


View Profile
December 08, 2011, 02:57:32 AM
 #9

I wonder if he'll ever become more public about his identity. Certainly, at the very least, he's a funny guy.
finway
Hero Member
*****
Offline Offline

Activity: 714


View Profile
December 08, 2011, 08:16:45 AM
 #10

I don't get it  Angry

SomeoneWeird
Hero Member
*****
Offline Offline

Activity: 700


View Profile
December 08, 2011, 08:18:04 AM
 #11

-----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
BTC_Bear
B4 Foundation
VIP
Sr. Member
*
Offline Offline

Activity: 364


Best Offense is a Good Defense


View Profile WWW
December 08, 2011, 08:30:16 AM
 #12

-----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 Smiley

Corporations have been enthroned, An era of corruption in high places will follow and the money power will endeavor to prolong its reign by working on the prejudices of the people until wealth is aggregated in a few hands and the Republic is destroyed. ~Abe Lincoln 1ApJdWUdSWYw8n8HEATYhHXA9EYoRTy7c4
deepceleron
Legendary
*
Offline Offline

Activity: 1470



View Profile WWW
December 08, 2011, 12:33:30 PM
 #13

int prob_of_overflow ( myAge , actuarial.lifeTable )

payb.tc
Hero Member
*****
Offline Offline

Activity: 812



View Profile
December 08, 2011, 12:53:19 PM
 #14

-----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:


BTCurious
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
December 08, 2011, 12:55:14 PM
 #15

i found another one:

Grin

btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
December 08, 2011, 01:42:35 PM
 #16

I found another one too!


BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
deepceleron
Legendary
*
Offline Offline

Activity: 1470



View Profile WWW
December 08, 2011, 02:05:46 PM
 #17

I don't get it  Angry

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

terrytibbs
Hero Member
*****
Offline Offline

Activity: 560



View Profile
December 08, 2011, 02:14:18 PM
 #18

I found another one too!

pic
No! That's a framed int.!
notme
Legendary
*
Offline Offline

Activity: 1526


View Profile
December 08, 2011, 08:03:14 PM
 #19

I don't get it  Angry

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.....

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
notme
Legendary
*
Offline Offline

Activity: 1526


View Profile
December 08, 2011, 08:03:57 PM
 #20

I found another one too!

pic
No! That's a framed int.!

It's signed too.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!