adrin wrote:

> i have to write a simple class to represent big integer numbers and

> implement basic arithmetical operations such as + - * / modulo, etc.

> all will be written in c++ under linux OS on x86 architecture (however

> that's not that important)

>

> could you tell me what is an idea behind such construction?
The idea is to store numbers that your architecture doesn't allow to

store using normal ways.

> i think about creating an dynamic array in which single digits in 255 base

> will be stored(one byte). it is a common solution way when dealing with

> BigIntegers isnt it?
To know about what's common, you need to set the sampling parameters.

> adding would be implemented by adding digits, bit by bit,
Why bit by bit? Couldn't you simply add two 255-base digits using normal

[unsigned] octet rules? Especially if your platform has 8-bit bytes, it

would be really simple, no?

> but how can i

> solve the problem with a carry?
You keep the carry flag and add it to the next pair. Just like any other

long addition/subtraction/multiplication/division...

> maybe writing accessing carry flag using

> asm code is a good solution? is there a better way?
You don't need asm to write C++. If I were your instructor, I would

fail you for using asm, actually.

> and what about multiplication? is it made by adding the number repeatedly?
Well, sort of. For every multidigit numbers A and B you can define the

pairs of single-digit multiplications which need to be added to each other

later.

> maybe you have a relevant tutorial or howto ?
www.google.com
And come back when you have a C++ language question.

V