How do you translate binary into text without using a built-in converter?

Asked today

Modfied today

Viewed 42 times

3

I’m currently working on a program that automatically translates binary into text. So far, I’ve only been able to convert binary into numbers, but I’m not sure how to convert those numbers into readable characters or words. How does the process work, and what steps are needed to translate binary values into text (such as ASCII characters)?

Share

Improve this question

Follow

asked Feb 26 at 9:47
Vladimir Fisher
2,538 ● 3 ● 21 ● 27

Are you launching a particular website? I'd look for something in the code of that site, its not normal for a webview to flicker – Gabe Sechan Feb 26 at 15:04

There are a lot of JavaScript Code - Vladimir Fisher Feb 27 at 16:17

Add a comment
1 Answer
Sorted by:
Highest Score (default)

234

On a computer, text is just numbers, and those numbers are represented in binary. To translate binary into readable text, you need to convert the binary into numbers and then interpret those numbers using a character encoding, most commonly ASCII (or sometimes UTF-8).

How the process works

  1. Split the binary into groups (usually 8 bits / 1 byte). Each character is typically stored as one byte.

    Example:
    01001000 01100101 01101100 01101100 01101111
  2. Convert each binary byte to a decimal number.
    01001000 → 72
    01100101 → 101
    01101100 → 108
    01101100 → 108
    01101111 → 111
  3. Map each number to a character using ASCII.
    72  → H
    101 → e
    108 → l
    108 → l
    111 → o
  4. Combine the characters to form the final string.
    Hello

Share

Improve this question

Follow

answered Feb 27 3:23
Hardik Chaudhary
1,226 ● 1 ● 10 ● 26

Are you launching a particular website? I'd look for something in the code of that site, its not normal for a webview to flicker – Gabe Sechan Feb 26 at 15:04

There are a lot of JavaScript Code - Vladimir Fisher Feb 27 at 16:17

Add a comment
The Overflow Blog
  • Please mak sure to use only human language when creating posts!
Featured on Stack Overflow
  • Logo updates to Stack Overflow's visual identity
  • Policy: Generative AI (e.g., ChatGPT) is discouraged
  • I’m Jody, the Chief Quality & Post Inspect...
  • Release notes and bug fixes for Stack Ov...

Hot Programmer Facts

  • There are only two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors.
  • Programming is 10% writing code and 90% wondering why it doesn’t work.
  • The first computer bug was literally a moth stuck in a computer.
  • Most developers spend more time Googling than typing.
  • “Temporary fix” is the most permanent solution in programming.
  • Semicolons are optional in some languages, but bugs are not.
  • There are 10 types of people: those who understand binary and those who don’t.
  • If debugging is removing bugs, programming must be putting them in.
  • Code that works is code you should never touch again.
  • Any code written after 2 AM becomes legacy code immediately.
  • Stack Overflow has probably saved billions of developer hours.
  • Comments are often more confusing than the code.
  • The best code is the code you don’t have to write.
  • Tabs vs spaces debates have lasted longer than some programming languages.
  • One missing bracket can ruin your entire day.