From time to time, I get into discussions about programming large integer binary number manipulation. The following is a collection of concepts and approaches to binary numbers that has worked for me. I know, I have reinvented the wheel several times, therefore, I make no claim to originality or uniqueness. Most of these routines and tips were devised to work with numbers larger than fit into the default size of most programming languages.
The popular language of programming today is C. I use it, but I do not like it. It is the best of the worlds between assembler language and higher level languages that require a lot of resources from the computer which is a sacrifice for speed. JAVA is a good high level language to try out some approaches, as JAVA has a lot of classes for large integer manipulation. JAVA lacks the speed of a compiled C program. With numbers in the 100 plus digits, speed is the one thing that our programming techniques hope to increase.
Note: To show the problem in terms we understand, imagine a program capable of adding a one, a billion (10^9) times a second. Then, in one year (60*60*24*365), the size of the number created is 31,536,000,000,000,000, 17 digits. A far cry from the large numbers we hope to factor or manipulate. The purpose hear is to demonstrate that at this size, sequential operations are not viable for finding large primes or factors. Techniques that work on small numbers, may be prohibitive on large integers in the 100+ digit range.
If you have not done so, acquire Algorithms in C by Robert Sedgewick. This book is a collection of algorithms and techniques for a multitude of solutions to most programming problems.
As with all things, including this site, you must decide what works for you and what does not.
Note: My endeavors require only Positive Integers. I have, also, decided to use variable length binary Integers. If your needs require Negative Integers, fixed length integers may be the solution. A sign field is another approach to working with Negative Integers.
My advise, stay consistent within your programming. If you use pointer arithmetic, always use it. This makes your program easier to understand when you revisit a routine that you have not looked at for a long time. Adhering to a set of programming standards, devised by you, is a great help when debugging is required. Consistency, Consistency, Consistency! Three words to program by.