As per given information we understand that, Bob is not wearing a Hat, Carl is wearing a hat.
Now if Alex doesn't wear a Hat, than Bob must wear a Hat.
But he is not wearing a Hat. So it implies Alex is also wearing a Hat. So Alex and Carl are wearing hats.