Bit manipulation instructions: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
GE600 series: Periscope up! As shown by the sample code linked to, it doesn't require recursion, just iteration, and, for a fixed-size item, you can unroll the loop. Clean up links and add a period to the end of a sentence.
Line 73:
Also present is unusual (variable-bit-length) byte load and store instructions that use ''byte pointers'' for memory operands: in modern terminology these are bit-field insert and extract. In addition to a word address, the bit length (S) and the bit offset (P) of the byte from which to load or into which to store are specified. These instructions can specify a byte size of 0-36, but a byte may not straddle a word boundary.{{sfn|pdp10|pages=2{{hyp}}85-2{{hyp}}89|loc=Byte manipulation|}} The string manipulation,{{sfn|pdp10|pages=2{{hyp}}91-2{{hyp}}99|loc=2.12 String Manipulation|}} BCD/binary conversion,{{sfn|pdp10|pages=2{{hyp}}98-2{{hyp}}103|loc=2.13 Decimal Conversion|}} and string editing{{sfn|pdp10|pages=2{{hyp}}104-2{{hyp}}112|loc=2.14 String Editing|}} instructions in later models use byte pointers and have the same restrictions.
 
===GE600GE-600 series===
 
The [[GE-600 series]] and its successors had Gray-to-binary conversion,; whichwithout such an instruction, [[Gray_codeGray code#Converting_to_and_from_Gray_codeConverting to and from Gray code|requiresconverting costlyfrom recursionGray code]]: requires multiple steps - converting a 64-bit Gray code to binary would require execution of hundreds of instructions. Binary-to-Gray is simply {{code|x^(x>>1)}} and does not justify a dedicated instruction. Gray coding has significant [[Gray_codeGray code#History_and_practical_applicationHistory and practical application|practical applications]].
 
=== ARM ===