"A type of primitive thought"
submitted by lliuratni
@DeveloperMemes why is it a byte?
@Centurionapollo @DeveloperMemes This is the reason why on system with low memory people doesn't use bool variables but use other variables where each bit represents another bool. since this is easy to mess up it is only a good idea where you really need to save some space even tow this can also have performance advances if done intelligently.
@DeveloperMemes doesn't the compiler optimize it for you though?
gaa dont tell me that! 😂
it was bad enough when i was taking the compliers course, (writing assembly runtime stuff for a python subset compiler on 486 linux) and every byte the C code threw at me was 32 bits on the stack. drove me crazy!
OTOH if bools are 64bit, then ints had damn well better ALSO be 64bit!
Many architectures also run all ALU instructions, and then MUX for the one asked for.
@DeveloperMemes I always assumed it was a byte to allow for error checking and parity corrections as a single bit can be flipped for many reasons which would be non-optimal to say the least.
@pswilde It's typically a byte for other reason - CPU simply work with bytes better than with individual bits. Alignment is a big concern with this as well.
@DeveloperMemes those poor wasted bastard bits...
@DeveloperMemes@social.cybre.town I discovered that in VBA, boolean is actually stored in two bits. Two.
cybre.town is an instance of Masterdon, a decentrialized and open source social media plattform. This instance is especially about tech/cyber stuff and is also available inside the tor network. - The name is inspired by cybre.space.