This tag indicates that the challenge involves converting from one format to another.

learn more… | top users | synonyms

32
votes
14answers
3k views

Temperature Converter

This is a byte sized challenge where you have to convert an input temperature in one of the three units (Celsius, Kelvin and Fahrenheit) to the other two. Input You would be provided with a ...
5
votes
1answer
188 views

The Gray area of n-ary codes

Write a program or function that takes a base n and a number x, and returns or outputs the n-ary Gray code of x. Rules n is an integer in the range 2 <= n <= 16. x is an integer in the range ...
5
votes
5answers
365 views

Brainf*** to tinyBF converter

You don't need to know these languages to participate. Every necessary info is in this question. You should write a program or function which given a brainfuck (BF) code as input outputs its tinyBF ...
20
votes
2answers
594 views

Help me procrastinate on my computer repairs!

This challenge is brought to you by real (and tragic) inspiration. Recently, the number row on my keyboard has been a bit sporadic. The keys 1-9 work sometimes--but other times they have no result. As ...
22
votes
42answers
3k views

Convert C header names to C++ header names

In the C standard library, header names end with a .h suffix: stdio.h In C++, those header names are available in an alternative form, with a c prefix instead: cstdio Write a function that ...
11
votes
22answers
1k views

String to Binary

This is a code golf challenge. Just like the title says, write a program to covert a string of ascii characters into binary. For example: "Hello World!" should turn into 1001000 1100101 1101100 ...
0
votes
5answers
365 views

Implement atoi function [duplicate]

You already know that the atoi function of stdlib.h converts a string to an integer. atoi (copied from here) int atoi (const char * str); Convert string to integer Parses the C-string ...
6
votes
6answers
1k views

Fix your trees!

In informatics, we often use trees in lots of different forms and representations. The three major methods of serialising binary trees are prefix, infix and postfix notation. For example, the ...
11
votes
1answer
451 views

EBCDIC code golf (Happy birthday, System/360!)

Pretty soon it's going to be 50 years since IBM unveiled its System/360 family of computers. These were the first to use the EBCDIC character set. To mark the occasion, let's see who can write the ...
6
votes
5answers
2k views

Convert radicals to mixed & entire radicals and to real numbers

Challenge The goal of this challenge is to take a radical and convert it to a reduced and entire radical, and a real number. You do not have to convert it to all 3, however, you will get bonus points ...
3
votes
3answers
1k views

Convert CP437 to UTF-8

The goal is to read bytes from input encoded in Code Page 437 and output the same characters encoded as UTF-8. That is, bytes should be translated into Unicode codepoints per this table (a particular ...
3
votes
1answer
371 views

Convert Regexes

Suppose you have existing regexes you wish to compile using one of the submissions to Compile Regexes. In as few characters as possible, write a program that: accepts an existing regex as input, as ...
8
votes
10answers
1k views

Generate excel column name from index

This one comes from a real life problem. We solved it, of course, but it keeps feeling like it could have be done better, that it's too lengthy and roundabout solution. However none of my colleagues ...
-5
votes
7answers
321 views

Reversing base numbers [closed]

Where input is binary, convert it to a decimal number (base 10), reverse the decimal number and output it. Vice versa for decimal (base 10) input: reverse it, convert it to binary and output the ...
3
votes
1answer
168 views

Check printer - Convert to English text from the input value.

Check printer function (or subroutine) - Convert to English text from the input value. 12.34 -> "twelve dollars and thirty four cents". For the range .01 to 9999.99 assuming valid input.
14
votes
32answers
1k views

IPv4 Integer Conversion Function

Write the shortest function to convert an IP address into it's integer representation and output it as an integer. To change an IPv4 address to it's integer representation, the following calculation ...