|
Topic: DMD0018 ENCO - Encode Bit Position |
|
|
|
|
|
The Encode Bit Position instruction (ENCO) will locate the first bit that is ON in a 32-bit location starting at the least significant bit.
|
|
|
For example, for the following bit string: "0000 0000 0000 0000 0001 0000 0000 0000" the Output Bit Position Value is 12
Note: If the Bit Pattern has more than one bit position set to a "1", the position of the least significant "1" will be encoded.
|
|
Parameters:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
Bit Pattern - designates the memory location that contains the source bit string. This can be any constant value or any readable numeric location.
Output Bit Position Value - designates a memory location to store the bit position value. This can be any writable numeric location.
|
|
|
|
|
See Also:
|
|
|
|
|
Rung Example:
|
|
|
|
|