PROGRAM Tabla;

VAR
  f,r,s,g,b:Boolean;

BEGIN
  WriteLn('  f r s g b ');

    FOR f:=false to true DO
      FOR r:=false to true DO
        FOR s:=false to true DO
          FOR g:=false to true DO
            FOR b:=false to true DO

            BEGIN
              Write(f:3,'   ',r:3,'   ',s:3,'   ',g:3,'   ',b:3,'   ');

              IF (f=false) and (r=false) and (s=false) THEN
                WriteLn(  true
                );

              IF (f=false) and (r=false) and (s=true) THEN
                WriteLn(   false
                );

              IF (f=false) and (r=true) and (s=false) THEN
                WriteLn(   b xor g
                );

              IF (f=false) and (r=true) and (s=true) THEN
                WriteLn(    not(b) and not(g)
                );

              IF (f=true) and (r=false) and (s=false) THEN
                WriteLn(    b and g
                );

              IF (f=true) and (r=false) and (s=true) THEN
                WriteLn(     not(b xor g)
                );

              IF (f=true) and (r=true) and (s=false) THEN
                WriteLn(     true
                );

              IF (f=true) and (r=true) and (s=true) THEN
                WriteLn(      b and g
                );

              ReadLn;

            END;
END.

    Source: geocities.com/v.iniestra/apuntes/dis_log

               ( geocities.com/v.iniestra/apuntes)                   ( geocities.com/v.iniestra)