Top "Bits" questions

A bit is a single binary digit.

Find out number of bits needed to represent a positive integer in binary?

This is probably pretty basic, but to save me an hour or so of grief can anyone tell me how …

java bit-manipulation bits
How to check if value has even parity of bits or odd?

A value has even parity if it has an even number of 1 bits. A value has an odd parity if …

c bits
How can I invert bits of an unsigned byte in Java?

I am trying to write a decoder for a very simple type of encryption. Numbers from 0-255 are entered via …

java byte unsigned bits complement
Is a byte always 8 bits?

I'm working through The Elements of Computing Systems when I read the following excerpt: The Hack computer includes a black-and-white …

byte bits
Javascript - convert integer to array of bits

I am trying in javascript to convert an integer (which I know will be between 0 and 32), to an array of 0…

javascript integer bits
How do I count the number of zero bits in an integer?

How would i go about finding the number of 'zero' bits in C++. Suppose I have an integer; int value = 276; …

c++ bits
Is there a way to access individual bits with a union?

I am writing a C program. I want a variable that I can access as a char but I can …

c structure bits unions
Java Working with bits

Let me start by saying I have never really worked with bits before in programming. I have an object that …

java bits bitmask
1 Mbit = ? bytes

I always get confused about this. Is there a "standard" conversion of Megabits to bytes? Is it: 1 Megabit == 1,000,000 bits == 125,000 bytes …

standards bits megabyte
How do we determine if a processor is 8-bit; 16-bit or 32-bit

Is it determined by size of the address buss; if yes then was 8086 a 20-bit processor? If no what is …

processor bits