Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment requires you to write an LC-3 assembly language routine leading to being able to transform a string of digits (and + and -

This assignment requires you to write an LC-3 assembly language routine leading to being able to transform a string of digits (and + and - signs) into both the corresponding integer and the 16-bit floating point value

This program shifts a number 11 places to the left, then ANDs the answer with b0111100000000000. This means the answer can only have 1s in bits 14 to 11. The answer is then written to display like the diagram below:

image text in transcribed

Call the program part3.asm. The number to use must be stored at a label called number and the program begins with:

image text in transcribed

If the number is b0000000000011011 the output should be: 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0

LC3 Console ter an integer between -511 and +511: 400 e input is invalid. ter an integer between-511 and +511: 12345 he input i3 invalid. ter an integer between-511 and +511: +12345 e input i3 invalid. ter an integer between -511 and +511: -512 The input is invalid. nter an integer between-511 and +511: +511 Halting the processor-- nter an integer between -511 and +511: +0 Halting the processor nter an integer between-511 and +511: -1 Halting the processor-- Enter an integer between -511 and +511:-511 111 1 11 00000000 1 Halting the processor - This is the display for the output, except instead of 000000000000000 0 as the output when the number is +0, the output should be 01011000 00000000 when the number is b0000000000011011 LC3 Console ter an integer between -511 and +511: 400 e input is invalid. ter an integer between-511 and +511: 12345 he input i3 invalid. ter an integer between-511 and +511: +12345 e input i3 invalid. ter an integer between -511 and +511: -512 The input is invalid. nter an integer between-511 and +511: +511 Halting the processor-- nter an integer between -511 and +511: +0 Halting the processor nter an integer between-511 and +511: -1 Halting the processor-- Enter an integer between -511 and +511:-511 111 1 11 00000000 1 Halting the processor - This is the display for the output, except instead of 000000000000000 0 as the output when the number is +0, the output should be 01011000 00000000 when the number is b0000000000011011

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Relational Database Design

Authors: Candace C. Fleming, Barbara Von Halle

1st Edition

0201114348, 978-0201114348

More Books

Students also viewed these Databases questions

Question

What is the growth rate of GDP per capita?

Answered: 1 week ago