Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged bit

0 votes
1.3k views
1 answer
    I've got a really big number: 5799218898. And want to shift it right to 13 bits. So, windows-calculator ... but cannot find anything about that. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I'm working on a page that processes IP address information, but it's choking on the fact that integers are signed. ... /script> </body> </html> See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I was reading through some code examples and came across a & on Oracle's website on their Bitwise ... /javase/tutorial/java/nutsandbolts/examples/BitDemo.java Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I am very confused on right shift operation on negative number, here is the code. int n = -15; System.out.println ... number by 31 not 1 (the sign bit)? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    How can I implement division using bit-wise operators (not just division by powers of 2)? Describe it in detail. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I need a compact representation of an array of booleans, does Python have a builtin bitfield type or will I need to find an alternate solution? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Is there a built in function in python which will convert a binary string, for example '111111111111', to the two's complement integer -1? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Consider the following code: int i = 3 << 65; I would expect that the result is i==0, however the ... width of type int) or is this unspecified behavior? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I have C code in which I do the following. int nPosVal = +0xFFFF; // + Added for ease of understanding ... rounded off to -32768. Is this understanding correct? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Assuming I have two binary files A and B, how can I subtract the bytes of file B from the bytes of file A ... .com/questions/65928160/posix-subtract-bytes-of-file-b-from-file-a...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Example: Noughts and Crosses Say I have a bitboard for all occupied squares and using a mask I ... https://stackoverflow.com/questions/65645547/generating-moves-from-bitboard...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I was reading through some code examples and came across a & on Oracle's website on their Bitwise and Bit Shift ... .com/questions/17256644/how-does-the-bitwise-and-work-in-java...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I was reading through some code examples and came across a & on Oracle's website on their Bitwise and Bit Shift ... .com/questions/17256644/how-does-the-bitwise-and-work-in-java...
asked Oct 7, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I know that the following is true int i = 17; //binary 10001 int j = i << 1; //decimal 34, binary 100010 But ... questions/35167/is-there-a-way-to-perform-a-circular-bit-shift-in-c...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I found a video on youtube that says by using n&(n-1) we can able to count number of 1's bits and it's much faster ... /why-by-using-nn-1-is-not-able-to-calculate-number-of-1s-bits...
asked Oct 6, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    Generate string from integer with arbitrary base in JavaScript received the following answer: function parseInt( ... .log(toString(0, 'abcdefghijklmnopqrstuvwxyz0123456789+-'));...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I need to pack a number in 1byte (char), 2 bytes (short), 4 bytes (int) ... Online sandbox: https://sandbox.onlinephpfunctions.com/code/35bf7ffd4e50096c5cfe52901003ffe3b0e97d2d...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.9k views
1 answer
    Is there a reason why this happens? #include <stdio.h> void main() { int i, j; //Takes i as 0 with short printf("Enter two ... ^ j)) printf(" YES "); else printf(" NO "); }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.1k views
1 answer
    Is there a reason why this happens? #include <stdio.h> void main() { int i, j; //Takes i as 0 with short printf("Enter two ... ^ j)) printf(" YES "); else printf(" NO "); }...
asked Jan 27, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
3.7k views
1 answer
    I'm using bitsets and want to iterate over the set bits quickly, and without needing to know the max set bit ahead of time. Using this ... bits(109): print(int(log2(b))) 0 2 3 5 6...
asked Jan 25, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...