Maybe, I don't completely understand you question...
И and ы are different letters for different cases: soft and hard, so, actually, any combinations are possible in syllables: вы, ви, фы, фи, бы, би, пы, пи and so on. (I guess you know the basic principles of Russian spelling, so I don't go into details here.) That is the logic. I don't think there can be any logic more general than that.
Of course, there are a few exceptions:
1. Always soft: щи, чи. Щы and чы are impossible both phonetically and orthographically.
2. Always hard: ши, жи. Phonetically, it is шы and жы, but orthographic rules deny these combinations for some reason. So we speak шы and жы, but we write ши and жи.
3. Always hard, but spelling varies: цы, ци. Ци is in roots and цы is in endings. (Цирк vs молодцы - hard in both cases.)
4. After some prefixes, и mutates into ы: играть -> подыграть, идея -> безыдейный. (But after some prefixes, it does not: интересный -> суперинтересный. In such cases, even spelled with и, the previous consonant remains hard.)
5. Theoretically possible, but hardly can be found in the native vocabulary: кы, гы, хы.