One Bad Ternary Operator Deserves Another
Ruby, 210 characters
Similar to @Jan Dvorak's solution but a bit more functional and a bit shorter.
f=FailSafe
e=[f&amp;1,f&amp;2,f&amp;4,f&amp;8,1-f].zip([&quot;Detection zones staying in a given state&quot;,&quot;Bad visibility&quot;,&quot;Initialization&quot;,&quot;Bad configuration&quot;,&quot;No technical alarms&quot;]).map{|a,b|a&gt;0&amp;&amp;b}-[!0]
e[0]||=&quot;Unknown&quot;
e.join&quot;; &quot;