Share Your Experience: Take the 2024 Developer Survey

# Questions tagged [base-conversion]

The tag has no usage guidance.

40 questions
Filter by
Sorted by
Tagged with
26 views

### Are leading zeros necessary when referring to other bases in certain contexts?

I recently took a computer science test where one question was as follows: Each RGB color value can range from _____ to _____ in decimal, _____ to _____ in binary and _____ to _____ in hexadecimal. ...
• 23
30 views

### General Base Converting Algorithm

I am looking to implement a general base conversion algorithm. I was wondering if there already exists such a thing, since I couldn't find one. Currently, I am able to go from int to int, but I also ...
• 1
1 vote
167 views

### Fast string-to-integer algorithm

I work with big integers that I need to convert to and from strings, and to and from different bases. In JavaScript, BigInt allows to convert an integer to a string in a chosen base by doing: ...
• 123
1 vote
179 views

### How does Decimal to Binary conversion algorithm work?

I'm reading a book which says that to transform a number from decimal representation to binary representation you have to follow these steps: Take the integer part (the one before the point) of the ...
• 315
75 views

### Base transcoding with minimum storage and complexity

I want to reversibly transcode arbitrary information (a digital signature), initially $n$ bits, into symbols in an alphabet with $s$ symbols, with little space loss. In my application‡ $s=45$. Thus I ...
• 519
1 vote