program wwt
implicit none

logical ::a,d,e
logical, dimension(0:1):: b=(/.false.,.true./), c=(/.false.,.true./)
equivalence(i,d)
equivalence(j,e)
integer :: i,j
!==========================================================================
write(*,*) a
read(*,*) a
write(*,*) a, .not.a
!==========================================================================
! Wahrheitswertetabelle (1.Variante)
do i=0,1
   do j=0,1
      write(*,*) b(i),c(j),b(i).and.c(j),b(i).or.c(j)
      end do
   end do
!==========================================================================
! Wahrheitswertetabelle (2.Variante)
do i=0,1
   do j=0,1
      write(*,*) i, j, d, e, d .and. e
      end do
   end do

end program wwt