Phonology (Greek phone = voice/sound and logos = word/speech), is a subfield of linguistics which studies the sound system of a specific language (or languages). Whereas phonetics is about the physical production and perception of the sounds of speech, phonology describes the way sounds function within a given language or across languages.
An important part of phonology is studying which sounds are distinctive units within a language. In English, for example, /p/ and /b/ are distinctive units of sound, (i.e., they are phonemes / the difference is phonemic, or phonematic). This can be seen from minimal pairs such as "pin" and "bin", which mean different things, but differ only in one sound. On the other hand, /p/ is often pronounced differently depending on its position relative to other sounds, yet these different pronunciations are still considered by native speakers to be the same "sound". For example, the /p/ in "pin" is aspirated while the same phoneme in "spin" is not. In some other languages, eg Thai and Quechua, this same difference of aspiration or non-aspiration does differentiate phonemes.
In addition to the minimal meaningful sounds (the phonemes), phonology studies how sounds alternate, such as the /p/ in English described above, and topics such as syllable structure, stress, accent, and intonation.
The principles of phonological theory have also been applied to the analysis of sign languages, in which it is argued that the same or a similar phonological system underlies both signed and spoken languages. (Signs are distinguished from gestures in that the latter are non-linguistic or supply extra meaning alongside the linguistic message.)
Representing phonemesThe writing systems of some languages are based on the phonemic principle of having one letter (or combination of letters) per phoneme and vice-versa. Ideally, speakers can correctly write whatever they can say, and can correctly read anything that is written. (In practice, this ideal is never realized.) However in English, different spellings can be used for the same phoneme (e.g., rude and food have the same vowel sounds), and the same letter (or combination of letters) can represent different phonemes (e.g., the "th" consonant sounds of thin and this are different). In order to avoid this confusion based on orthography, phonologists represent phonemes by writing them between two slashes: " / / " (but without the quotes). On the other hand, the actual sounds are enclosed by square brackets: " [ ] " (again, without quotes). While the letters between slashes may be based on spelling conventions, the letters between square brackets are usually the International Phonetic Alphabet (IPA) or some other phonetic transcription system.