• feddup@feddit.uk
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 hours ago

    A boolean value only needs 1 bit (on or off) for true or false. However the smallest bit of addressable memory is a byte (8 bits) hence 7 are technically wasted.

    For low memory devices you could instead store 8 different Boolean values in one single byte by using bit masking instead