Skip to main content

Questions tagged [conversion]

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

Filter by
Sorted by
Tagged with
4 votes
8 answers
2k views

Convert 8 Bit brainfuck to 1 bit Brainfuck / Boolfuck

Goal Input is a Brainfuck program for 8 bit cells, output it for 1 bit cells. Explanation We all know Brainfuck, normally it uses 8 bit cells. But there are implementations where a cell is just 1 bit, ...
12431234123412341234123's user avatar
7 votes
11 answers
795 views

Convert tiers between credit rating system

Related: Sort these bond ratings Credit rating agencies assign ratings to bonds according to the credit-worthiness of the issuer. The rating business is mostly controlled by "Big Three" ...
matteo_c's user avatar
  • 6,630
19 votes
21 answers
6k views

Convert an integer to IEEE 754 float

The task is simple: given a 32 bit integer, convert it to its floating point value as defined by the IEEE 754 (32-bit) standard. To put it another way, interpret the integer as the bit-pattern of an ...
zoomlogo's user avatar
  • 1,655
17 votes
38 answers
4k views

Convert superscript numbers to normal numbers

Introduction My gnome friends are writing a programming language and have asked for my help. Due to their size, the gnomes can only handle small superscript numbers instead of big numbers. However, ...
Ginger's user avatar
  • 5,780
8 votes
5 answers
363 views

Average impact of multiple conversion errors

Imagine four people stand in a line. The first looks at a thermometer, and tells the temperature to the person on their right. This continues down the line, until the last person writes the ...
rydwolf's user avatar
  • 18.9k
1 vote
1 answer
161 views

Twist on words to numbers [closed]

The Goal The goal of this question is to put a twist on this question. Your answer should be able to convert an array of words associated with integers into those integers. As an extra challenge, ...
myjobistobehappy's user avatar
23 votes
15 answers
2k views

Convert height to US Men’s Jacket size

In the US, clothing size sometimes has rough designations like M, L, XXL, etc. The US designation of the "men's jacket" category depends on the height of the person. So, in this challenge, ...
anatolyg's user avatar
  • 13.7k
26 votes
57 answers
4k views

Converting Strings to Decimals (Gone Wrong)

What? Many programming languages, both practical and esoteric, have functions, methods, etc to convert a given string to a decimal number. This is how the process might work: For each character in ...
SunnyMoon's user avatar
  • 2,699
24 votes
9 answers
2k views

Bilibili AV/BV Code Conversion

Background Bilibili is a China-based video sharing platform, similar to Nico Nico Douga in Japan, and Youtube around the world. Since the establishment, Bilibili had been using the AV code to ...
Shieru Asakoto's user avatar
5 votes
17 answers
897 views

Convert a decimal integer to binary only using arithmetic operators

There are 10 types of people in the world, those who understand binary and those who do not. Where are you? Let's see! Challenge Your task is to convert a decimal integer to binary, only using a ...
Wasif's user avatar
  • 12.3k
9 votes
1 answer
1k views

Convert Complex Chinese Numbers into Arabic Numbers

Your task is to convert Chinese numerals into Arabic numerals. A problem similar to Convert Chinese numbers, however, more complex. Also, answers given there mostly don't satisfy all the conditions. ...
Rysicin's user avatar
  • 93
29 votes
39 answers
4k views

Convert a string of digits from words to an integer

Convert a string containing digits as words into an integer, ignoring leading zeros. Examples "four two" -> 42. ...
Sparkler's user avatar
  • 411
19 votes
22 answers
5k views

Decode a variable-length quantity

A variable-length quantity (also referred to as VLQ or uintvar) is a way to encode up to a 28 bit integer value using only as many bytes as necessary. This was used ...
640KB's user avatar
  • 11.9k
10 votes
17 answers
1k views

Tesco's Burger Relish Best Before End date number

Given a date between 2010-01-01 and 2099-12-31 as three integers (please state your order if not [year,month,day]), answer with Tesco's corresponding five-digit ...
Adám's user avatar
  • 30.9k
-1 votes
1 answer
284 views

Morse sudo-ku-de

Hehe, see what I did with the title? Anyways... Your job is to create a sudoku solver that accepts input in Morse code and creates output in Morse code. Here's the Morse code numbers for reference: <...
moltarze's user avatar
  • 2,570
1 vote
0 answers
104 views

Sino-Korean numerals [duplicate]

The Korean language has two sets of numerals, a native Korean numerals and Sino-Korean numerals. The native Korean numerals are mostly used for numbers under 100, such as age and time. The Sino-...
cobaltp's user avatar
  • 491
16 votes
10 answers
2k views

Convert an Excel date code to a "date"

Given a non-negative integer Excel-style date code, return the corresponding "date" in any reasonable form that clearly shows year, month, and "day". Trivial, you may think. Did you notice the "scare ...
Adám's user avatar
  • 30.9k
14 votes
2 answers
869 views

Densely packed decimal (DPD) to decimal, with logic gates

Inspired by recent popularity of nandgame on TNB, and my own previous challenge. Background Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three ...
Bubbler's user avatar
  • 78.2k
28 votes
12 answers
4k views

Densely packed decimal (DPD) to decimal

For nandgame fans: Please try out DPD to decimal in logic gates too! Background Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three decimal digits (...
Bubbler's user avatar
  • 78.2k
26 votes
20 answers
2k views

Crown hundred crownty crown

I noticed a certain game had a peculiar life counter, which instead of stopping at 999, gained a new digit – the next number was crown hundred or ...
Angs's user avatar
  • 4,987
41 votes
27 answers
7k views

Count Like a Babylonian

Challenge Given an ASCII representation of a Babylonian number as input, output the number in Western Arabic numerals. Babylonian Numeral System How did the Babylonians count? Interestingly, they ...
Beta Decay's user avatar
  • 23.4k
38 votes
6 answers
2k views

COBOL Y2K redux

In the 1990s, COBOL computer engineers worked out a way to extend six-digit date fields by converting them to YYYDDD where YYY ...
user avatar
25 votes
12 answers
3k views

Bake me some moji

Given a string, character list, byte stream, sequence… which is both valid UTF-8 and valid Windows-1252 (most languages will probably want to take a normal UTF-8 string), convert it from (that is, ...
Adám's user avatar
  • 30.9k
2 votes
1 answer
123 views

Array-of-array string conversion to and from matrix [closed]

Matrix challenges are popular. There's an issue of how to provide test cases. A common method is the row-wise array-of-arrays representation, such as: ...
ngm's user avatar
  • 4,314
4 votes
5 answers
416 views

Help me with my chemistry homework!

Near the middle of the semester in chemistry, we get problems like: Convert 1.283850057 to Scientific Notation and Convert 3.583✕106 to Standard Notation This is just stupid busy work for ...
qqq's user avatar
  • 1,626
18 votes
10 answers
5k views

HSL to RGB values

The main purpose of the RGB (Red Green Blue) color model is for the sensing, representation and display of images in electronic systems, such as televisions and computers HSL (Hue Saturation Lightness)...
towc's user avatar
  • 344
12 votes
7 answers
29k views

Convert between Music clefs

Before you leave, you do not have to understand much musical notation to do this challenge. EXPLANATION In standard sheet music, double clefs go across the page serving as reference points to the ...
qqq's user avatar
  • 1,626
10 votes
14 answers
569 views

Expand Comparison Chains

Unlike most languages, Python evaluates a<b<c as it would be done in mathematics, actually comparing the three numbers, as opposed to comparing the boolean <...
Maltysen's user avatar
  • 25.7k
11 votes
7 answers
1k views

Simple DTMF decoding: find the phone key!

This is a simple challenge which hopefully may lead to some creative answers. Quoting Wikipedia: "Dual-tone multi-frequency signaling (DTMF) is an in-band telecommunication signaling system using the ...
Arnauld's user avatar
  • 195k
9 votes
16 answers
2k views

Convert CMYK values to RGB

Given Color codes in CMYK, convert it to RGB value. Input: string of 4 integers(ranging from 0-100) separated by space 86 86 0 43 28 14 0 6 0 41 73 4 Output: ...
Wasi's user avatar
  • 1,750
13 votes
21 answers
2k views

How to convert HEX2 to RGBA?

The world of art is full of colour, but the world of the network is even fuller than the world of art of diferent colours and it's renderings. That's why we need to know how to convert one type of ...
Obsdarek's user avatar
  • 165
35 votes
15 answers
5k views

How much Mana do I need?

Dungeon Master was one of the first ever real-time role-playing games, originally released in 1987 on the Atari ST. Among other exciting things for the time, it offered a rather sophisticated spell ...
Arnauld's user avatar
  • 195k
14 votes
14 answers
1k views

Short Date into English Long Date

Convert short date format into English long date in as few bytes as possible. Input Input will be in the form of a string with format, yyyy-mm-dd, with zero padding ...
Gareth's user avatar
  • 1,299
6 votes
2 answers
508 views

Generate chord charts for ukulele

Your task is to write a function which outputs a ukulele chord chart in the following format for a given chord symbol. For instance, for input "G7", it must output: ...
Steve Bennett's user avatar
5 votes
16 answers
678 views

Convert Binary to Text [duplicate]

Your task is to write a program, which takes a binary input and converts it to plain text. For Example: 01100001 01100010 01100011 = "abc" Rules Input can come ...
Tom291's user avatar
  • 333
0 votes
6 answers
404 views

TiB, not TB, Seriously?

If you're like me (and/or use Windows), You should have found this issue quite disturbing. You plug in a hard drive (2TB for my occasion), and realize it doesn't show as 2TB, but a bit smaller size ...
Matthew Roh's user avatar
  • 5,357
9 votes
8 answers
362 views

Convert AWG to Inches

AWG (American Wire Gauge) is a common way of specifying wire sizes. Your task in this challenge is to convert from a given gauge to the diameter of the wire in inches. The size in inches for the ...
Maltysen's user avatar
  • 25.7k
22 votes
17 answers
2k views

Neutralize data

To neutralize data, recursively replace all numbers (not digits!) with zeros and all characters (not strings!) with spaces. You must accept any single number, character, or string, or possibly ...
Adám's user avatar
  • 30.9k
28 votes
40 answers
6k views

12 hour to 24 hour time converter

Amazingly, this simple task doesn't seem to exist already, so... Your task is to write a program that takes as input a 12 hour time, and converts it into "military time", or 24-hour time format. ...
Carcigenicate's user avatar
8 votes
3 answers
371 views

Line ending conversion program

Write a program or function that alters the file at a user-specified filename via replacing all instances of UNIX line endings with Windows line endings and vice versa. Clarifications: For the ...
user avatar
7 votes
3 answers
502 views

World Time Conversion

World Time Conversion Challenge: Given an initial clock time in UTC and a list of countries: for each country in the list, output the local time it is in that country based on the initial time. In ...
Yodle's user avatar
  • 2,418
20 votes
6 answers
2k views

Make An ASCII Poker Chip Stack Arrangement

Poker has etiquette in how you arrange your chips, often enforced in tournaments - your chips may not be "hidden" from your opponents by being behind others, mostly to not hide some large denomination ...
Jonathan Allan's user avatar
7 votes
15 answers
1k views

Convert to Bubble Letters

So I was playing around with my compose key, and found some cool things, one of them being that by pressing compose + ( + alphanumeric + ), you get that character ...
Maltysen's user avatar
  • 25.7k
28 votes
24 answers
3k views

Convert to Bibi-binary

Bibi-binary is a numeric system invented by Boby Lapointe in order to represent numbers in letters which pronunciation seems funny. Your task is to convert decimal numbers into Bibi-binary! ...
Yytsi's user avatar
  • 3,762
-2 votes
8 answers
522 views

Convert string to number [duplicate]

Task The task is to convert a string to a number. It must accept the string via stdin and output the number via stdout. You convert a string to a number by replacing each letter of the string by its ...
Okx's user avatar
  • 16.4k
20 votes
19 answers
2k views

Text animation format Code Golf [duplicate]

Working with old files from DOS, I found an ancient text animation format, that specify how much time each frame must be shown in the screen. It's very simple: F1W5F2W3 This example above indicates ...
Chaotic's user avatar
  • 421
19 votes
5 answers
457 views

Convert an Expression to Panfix Notation

I was browsing esolangs, and chanced upon this language: https://github.com/catseye/Quylthulg. One interesting thing about this language, is that it doesn't use prefix, postfix, or infix, it uses all ...
Maltysen's user avatar
  • 25.7k
9 votes
13 answers
2k views

From Rgb to Cmyk

Given 3 bytes or RGB as input, calculate the nearest CMYK values, and output them. create either a function with parameters and return value or a program that operates on stdin/stdout use the color ...
Titus's user avatar
  • 14.8k
15 votes
1 answer
904 views

Convert ASCII box drawing into Unicode

I am shamelessly posting a request for something I would actually find useful. The task is to take an arbitrary ascii box drawing like this ...
Alex Zeffertt's user avatar
8 votes
1 answer
198 views

Judge Some Titrations

In chemistry class, we were learning about titrations, and attempting one as a lab. We were using phenolphthalein as the indicator for the titration, so on top of grading the lab normally, my teacher ...
Maltysen's user avatar
  • 25.7k