Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to manipulate large numbers

How to manipulate large numbers

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omar Alvi
    wrote on last edited by
    #1

    Hello people, I need some help, i want to know how to store ,add, subtract and multiply 128 bit numbers. Thank you OMAR ALVI

    D E 2 Replies Last reply
    0
    • O Omar Alvi

      Hello people, I need some help, i want to know how to store ,add, subtract and multiply 128 bit numbers. Thank you OMAR ALVI

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      See if the DECIMAL data type will do what you need. While not 128 bits, its variables are stored as 96-bit (12-byte) unsigned integers scaled by a variable power of 10. Another option is to treat the numbers as strings and operate on them one at a time. In other words, multiplying "9182887099" by "4058780506" would produce "37271323146220092094". This can be extended to an infinite number of digits.

      1 Reply Last reply
      0
      • O Omar Alvi

        Hello people, I need some help, i want to know how to store ,add, subtract and multiply 128 bit numbers. Thank you OMAR ALVI

        E Offline
        E Offline
        Enis
        wrote on last edited by
        #3

        You can use the big number library available in openSSL . Enis Arif ----------- "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." (Albert Einstein)

        O 1 Reply Last reply
        0
        • E Enis

          You can use the big number library available in openSSL . Enis Arif ----------- "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." (Albert Einstein)

          O Offline
          O Offline
          Omar Alvi
          wrote on last edited by
          #4

          Thanks, i know that there are some libraries available but actually i wanted to write my own class. Any help will be greatly appreciated. Thank you

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups