Top "Bit" questions

A bit is a single binary digit.

Python: Extracting bits from a byte

I'm reading a binary file in python and the documentation for the file format says: Flag (in binary)Meaning 1 nnn …

python byte bit
Java Iterate Bits in Byte Array

How can i iterate bits in a byte array?

java arrays byte bit loops
Bit Array in C++

When working with Project Euler problems I often need large (> 10**7) bit array's. My normal approach is one of: bool* …

c++ arrays bit
How Does The Bitwise & (AND) Work In Java?

I was reading through some code examples and came across a & on Oracle's website on their Bitwise and Bit …

java bit-manipulation bit
C/C++ efficient bit array

Can you recommend efficient/clean way to manipulate arbitrary length bit array? Right now I am using regular int/char …

c++ c arrays bit
Python Number Limit

I know in most, if not all programming languages, integers, floats etc all have a maximum amount they can hold, …

python numbers limit bit
Why byte b = (byte) 0xFF is equals to integer -1?

Why byte b = (byte) 0xFF is equal to integer -1? Ex: int value = byte b = (byte) 0xFF; System.out.println(…

java bit twos-complement
How to modify bits in an integer?

I have an integer with a value 7 (0b00000111) And I would like to replace it with a function to 13 (0b00001101). …

python binary bit
Mysql: How to query a column whose type is bit?

Hi I am using hibernate and Mysql. I have a class with a boolean attribute called 'active'. The generated database …

mysql select bit
How to flip a specific bit in a byte in C?

I'm trying to use masks and manipulating specific bits in a byte. For example: I want to write a program …

c bit-manipulation bit