[DiscordArchive] Can you show example code for that?
[DiscordArchive] Can you show example code for that?
Archived author: Kavligula • Posted: 2018-06-03T20:58:06.444000+00:00
Original source
value & 1111111100000000
Archived author: Kavligula • Posted: 2018-06-03T20:58:17.058000+00:00
Original source
And that'd return the first 8 bits
Archived author: Kavligula • Posted: 2018-06-03T20:58:21.450000+00:00
Original source
Now to shift it to get the seven bits
Archived author: Kavligula • Posted: 2018-06-03T20:58:58.940000+00:00
Original source
You'd shift the mask by however much, so you'd have to shift it by 8 to get the next 8 bits but drop the last bit in the mask
Archived author: Kavligula • Posted: 2018-06-03T20:59:20.811000+00:00
Original source
Which I don't know how to do off the top of my head, if you wanted to brute force it you'd get another mask with the last 8 bits dropped off
Archived author: Kavligula • Posted: 2018-06-03T20:59:30.431000+00:00
Original source
So basically you'd take the mask of 1111111100000000 >> 8
Archived author: Kavligula • Posted: 2018-06-03T20:59:39.168000+00:00
Original source
Then compare it to another mask which had the last bit off
Archived author: Kavligula • Posted: 2018-06-03T20:59:44.335000+00:00
Original source
To compare the seven bits
Archived author: Skarn • Posted: 2018-06-03T20:59:52.940000+00:00
Original source
yeah but I need to take away one last bit
Archived author: Skarn • Posted: 2018-06-03T20:59:58.632000+00:00
Original source
that's what is confusing me