Skip to main content

6 docs tagged with "Bits"

View All Tags

Binary To String

Given a real number between 0 & 1 (eg. 0.72) that is passed in as double, print the binary representation.


Number of bits you have to flip to convert bits A to bits B

Flip Bit To Win

Find the largest sequence of 1 that can be obtained by flipping a 0 to 1.

Pairwise Swap

Write a program to swap odd and even bits in an integer with as few instructions as