Long multiplication by instruction sequences with backward jump instructions
نویسندگان
چکیده
For each function on bit strings, its restriction to bit strings of any given length can be computed by a finite instruction sequence that contains only instructions to set and get the content of Boolean registers , forward jump instructions, and a termination instruction. Backward jump instructions are not necessary for this, but instruction sequences can be significantly shorter with them. We take the function on bit strings that models the multiplication of natural numbers on their representation in the binary number system to demonstrate this by means of a concrete example. The example is reason to discuss points concerning the halting problem and the concept of an algorithm.
منابع مشابه
Instruction sequence expressions for the Karatsuba multiplication algorithm
The Karatsuba multiplication algorithm is an algorithm for computing the product of two natural numbers represented in the binary number system. This means that the algorithm actually computes a function on bit strings. The restriction of this function to bit strings of any given length can be computed according to the Karatsuba multiplication algorithm by a finite instruction sequence that con...
متن کاملInstruction Sequences with Indirect Jumps
We study sequential programs that are instruction sequences with direct and indirect jump instructions. The intuition is that indirect jump instructions are jump instructions where the position of the instruction to jump to is the content of some memory cell. We consider several kinds of indirect jump instructions. For each kind, we define the meaning of programs with indirect jump instructions...
متن کاملIndirect Jumps Improve Instruction Sequence Performance
Instruction sequences with direct and indirect jump instructions are as expressive as instruction sequences with direct jump instructions only. We show that, in the case where the number of instructions is not bounded, there exist instruction sequences of the former kind from which elimination of indirect jump instructions is possible without a super-linear increase of their maximal internal de...
متن کاملProgram algebra with a jump-shift instruction
We study sequential programs that are instruction sequences with jump-shift instructions in the setting of PGA (ProGram Algebra). Jump-shift instructions preceding a jump instruction increase the position to jump to. The jump-shift instruction is not found in programming practice. Its merit is that the expressive power of PGA extended with the jump-shift instruction, is not reduced if the reach...
متن کاملM ar 2 01 0 Expressiveness and Extensions of an Instruction Sequence Semigroup
PGA, short for ProGram Algebra [PvdZ06, BL02], describes sequential programs as finite or infinite (repeating) sequences of instructions. The semigroup C of finite instruction sequences [BP09a] was introduced as an equally expressive alternative to PGA. PGA instructions are executed from left to right; most C instructions come in a left-to-right as well as a right-to-left flavor. This thesis bu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1312.1812 شماره
صفحات -
تاریخ انتشار 2013