python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Question about Bitwise Shift in Microsoft C++
I am doing the following bitwise shift in Microsoft C++:
uint8_t arr[3] = {255, 255, 255};
uint8_t value = (arr[1] << 4) >> 4;
The result of these operations confused me quite a bit:
valu...
Runsheng Ma
Votes: 0
Answers: 2
How could I 0-interleave a number (binary)?
If I have 11, I'd like to perform some kind of bitwise operation and get 1010.
If I have 111, 101010.
If I have 101, 100010.
Can I do this? How?
If so, is it possible to do this arbitrarily, i.e., if ...
Liam Monninger
Votes: 0
Answers: 0
JavaScript BigInt print unsigned binary represenation
How do you print an unsigned integer when using JavaScript's BigInt?
BigInts can be printed as binary representation using toString(2). However for negative values this function just appends a - sign ...
Codey
Votes: 0
Answers: 2
Why is the expression true after bit shifting the value and condition with && in C
Have a look at the example:
unsigned char c = 64; /* 0100 0000 */
c = (c << 2 && 512); /* 512: 10 0000 0000 */
If I shift c two times to the left, I should get from 0100 0000 (64) to t...

B0r1
Votes: 0
Answers: 3