1167
Tell me the truth ... (piefed.jeena.net)
you are viewing a single comment's thread
view the rest of the comments
[-] ricecake@sh.itjust.works 135 points 10 months ago

I set all 8 bits to 1 because I want it to be really true.

[-] laranis@lemmy.zip 95 points 10 months ago* (last edited 10 months ago)

01111111 = true

11111111 = negative true = false

[-] StellarSt0rm@lemmy.world 48 points 10 months ago
[-] ThatGuy46475@lemmy.world 29 points 10 months ago
[-] foofiepie@lemmy.world 22 points 10 months ago

100001111 = maybe not

[-] caseyweederman@lemmy.ca 4 points 9 months ago

0011 1111 = could you repeat the question

[-] assa123@lemmy.world 2 points 9 months ago

00000001 00000000 00001111 10101010

[-] tfm@europe.pub 7 points 10 months ago

Schrödingers Boolean

[-] Venator@lemmy.nz 1 points 9 months ago

Is this quantum computing? 😜

[-] VonReposti@feddit.dk 34 points 10 months ago

What if it's an unsigned boolean?

[-] ivanovsky@lemm.ee 25 points 10 months ago

Cthulhu shows up.

[-] laranis@lemmy.zip 3 points 10 months ago

Common misconception... Unsigned booleans (ubool) are always 16-bits.

[-] CosmicTurtle0@lemmy.dbzer0.com 1 points 10 months ago
[-] ricecake@sh.itjust.works 13 points 10 months 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 .

[-] OpenStars@piefed.social 7 points 10 months ago

Why do alternative facts always gotta show up uninvited to the party? 🥳

[-] pocker_machine@lemmy.world 4 points 10 months ago

So all this time true was actually false and false was actually true ?

[-] laranis@lemmy.zip 3 points 10 months ago

Depends on if you are on a big endian or little endian architecture.

[-] pocker_machine@lemmy.world 7 points 10 months ago

Come on man, I’m not gonna talk about my endian publicly

[-] Jankatarch@lemmy.world 2 points 9 months ago

negative true = negative non-zero = non-zero = true.

[-] OpenStars@piefed.social 15 points 10 months ago

TIL, 255 is the new 1.

Aka -1 >> 1 : TRUE

[-] ricecake@sh.itjust.works 8 points 10 months ago

But only if you really mean it. If not, it's a syntax error and the compiler will know.

[-] p_consti@lemmy.world 12 points 10 months 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

[-] palordrolap@fedia.io 10 points 10 months 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.

this post was submitted on 15 May 2025
1167 points (98.6% liked)

Programmer Humor

30289 readers
1874 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS