The tag has no wiki summary.

learn more… | top users | synonyms

8
votes
2answers
462 views

Bitwise Operators in Brainfuck

Your task is to create one brainfuck program for each of the following binary operators. Each program should take one or two 8-bit numbers (A and B) from input and calculate the specified operation: ...
2
votes
3answers
255 views

Convert from binary to unary in 7x7 Manufactoria

In the game manufactoria, take in a binary number and output that number of red pieces. The catch? The board-size is only 7x7: Here's the manufactoria code for the problem: ...
3
votes
6answers
408 views

Generating Binary shapes

How could we generate shapes or images using binary? I got to messing around trying to create something that looked matrix like and got to thinking, wouldn't a great CodeGolf be to see who can make ...
4
votes
3answers
464 views

Implementing Binary Arithmetic

Given two binary numbers (strings containing 0s and 1s), perform operations on them, with one problem: You must keep them in binary. That means no going binary(integer(n1)+integer(n2)) or anything ...
9
votes
9answers
674 views

Calculate hamming weight with low hamming weight

Create a program that computes the hamming weight of a string. Winner is the program with the lowest hamming weight. Rules: Hamming weight for an ASCII character is defined as the total number of ...
-3
votes
3answers
219 views

Binary Bit Adder [closed]

Title says it all, make a bit adder in as little space as possible! The input is two binary numbers. Here's my Python entry, at 159 characters: a=raw_input() b=raw_input() d=0;e='' for i in ...
-3
votes
5answers
676 views

compute number of 1 bits in a binary representation of a number

The goal is to write a program that returns number of 1 bits in a given number. examples 5 -> 2 1254 -> 6 56465 -> 8 goal the winner is the code which runs in minimum time ...
5
votes
4answers
413 views

Convert from binary to negabinary

Given a binary integer inclusively between 0 and 1111111111111111 (i.e. a 16-bit unsigned integer) as input, output the same integer in negabinary. The input can be in whatever format is most ...
8
votes
32answers
2k views

Print the amount of ones in a binary number without using bitwise operators

Description Given a number, print the amount of 1s it has in binary representation. Input A number >= 0 in base 10 that won't exceed the highest number your language is able to handle. Output ...
1
vote
5answers
282 views

position of the only 1 in a number in binary format

Given N is a number from this list : 1, 2, 4, 8, 16, .... 2^i as you know there is only a single "1" in binary representation of above numbers. Question : write a code to find out the position of ...
8
votes
6answers
592 views

Manchester encode a data stream

Manchester coding is a telecom protocol used in radio communications that guarantees bit transitions at a regular interval so a receiver can recover the clock rate from the data itself. It doubles the ...
6
votes
1answer
238 views

Floating point addition, without floats!

Your task is to write a program, in any language, that adds two floating point numbers together WITHOUT using any fractional or floating point maths. Integer maths is allowed. Format The format for ...
5
votes
1answer
1k views

Nokia mystery puzzle

A friend sent me this puzzle. I'm pretty sure solving it will require some programming. Can anyone crack it? The original is here in case of encoding issues in the past below. Did you know that... ...