# Questions tagged [base-conversion]

Conversion of numbers between positional numeral systems. Most common systems are decimal, binary, hexadecimal etc.

188 questions
Filter by
Sorted by
Tagged with
193 views

### Convert real numbers between factoradic and positive integer bases

This prompt asked you to convert back and forth to factoradic, but is very limited in scope (only decimal integers from 0 to 10!-1). Your task in this challenge is to reach just a bit further and ...
258 views

### Literate Programming in Base 26

Your task is to convert non-empty strings - between strings using the 26 letters, and programs, which are strings of bytes, where each byte has 256 possible values. You should use the same codepage ...
149 views

### Base consecutive k-frequency counter [closed]

Given a base $k$ as well as two indices (also passed in base $k$, call them $s$ and $e$) return a list containing a frequency count of all base-$k$ digits occurring between $s$ and $e$ ...
2k views

### Convert binary to unary

The title says it all; Given a number in the binary (base-2) number system, output the same number expressed in unary (base-1). You should take the binary number as a string (optionally with a ...
3k views

### Numbers that can be negated by reading backwards

Balanced ternary is a modified version of ternary (base 3), using the three digits 1,0 and -1...
1k views

### Cube calendar numbers

Credit: Marco Verch CC BY 2.0 A two-cube calendar, as shown in the picture, uses two cubes with digits painted on the faces to display the date. For dates in the range 1-9, a leading zero is used (&...
986 views

### Multibase Numbers

(Similar: Through the bases) Normally, our number system is base ten, with the digits 0123456789. However, we can increase or decrease the base count (so ...
743 views

### CGAC2022 Day 16: Playing with bits, Part 2

Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. As soon as the Elves get bored with the last week's game, Bin comes up with a new game. The rules are similar, ...
2k views

### Output the length of (the length plus a message) [duplicate]

The task is simple. You're given an arbitrary string message. Return that message prefixed with a number, such that the length of that number plus the message equals the number. In other words, the ...
2k views

### Carry-less sum given a base b

Given a list of positive integers $\mathcal I=I_1,I_2,I_3,...,I_n$ and a base $b>1$ return their "carry-less sum", i.e. represent $\mathcal I$ in base $b$ and sum digit-by-digit ...
2k views

### Convert from variable-width Two's Complement to Integer

Take an input, and convert it from Two's Complement notation (binary where the first bit is negated, but the rest are taken as normal) into an integer (in a somewhat standard output form). Input can ...
3k views

1k views

### Bijective meets mixed base

Background A bijective base $b$ numeration, where $b$ is a positive integer, is a bijective positional notation that makes use of $b$ symbols with associated values of $1,2,\cdots,b$. ...
2k views

### How long is the number in this base?

Given a positive integer $n$ and another positive integer $b$ ($1 < b < 36$), return the number of digits/length of $n$ in base $b$ ...
836 views

3k views

### Convert negadecimal to decimal (and back)

Negadecimal, also known as base -10, is a non-standard positional numeral system. Take the number $1337_{10}$. In decimal, this has the value one thousand three hundred thirty seven, and can be ...
2k views

### Display the exponent from a binary floating point number as a decimal value

Had my software final exams recently, one of the last questions had me thinking for a while after the exam had finished. Background IEEE754 numbers are according to the below layout The exponent is ...