Top "Bit" questions

A bit is a single binary digit.

Bitwise operator for simply flipping all bits in an integer?

I have to flip all bits in a binary representation of an integer. Given: 10101 The output should be 01010 What is …

java binary bit-manipulation bit bitwise-operators
How to extract specific bits from a number in C?

I need to extract specific part (no of bits) of a short data type in C. For Example I have …

c bit-manipulation bit bit-shift
Check value of least significant bit (LSB) and most significant bit (MSB) in C/C++

I need to check the value of the least significant bit (LSB) and most significant bit (MSB) of an integer …

c++ c integer bit-manipulation bit
Really 1 KB (KiloByte) equals 1024 bytes?

Until now I believed that 1024 bytes equals 1 KB (kilobyte) but I was reading on the internet about decimal and binary …

binary byte system decimal bit
C/C++: Force Bit Field Order and Alignment

I read that the order of bit fields within a struct is platform specific. What about if I use different …

c++ c bit-manipulation endianness bit
How to make bit wise XOR in C

I'm trying to get into C programming, and I'm having trouble writing a bitwise XOR function with only ~ and & …

c bit xor
How to create an array of bits in Python?

How can I declare a bit array of a very large size, say 6 million bits?

python arrays bit
What does "real*8" mean?

The manual of a program written in Fortran 90 says, "All real variables and parameters are specified in 64-bit precision (i.…

fortran precision bit fortran90
How to use high and low bytes?

I am trying to represent 32768 using 2 bytes. For the high byte, do I use the same values as the low …

c++ byte bytearray bit 16-bit
Divide by 10 using bit shifts?

Is it possible to divide an unsigned integer by 10 by using pure bit shifts, addition, subtraction and maybe multiply? Using …

math bit micro-optimization low-level integer-division