The last sound in 'hope' is /p/ - a voiceless consonant.
Consonants come in two types - voiced and voiceless. They are generally paired, so the first of the following paired is voiceless and second voiced:
/s, z/ /p, b/, t, d/, k, g/ etc.
"Voice" means that your larynx/voicebox makes a noise.
Put your hand on your throat and say /s/. There should be no vibration - it is voiceless. Now try /z/. Now try the other pairs.
The rule is: the /s/ is voiceless after a voiceless consonant /fits/
the/s/ is voiced as /z/ after a voiced consonant. 'bids' = /bidz/