godfrey
Member
I have 4 bits B3:0/0 thru B3:0/3 that each represent a unit being on. I want to count the number of bits set to one and return an integer between 0 and 4 representing the number of units on. Without doing it the long way (16 separate rungs with IF and MOV statements) is there something simpler? I'm using a SLC 5/05.