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

Programmer Humor

23420 readers
1760 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
[โ€“] Subverb@lemmy.world 39 points 1 week ago* (last edited 1 week ago) (7 children)

The 8-bit Intel 8051 family provides a dedicated bit-addressable memory space (addresses 20h-2Fh in internal RAM), giving 128 directly addressable bits. Used them for years. I'd imagine many microcontrollers have bit-width variables.

bit myFlag = 0;

Or even return from a function:

bit isValidInput(unsigned char input) { // Returns true (1) if input is valid, false (0) otherwise return (input >= '0' && input <= '9'); }

[โ€“] jkercher@programming.dev 5 points 1 week ago

And, you can have pointers to bits!

load more comments (6 replies)