title: Mips Assembly Language using bit manipulation to check if int is less than 32 & displays 0 if so, otherwise (32 or higher) displays 1
body: <p>Checks if a user-entered int between 0 &amp; 255 (inclusive) is less than 32
    &amp; displays 0 if so, otherwise (32 or higher) displays 1.</p>
  
  <p>I can't figure out how to make 64 and 128 not show up as 0.</p>
  
  <pre><code>.data
  legend1:    .asciiz "0: less than 32\n"
  legend2:    .asciiz "1: 32 or higher\n"
  inPrompt:   .asciiz "Enter an integer between 0 and 255: "
  outLab:     .asciiz "It is "
  
      .text
      .globl main
  main:
      li $v0, 4
      la $a0, legend1        
      syscall                   # print legend line 1
      la $a0, legend2        
      syscall                   # print legend line 2
      la $a0, inPrompt        
      syscall                   # print input prompt
  
      li $v0, 5
      syscall                   # read input integer
  
      move $t0, $v0       #stores input integer into $t0 and prints outLab
      li $v0, 4
      la $a0, outLab
      syscall
  
      andi $t3, $t0, 0x031    #and'ing the input integer and masking number
      li $v0, 1       #code to print integer
      move $a0, $t4       #move t3 value into argument
      syscall
  </code></pre>
  
  <p>Write NO MORE THAN 14 lines of code that involve using 
  ONLY the following:
  - syscall</p>
  
  <ul>
  <li>syscall supporting instructions (e.g.: li to load $v0)</li>
  <li>instruction to make a saved copy</li>
  <li><p>bit manipulating instructions (ANDing, ORing, XORing,
  NORing and shifting - only whatever that are needed)</p>
  
  <pre><code>        li $v0, 10               # exit
          syscall
  </code></pre></li>
  </ul>