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 976429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:44:42+00:00 2026-05-16T03:44:42+00:00

This is about how to do number conversion between binary to octal, octal to

  • 0

This is about how to do number conversion between binary to octal, octal to hexadecimal, binary to hexadecimal.. ( in all these decimal is no where there, either in source or destination )

Whenever decimal is involved either in source or destination i have a general methodology as,

  • if decimal is source, do the mod operation of that number with the base of destination. ( and continue the same way, and get the result ),
    Example: convert decimal 20 to octal

    • 20 mod 8 = 4
      • 2 = 2

So it is 24 in Octal. This way you can do for anything ( binary, hex ) from Decimal.

  • if decimal is destination, do the multiplication operation with the source’s base from 0 to N which starts from left to right. And add up to get the decimal.
    Example: convert binary 1010 to decimal

    • 0 : 0 x 2**0 = 0
      • 1 : 1 x 2**1 = 2
        • 0 : 0 x 2**2 = 0
          • 1: 1 x 2**3 = 8

The sum is 10 in Decimal. This way you can do for anything ( octal, hex ) to decimal.

Questions
Is there any similar general logic, which i can use for conversion between octal, hex and binary ?

Hope the above is clear.. Else let me know.

  • 1 1 Answer
  • 1 View
  • 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. Editorial Team
    Editorial Team
    2026-05-16T03:44:43+00:00Added an answer on May 16, 2026 at 3:44 am

    The conversion between binary and either octal or hex is even easier than decimal. Just break the binary digits up into groups of 3 or 4 (depending on oct or hex), then convert each group to a digit. (If you don’t have a multiple of 3 or 4 binary digits, just left-pad the number with zeros.)

    Example:

    111101111010 binary
    1111 0111 1010
       F    7    A
               F7A hex
    
    111101111010
    111 101 111 010
      7   5   7   2
               7572 oct
    

    Converting back is just the opposite. Each digit in octal or hex gets converted directly to either 3 or 4 binary digits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In response to this question asking about hex to (raw) binary conversion, a comment
I see a number of other people asking about this error message in other
Any idea about ORA-1555: snapshot too old: rollback segment number I am getting this
I have found a number of articles such as this one that talk about
The MySQL 5.4 documentation, on Optimizing Queries with EXPLAIN , says this about these
This question calls for "line numbers". If you do not care about line numbers
I just noticed this about a week ago. I'm storing data about the current
This is about the analysis of insertion sort in the book 'Introduction to Algorithms'.
This is about the design decision and understand the procs and cons for adopting
This question about Timers for windows services got me thinking: Say I have (and

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.