title: Translate PEP/8 assembly pseudo-ops to hexadecimal machine language
body: <p>I'm reading the textbook <a href="https://books.google.com/books?id=PERY_m5yyl4C" rel="nofollow">Computer Systems 4th Edition</a>. The question below is in the context of the Pep/8 virtual computer. In the exercises I am given this question:</p>
  
  <blockquote>
    <p>Convert the following assembly language pseudo-ops into hexadecimal machine language:</p>
    
    <ol>
    <li>.ASCII "Bear\x00"</li>
    <li>.BYTE 0xF8</li>
    <li>.WORD 790</li>
    </ol>
  </blockquote>
  
  <p>I am trying to get these values converted to hex, but I cannot understand my textbook's explanation of the process, and I don't feel the book gives much of an explanation. </p>
  
  <p>For the first answer I think it is a simple lookup in an ASCII conversion table: </p>
  
  <blockquote>
    <p>42 65 61 72 00</p>
  </blockquote>
  
  <p>The answers for this exercise are as follows:</p>
  
  <blockquote>
    <ol>
    <li>42 65 61 72 00</li>
    <li>F8</li>
    <li>0316</li>
    </ol>
  </blockquote>
  
  <p>Despite knowing these answers I have no idea how to get the answers for 2 and 3</p>
  
  <p>Here is the <a href="http://computersystemsbook.com/4th-edition/pep8/" rel="nofollow">download link</a> for the Pep/8 assembler and simulator. 
  Here is the <a href="https://github.com/StanWarford/pep8" rel="nofollow">source code</a> for the assembler.</p>