Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 175553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:43:10+00:00 2026-05-11T13:43:10+00:00

I am new in binary conversion. I use Python, Bash and AWK daily. I

  • 0

I am new in binary conversion. I use Python, Bash and AWK daily.

I would like to see binary conversion’s applications in these languages. For example, I am interested in problems which you solve by it at your work.

Where do you use binary conversion in Python/Bash/AWK?

I would like to see examples of codes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:43:10+00:00Added an answer on May 11, 2026 at 1:43 pm

    Conversion of strings of binary digits to a number using Python on the commandline:

    binary=00001111 DECIMAL=$(python -c 'print int('$BINARY', 2)') echo $decimal 

    See the docs for the int function.

    Oh, wait, I misread the question, you want to know what converting to binary gets you. Well, that depends on what you mean by ‘convert to binary’. Say I want to store a file with a million integers. The integers will be between 0 and 32,000. If I were to store them as text it would take at best two bytes for each number (single digit number and a separator), at worst six bytes (five digit number and a separator), with an average size of 4.6 bytes per number (see comment for the math). I also would have no easy way of choosing the 15th number. If I were store them as 16bit integers (in binary), every number would take up exactly two bytes and I could find the 15th number by seek‘ing to offset 2*(15-1) and reading two bytes. Also, when I go to do math on the text based version I (or my language) must first convert the string to a number, whereas the binary version is already a 16bit number.

    So, in short, you use binary types to

    1. save space
    2. have consistent record sizes
    3. speed up programs
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 113k
  • Answers 113k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer this query will find all employees that work for more… May 11, 2026 at 10:04 pm
  • Editorial Team
    Editorial Team added an answer It is important to always rebuild your project or solution… May 11, 2026 at 10:04 pm
  • Editorial Team
    Editorial Team added an answer Use this, from here: function insertAtCaret(areaId, text) { var txtarea… May 11, 2026 at 10:04 pm

Related Questions

I have done this previously but in a different way. I am trying to
I have a series of ASCII flat files coming in from a mainframe to
How do I tell NAnt to use the same VB compiler VS2008 uses when
I am new to the world of ASP.NET and SQL server, so please pardon

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.