multiplying a bignumber
Task is
>>I should create a way to get a bignumber ie >2^16 for Turboc using as a string and store it in a binary format (integer). >>The number should be reusable 
Re: multiplying a bignumber
Integers can't hold numbers big like 2^16.

Re: multiplying a bignumber
Quote:
Depends on how your integer is defined. Mine are 32bit (with a provision for an int64). 2^16 is a mere drop in the bucket. If your implementation can only deal with 16bit integers, then you have to take on the task of chaining them together, yourself. You do it every day when you operate on decimal numbers using pencil and paper. 
Re: multiplying a bignumber
thank u all i know about 2^16 but
one thing >>i have to enter a big number as a string and that number should be accepted as any normal number and it should be stored as array for eg if number is 65536 then a[0]=0 a[1]=1 now i think i have made it clear can any one help me 
Re: multiplying a bignumber
If you're using one array element for each binary digit, then you need an array for each operand. You then work with the individual elements of those arrays in the same way that the ALU in your uP works with individual bits.
To begin with, you're going to have to know how to implement a fulladder. It's just an exclusiveor with carry. Once you can add, you can subtract (think two's complement). Once you can add and subtract, you can multiply and divide. I suspect they are teaching you how a uP works, so you might want to begin by studying that, binary arithmetic, etc. 
All times are GMT +5.5. The time now is 14:01. 