this post was submitted on 15 May 2025
1090 points (98.5% liked)

Programmer Humor

23545 readers
3644 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 2 weeks ago (1 children)

Redundancy is nice in the event of bitflip errors

[–] [email protected] 11 points 2 weeks ago (2 children)

Is the redundancy used for bools? I mean in actual practice.

[–] [email protected] 5 points 2 weeks ago

iunno ¯_(ツ)_/¯

[–] [email protected] 2 points 2 weeks ago

C/C++ considers an nonzero number, as your true value but false is only zero. This would allow you to guard against going from true to false via bit flip but not false to true.
Other languages like rust define 0 to be false and 1 to be true and any other bit pattern to be invalid for bools.