Questions tagged [binary]

Binary is the base 2 number system. Use this tag for challenges involving base 2.

Filter by
Sorted by
Tagged with
11
votes
11answers
832 views

Binary encryption

This is based on xkcd #153. Make a program or named function which takes 2 parameters, each of which is a string or a list or array of bytes or characters. The second parameter will only contain ...
6
votes
1answer
2k views

Nokia mystery puzzle [closed]

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. ...
7
votes
4answers
753 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: http://pleasingfungus.com/...
0
votes
2answers
5k views

Make a regex that matches certain binary numbers [closed]

Your task is to create a regular expression that matches most binary numbers with an even number of 0s and an odd number of 1s (...
13
votes
3answers
2k 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: <...
7
votes
2answers
742 views

math with bitwise operators

objective write a program that can perform addition, subtraction, multiplication, and division, using only bit-wise operators, by bit-wise operators i mean the equivalent of JavaScript ...
-1
votes
5answers
696 views

change two bits by using only bitwise operations [closed]

try to write shortest possible variant of logic which converts binary input by this table: 00 -> 00 01 -> 10 10 -> 01 11 -> 11 You can use only ...