Is the hex code at the top of this source file the same as the assembly at the bottom, as in they do the same thing?

How can I convert assembly into hex like in this source code file? I frequently see it being used in payloads. I understand it is done to preserve space, bypass IDS among other reasons.

[Example file from the shell storm website](http://shell-storm.org/shellcode/files/shellcode-93.php)