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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:47:09+00:00 2026-05-28T07:47:09+00:00

How can you multiply two unsigned 23-bit numbers if you only have memory locations

  • 0

How can you multiply two unsigned 23-bit numbers if you only have memory locations that are 16-bits?

I am not performing these operations using x86 instructions, so information related to x86 will be ignored.

  • 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-05-28T07:47:09+00:00Added an answer on May 28, 2026 at 7:47 am

    I assume you mean you can only multiply two 16-bit numbers at a time.

    First I’m going to say that a and b are the numbers we want to multiply. They are between 17 and 32 bits in size (which covers your 23). However big they are they’re zero padded out to an unsigned 32-bit size.

    r = a * b
    

    can be re-written as

    r = (al + (ah << 16)) * (bl + (bh << 16))
    

    where al and ah are the low and high 16-bit parts of a. Shifting by 16 is the same as multiplying by 2^16. We can then expand this equation.

    r =  (al + (ah * 2^16)) * (bl + (bh * 2^16))
    r =  al * bl + al * (bh * 2^16) + (ah * 2^16) * bl + (ah * 2^16) * (bh * 2^16)
    r =  al * bl + al * bh * 2^16 + ah * bl * 2^16 + ah * bh * 2^32
    r =  al * bl + (al * bh + ah * bl) << 16 + (ah * bh) << 2^32
    

    So you end up with 4 multiplies (al*bl, al*bh, ah*bl & ah*bh) and you shift the results and add them together. Bear in mind that each 16-bit multiply produces a 32-bit result, so the whole thing will go into 64 bits. In your case, because you know a & b aren’t bigger than 2^23 the whole thing will fit in 46 bits.

    The other thing is that the summation will need to be done in 16-bit chunks, with the carry bits looked after.

    Hope that helps.

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

Sidebar

Related Questions

I have written an interpreter that requires me to perform 32-bit division of unsigned
For testing purposes, I need to find two 64-bit integer values that exactly multiply
I have to multiply two decimal numbers: 6,0 * 5,50 which results in: 33,000
Im trying to multiply two 16 bit numbers with the following NASM codes: mov
these two algorithms are used to check valid member numbers the first is the
say I want to multiply two matrices together, 50 by 50. I have 2
I have used Euclid's method to find the L.C.M for two numbers. l.c.m=a*b/(gcd(a,b)) How
When I multiply two unsigned chars in C like this: unsigned char a =
Is it possible to multiply two numbers with out using arithmetic operators using C?
I've a question extending the code in this question : Can you multiply two

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.