cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoTell me the truth ...piefed.jeena.netimagemessage-square127linkfedilinkarrow-up11.1Karrow-down116
arrow-up11.08Karrow-down1imageTell me the truth ...piefed.jeena.netcm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square127linkfedilink
minus-squareNιƙƙιDιɱҽʂ@lemmy.worldlinkfedilinkarrow-up4·edit-28 hours agoIt’s called bitshifting and is used to select which bits you want to modify so you can toggle them individually. 1 << 0 is the flag for the first bit 1 << 1 for the second 1 << 2 for the third and so on I think that’s correct. It’s been years since I’ve used this technique tbh 😅
It’s called bitshifting and is used to select which bits you want to modify so you can toggle them individually.
1 << 0 is the flag for the first bit
1 << 1 for the second
1 << 2 for the third and so on
I think that’s correct. It’s been years since I’ve used this technique tbh 😅