▲ 1168 ▼ Tell me the truth ... (europe.pub) submitted 1 year ago by cm0002@lemmy.world to c/programmer_humor@programming.dev 170 comments fedilink hide all child comments
[–] ricecake@sh.itjust.works 135 points 1 year ago (23 children) I set all 8 bits to 1 because I want it to be really true. permalink fedilink source hideshow 23 child comments replies: [–] laranis@lemmy.zip 94 points 1 year ago* (18 children) 01111111 = true 11111111 = negative true = false permalink fedilink source parent hideshow 18 child comments replies: [–] StellarSt0rm@lemmy.world 48 points 1 year ago (6 children) 00001111 = maybe permalink fedilink source parent hideshow 6 child comments replies: [–] ThatGuy46475@lemmy.world 29 points 1 year ago (3 children) 10101010 = I don’t know permalink fedilink source parent hideshow 3 child comments replies: [–] foofiepie@lemmy.world 22 points 1 year ago 100001111 = maybe not permalink fedilink source parent [–] caseyweederman@lemmy.ca 4 points 1 year ago 0011 1111 = could you repeat the question permalink fedilink source parent [–] assa123@lemmy.world 1 point 1 year ago 00000001 00000000 00001111 10101010 permalink fedilink source parent [–] tfm 7 points 1 year ago Schrödingers Boolean permalink fedilink source parent [–] Venator@lemmy.nz 1 point 1 year ago Is this quantum computing? 😜 permalink fedilink source parent [–] VonReposti@feddit.dk 34 points 1 year ago (4 children) What if it's an unsigned boolean? permalink fedilink source parent hideshow 4 child comments replies: [–] ivanovsky@lemm.ee 25 points 1 year ago Cthulhu shows up. permalink fedilink source parent [–] hakunawazo@lemmy.world 17 points 1 year ago permalink fedilink source parent [–] laranis@lemmy.zip 3 points 1 year ago Common misconception... Unsigned booleans (ubool) are always 16-bits. permalink fedilink source parent [–] CosmicTurtle0@lemmy.dbzer0.com 1 point 1 year ago Super true. permalink fedilink source parent [–] ricecake@sh.itjust.works 13 points 1 year ago Could also store our bools as floats. 00111111100000000000000000000000 is true and 10111111100000000000000000000000 is negative true. Has the fun twist that true & false is true and true | false is false . permalink fedilink source parent [–] OpenStars@piefed.social 7 points 1 year ago Why do alternative facts always gotta show up uninvited to the party? 🥳 permalink fedilink source parent [–] pocker_machine@lemmy.world 4 points 1 year ago (2 children) So all this time true was actually false and false was actually true ? permalink fedilink source parent hideshow 2 child comments replies: [–] laranis@lemmy.zip 3 points 1 year ago (1 child) Depends on if you are on a big endian or little endian architecture. permalink fedilink source parent hideshow 1 child comment replies: [–] pocker_machine@lemmy.world 7 points 1 year ago Come on man, I’m not gonna talk about my endian publicly permalink fedilink source parent [–] Jankatarch@lemmy.world 2 points 1 year ago negative true = negative non-zero = non-zero = true. permalink fedilink source parent [–] OpenStars@piefed.social 15 points 1 year ago (1 child) TIL, 255 is the new 1. Aka -1 >> 1 : TRUE permalink fedilink source parent hideshow 1 child comment replies: [–] ricecake@sh.itjust.works 8 points 1 year ago But only if you really mean it. If not, it's a syntax error and the compiler will know. permalink fedilink source parent [–] p_consti@lemmy.world 11 points 1 year ago I was programming in assembly for ARM (some cortex chip) and I kid you not the C program we were integrating with required 255, with just 1 it read it as false permalink fedilink source parent [–] palordrolap@fedia.io 9 points 1 year ago You jest, but on some older computers, all ones was the official truth value. Other values may also have been true in certain contexts, but that was the guaranteed one. permalink fedilink source parent
[–] laranis@lemmy.zip 94 points 1 year ago* (18 children) 01111111 = true 11111111 = negative true = false permalink fedilink source parent hideshow 18 child comments replies: [–] StellarSt0rm@lemmy.world 48 points 1 year ago (6 children) 00001111 = maybe permalink fedilink source parent hideshow 6 child comments replies: [–] ThatGuy46475@lemmy.world 29 points 1 year ago (3 children) 10101010 = I don’t know permalink fedilink source parent hideshow 3 child comments replies: [–] foofiepie@lemmy.world 22 points 1 year ago 100001111 = maybe not permalink fedilink source parent [–] caseyweederman@lemmy.ca 4 points 1 year ago 0011 1111 = could you repeat the question permalink fedilink source parent [–] assa123@lemmy.world 1 point 1 year ago 00000001 00000000 00001111 10101010 permalink fedilink source parent [–] tfm 7 points 1 year ago Schrödingers Boolean permalink fedilink source parent [–] Venator@lemmy.nz 1 point 1 year ago Is this quantum computing? 😜 permalink fedilink source parent [–] VonReposti@feddit.dk 34 points 1 year ago (4 children) What if it's an unsigned boolean? permalink fedilink source parent hideshow 4 child comments replies: [–] ivanovsky@lemm.ee 25 points 1 year ago Cthulhu shows up. permalink fedilink source parent [–] hakunawazo@lemmy.world 17 points 1 year ago permalink fedilink source parent [–] laranis@lemmy.zip 3 points 1 year ago Common misconception... Unsigned booleans (ubool) are always 16-bits. permalink fedilink source parent [–] CosmicTurtle0@lemmy.dbzer0.com 1 point 1 year ago Super true. permalink fedilink source parent [–] ricecake@sh.itjust.works 13 points 1 year ago Could also store our bools as floats. 00111111100000000000000000000000 is true and 10111111100000000000000000000000 is negative true. Has the fun twist that true & false is true and true | false is false . permalink fedilink source parent [–] OpenStars@piefed.social 7 points 1 year ago Why do alternative facts always gotta show up uninvited to the party? 🥳 permalink fedilink source parent [–] pocker_machine@lemmy.world 4 points 1 year ago (2 children) So all this time true was actually false and false was actually true ? permalink fedilink source parent hideshow 2 child comments replies: [–] laranis@lemmy.zip 3 points 1 year ago (1 child) Depends on if you are on a big endian or little endian architecture. permalink fedilink source parent hideshow 1 child comment replies: [–] pocker_machine@lemmy.world 7 points 1 year ago Come on man, I’m not gonna talk about my endian publicly permalink fedilink source parent [–] Jankatarch@lemmy.world 2 points 1 year ago negative true = negative non-zero = non-zero = true. permalink fedilink source parent
[–] StellarSt0rm@lemmy.world 48 points 1 year ago (6 children) 00001111 = maybe permalink fedilink source parent hideshow 6 child comments replies: [–] ThatGuy46475@lemmy.world 29 points 1 year ago (3 children) 10101010 = I don’t know permalink fedilink source parent hideshow 3 child comments replies: [–] foofiepie@lemmy.world 22 points 1 year ago 100001111 = maybe not permalink fedilink source parent [–] caseyweederman@lemmy.ca 4 points 1 year ago 0011 1111 = could you repeat the question permalink fedilink source parent [–] assa123@lemmy.world 1 point 1 year ago 00000001 00000000 00001111 10101010 permalink fedilink source parent [–] tfm 7 points 1 year ago Schrödingers Boolean permalink fedilink source parent [–] Venator@lemmy.nz 1 point 1 year ago Is this quantum computing? 😜 permalink fedilink source parent
[–] ThatGuy46475@lemmy.world 29 points 1 year ago (3 children) 10101010 = I don’t know permalink fedilink source parent hideshow 3 child comments replies: [–] foofiepie@lemmy.world 22 points 1 year ago 100001111 = maybe not permalink fedilink source parent [–] caseyweederman@lemmy.ca 4 points 1 year ago 0011 1111 = could you repeat the question permalink fedilink source parent [–] assa123@lemmy.world 1 point 1 year ago 00000001 00000000 00001111 10101010 permalink fedilink source parent
[–] foofiepie@lemmy.world 22 points 1 year ago 100001111 = maybe not permalink fedilink source parent
[–] caseyweederman@lemmy.ca 4 points 1 year ago 0011 1111 = could you repeat the question permalink fedilink source parent
[–] assa123@lemmy.world 1 point 1 year ago 00000001 00000000 00001111 10101010 permalink fedilink source parent
[–] Venator@lemmy.nz 1 point 1 year ago Is this quantum computing? 😜 permalink fedilink source parent
[–] VonReposti@feddit.dk 34 points 1 year ago (4 children) What if it's an unsigned boolean? permalink fedilink source parent hideshow 4 child comments replies: [–] ivanovsky@lemm.ee 25 points 1 year ago Cthulhu shows up. permalink fedilink source parent [–] hakunawazo@lemmy.world 17 points 1 year ago permalink fedilink source parent [–] laranis@lemmy.zip 3 points 1 year ago Common misconception... Unsigned booleans (ubool) are always 16-bits. permalink fedilink source parent [–] CosmicTurtle0@lemmy.dbzer0.com 1 point 1 year ago Super true. permalink fedilink source parent
[–] laranis@lemmy.zip 3 points 1 year ago Common misconception... Unsigned booleans (ubool) are always 16-bits. permalink fedilink source parent
[–] ricecake@sh.itjust.works 13 points 1 year ago Could also store our bools as floats. 00111111100000000000000000000000 is true and 10111111100000000000000000000000 is negative true. Has the fun twist that true & false is true and true | false is false . permalink fedilink source parent
[–] OpenStars@piefed.social 7 points 1 year ago Why do alternative facts always gotta show up uninvited to the party? 🥳 permalink fedilink source parent
[–] pocker_machine@lemmy.world 4 points 1 year ago (2 children) So all this time true was actually false and false was actually true ? permalink fedilink source parent hideshow 2 child comments replies: [–] laranis@lemmy.zip 3 points 1 year ago (1 child) Depends on if you are on a big endian or little endian architecture. permalink fedilink source parent hideshow 1 child comment replies: [–] pocker_machine@lemmy.world 7 points 1 year ago Come on man, I’m not gonna talk about my endian publicly permalink fedilink source parent
[–] laranis@lemmy.zip 3 points 1 year ago (1 child) Depends on if you are on a big endian or little endian architecture. permalink fedilink source parent hideshow 1 child comment replies: [–] pocker_machine@lemmy.world 7 points 1 year ago Come on man, I’m not gonna talk about my endian publicly permalink fedilink source parent
[–] pocker_machine@lemmy.world 7 points 1 year ago Come on man, I’m not gonna talk about my endian publicly permalink fedilink source parent
[–] Jankatarch@lemmy.world 2 points 1 year ago negative true = negative non-zero = non-zero = true. permalink fedilink source parent
[–] OpenStars@piefed.social 15 points 1 year ago (1 child) TIL, 255 is the new 1. Aka -1 >> 1 : TRUE permalink fedilink source parent hideshow 1 child comment replies: [–] ricecake@sh.itjust.works 8 points 1 year ago But only if you really mean it. If not, it's a syntax error and the compiler will know. permalink fedilink source parent
[–] ricecake@sh.itjust.works 8 points 1 year ago But only if you really mean it. If not, it's a syntax error and the compiler will know. permalink fedilink source parent
[–] p_consti@lemmy.world 11 points 1 year ago I was programming in assembly for ARM (some cortex chip) and I kid you not the C program we were integrating with required 255, with just 1 it read it as false permalink fedilink source parent
[–] palordrolap@fedia.io 9 points 1 year ago You jest, but on some older computers, all ones was the official truth value. Other values may also have been true in certain contexts, but that was the guaranteed one. permalink fedilink source parent