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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:02:36+00:00 2026-06-19T00:02:36+00:00

Given 2 numbers, x and n, what’s the method to multiply x by 2^n

  • 0

Given 2 numbers, x and n, what’s the method to multiply x by 2^n ?
For instance x=3.7 and n=5. so 3.7*2^5 = 118.4.
I need this done without using the FPU commands (math coprocessor).

So i figured that numbers in 32 bt processor are represented by 32 bits: the 1st is for the sign, next 8 (2-9) are for the exponent, and the following 23 are called the SIGNIFICAND.

The exponent field is the k in 2^k. So what i need to do is only change the exponent field and add n to it. exponent = exponent + n .

So how do i do this in assembly 8086 ?

Thank you

  • 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. Editorial Team
    Editorial Team
    2026-06-19T00:02:37+00:00Added an answer on June 19, 2026 at 12:02 am

    Here’s some quite ugly inline asm, VS style. Hopefully you’ll get the idea:

    float mul(float f, int p)
    {
        __asm {
            mov eax, f
            mov ecx, p
            shl ecx, 23
            add eax, ecx
            mov f, eax
        }
    
        return f;
    }
    

    This obviously does no checking for overflow, etc.

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

Sidebar

Related Questions

Given 3 numbers, I need to find which number lies between the two others.
(Python) Given two numbers A and B. I need to find all nested groups
So I wrote this function that is given possible numbers, and it has to
HI, suppose i have given input numbers like this 1,2,3,4,5,6,7,8,9,0 i should form it
I need to find the rows between certain numbers (given by the user) to
I need to draw a scatter plot with the given array of numbers in
I wrote method that return random number between two given numbers. Here it's header:
I want to do an operation like this : if the given float numbers
I want to find out the greatest number, out of three given numbers, using
I've been challenged with a mathematics problem. Given ten numbers (in this case, numbers

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.