Question: This program accepts an integer between -511 to +511 typed in by user. It works as in Part 2 until a valid number is entered,
This program accepts an integer between -511 to +511 typed in by user. It works as in Part 2 until a valid number is entered, then the program prints the binary version of the number as an integer and follows it by printing the binary representation of the number as a 16-bit floating point number in the same format as in Assignment 1. Unlike in Assignment 1 the input numbers are only integers. Bit 15 is the sign bit. Bits 14 - 11 is the biased exponent (bias of 7). Bits 10 - 0 is the mantissa (fractional part). Remember there is an implicit 1 for the fractional part. On the next page are some example interactions with the program.
You must use subroutines for this program. To assist you to design your code there is a file called part4.asm which you must add to. You must not add any lines of code before the halt instruction. Example input and output.

Example input and output. La LC3 Console nter an integer between-511 and +511: +64 000 0 00 00 1 00 00 0 0 0 1 1 0 100 0 0 0 0 0 0 00 0 Halting the processor nter an integer between-511 and +511: -64 1 1 1 0 1 0 0 0 00 00 0 0 0 0 Halting the processor Enter an integer between -511 and +511: -129 1 1 1 1 00 0 0 0 0 010 0 0 0 Halting the processor Enter an integer between -511 and +511: +511 Halting the processor Zero is a special case LC3 Console nter an integer between-511 and +511: +0 Halting the processor nter an integer between -511 and +511: -0 Halting the processor Example input and output. La LC3 Console nter an integer between-511 and +511: +64 000 0 00 00 1 00 00 0 0 0 1 1 0 100 0 0 0 0 0 0 00 0 Halting the processor nter an integer between-511 and +511: -64 1 1 1 0 1 0 0 0 00 00 0 0 0 0 Halting the processor Enter an integer between -511 and +511: -129 1 1 1 1 00 0 0 0 0 010 0 0 0 Halting the processor Enter an integer between -511 and +511: +511 Halting the processor Zero is a special case LC3 Console nter an integer between-511 and +511: +0 Halting the processor nter an integer between -511 and +511: -0 Halting the processor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
