Logic
4-Bit Priority Encoder
Description Output is the number of the highest Input bit that is set HIGH (1). Input 15 has the highest priority.

Highest Priority (when ON) P15 > P14 > ... > P4 > P3 > P2 > P1 Lowest Priority.

0 ≤ Output ≤ 15
Availability
  • Requires library: Process Control (option -05)
  • Firmware versions 0x1021 and later
savvy-SFD Graphic 4bitPriorityEnc
Graphic with Parameters 4bitPriorityEnc

Parameters

Input 1 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 2 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 3 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 4 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 5 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 6 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 7 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 8 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 9 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 10 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 11 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 12 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 13 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 14 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Input 15 Input, Read-write, Boolean (signed 16-bit integer)
0 = Low
1 = High
Output Output, Read-only, Analog (signed 16-bit integer)
0 to 15