Logic and set theory books I have studied real analysis, linear algebra, and how number sets are constructed from N, but now, i want to learn the foundations of math and some more advanced set theory (cardinals, ordinals), because my brain is full of questions such as "what is a property?, how does logic work in math?, What is ZFC?" and things like that. Can you recommend any books that could help me with that?
 A: Axiomatic Set Theory by Patrick Suppes is an easy intro to the basics. Last year it was available as a free PDF. Maybe still is.
Lectures In Set Theory. Various authors. Edited by Morley. I found the essay on the definition of L (Godel's constructible class) to be the easiest and clearest intro to L that I've seen.
Introduction To Set Theory And Modern Analysis by Simmons.
Set Theory: An Introduction To Independence Proofs by K. Kunen. A thorough axiomatic development from the bottom up.
You will need to learn about Godel's incompleteness theorems. These are like the axiomatic foundation of the properties of the reals, in  that you study it once and then take it for granted. Do NOT read Godel, Escher,Bach: An Eternal Golden Braid by Hofstader. For a long time Godel's Proof by Nagy & Newman was the only "popular" exposition in English.
Something on Model Theory and on Logic. Sorry I can't name a book.
Stories About Sets by V'Lenkin (Vilenkin). Good fun.
50 years ago Dover Publications (formerly Dover Press) was an excellent source of cheap re-prints of math & science books. It still is.
BTW. You will meet the Schroeder-Bernstein, Cantor-Bernstein, and Cantor-Schroeder-Bernstein theorems. These are all the same theorem. The Simmons book has a nice presentation of the short proof. There is also a long proof, which I saw & ran away from.
A: I think it's helpful for a learner to think of set theory as initially being divided into two stages according to how much logic background you need to have.
There is an initial part of set theory where very little logic background is necessary. The little you need can be understood informally. This initial part - on ordinals, cardinals, the axiom of choice, transfinite induction, etc. - will actually get you pretty far in terms of understanding what you need to know of set theory for other parts of math. A good book for this is Introduction to Set Theory by Jech and Hrbacek. It covers all the logic you need to know for this stage of studying set theory in the first few pages. 
The next stage in set theory discusses relative consistency of statements. For example, it's a theorem that if ZF is consistent (i.e., doesn't lead to a contradiction), then ZFC is also consistent. To really understand these things, I think, relies much more on having a good grounding in logic. A good (but very hard) graduate-level book for this stage is an older edition of Jech's Set Theory. (But the first chapter belongs to the "naive" first stage.)
The logic background you need is what would typically be taught in an introductory class: propositional and predicate calculus, formal proofs (i.e., the kind that could be checked for correctness by a computer), Gödel's completeness and incompleteness theorems, basic model theory. I'm not sure exactly what book to recommend for this material (since the one I learned it from is unlikely to be good for most people), but one possible choice is A Friendly Introduction to Mathematical Logic by Leary. The book by Shoenfield and the one by Ebbinghaus, Flum and Thomas are often mentioned as good introductions, but I have no experience with them. 
When studying logic before getting to the second stage of set theory, you may not have the feeling you are really studying the foundations of mathematics. That's because a lot of the applications will be to groups, fields and sometimes more exotic structures. It feels a little bit like learning a new branch of algebra.  It's only when you come back to set theory and apply logic to it - now the structure is a set $M$ together with a binary relation playing the role of $\in$ - that you really feel you're looking at the foundations of mathematics. (Although conceivably one could get the same feeling by studying arithmetic from the standpoint of logic.)
Incidentally, it helps a lot to know a reasonable amount of abstract algebra before studying logic and model theory. This is for two reasons. First, it provides a supply of examples of theories and structures to work with in model theory. Second, it is helpful to have worked with many examples of algebraic structures before attacking the general concept of an algebraic structure.
So the bottom line is, unfortunately, you will have to wait until you have a degree of mastery of logic and of the first stage of set theory before you can start to really put the two of them together. Initially, you can look at these as separate tracks. The basic set theory track is by far the more important one for most people. (Moreover, Zorn's Lemma and the like may occasionally make an appearance in model theory, so this is another reason it makes sense to start with basic set theory.)
