1. How to use a bitwise operator to pass multiple Integer values into a function for Java? stackoverflow.comIn application frameworks I keep seeing frameworks that allow you to pass in multiple Int values (generally used in place of an enum) into a function. For example:
|
2. store a string in an int stackoverflow.comi try to store a string into an integer as follows: i read the characters of the string and every 4 characters i do this:
|
3. Why does bitwise AND of two short values result in an int value in Java? stackoverflow.com
I get a compiler error:
If I'm not totally wrong the ... |
4. Wrapping 4 integers in a 64 bit long - java bitwise stackoverflow.comAlright, so I have 4 integers I want to wrap in a long. The 4 integers all contains 3 values, positioned in the first 2 bytes:
{pppppp} represents one ... |
5. A question in java.lang.Integer internal code stackoverflow.comWhile looking in the code of the method: Integer.toHexString I found the following code :
|
6. Count bits used in int stackoverflow.comIf you have the binary number 10110 how can I get it to return 5? e.g a number that tells how many bits are used? There are some likewise examples listed ... |
7. 16 bit barrel shift in Java stackoverflow.comI'm trying to do a rotate right (barrel shift) on an int in Java, e.g.
I know I can do a right shift ... |
8. Bitwise manipulation of signed integers stackoverflow.com
what "r" will show and how?
|
9. Bitwise devision? (Changing formats of ints) stackoverflow.comI'm using Java. I have an integer where: Bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue.I would like to change this to an int ... |
10. Packing 4 bytes into an int stackoverflow.comPossible Duplicate:I'm trying to pack 4 bytes into an int using some of the solutions found here, but it doesn't ... |
11. Bitwise operator for simply flipping all bits in an integer? stackoverflow.comI have to flip all bits in a binary representation of an integer. Given:
The output should be
What is the bitwise operator to accomplish this when used with an integer? For ... |
12. Java get first and last 2 byte from int var stackoverflow.comI want convert an int into 2 bytes representing that int. Probably must use bitwise and bit shifting, but I dont know what to do.
|
13. bitwise addition of two integers coderanch.comI am having difficulty with bitwise addition of 2 integers without using arithmetic operators. My logic is suppose we have to add 3+3=6 in 2's compliment addition the logic is carry 11 (3)0000 0011 (3)0000 0011 _____________ 0000 0110 (6 ) ------------------------ I have understood the boolean logic. The task is now to write a java program without using any arithmetic ... |
14. How do i convert a int to a binary with bitwise operators only? java-forums.orgAre you asking how to get a String representation of the binary value of an int? To do that you need to look at each bit position of an int and test if its a 0 or a 1. Use the AND operator for that. Remember: 1 AND 1 = 1 1 AND 0 = 0 To look at all 32 ... |
15. Bitwise shift of short integers forums.oracle.comI am not able to do bitwise right shift of short integers in a consistent way. For instance: short bitVal = (short)0xC007; // bitVal == -16377 short shoulBeNegative = 0xC007 >> 2; // with integers the sign bit is preserved not with short!! short shouldBePositive = (short)(bitVal >>> 2); // with integers the sign bit is lost, not so with short!! ... |