Write down a c++ program for little man''s computer

Assignment Help Computer Engineering
Reference no: EM1333930

We have to write a c++ program for Little man's computer in which

A text file containing machine code (not assembly code) for little man's computer following instruction set . Instructions are in different lines (no need for semicolon at the end of each instruction)

Arithmetic 1xx ADD
2xx SUB
Data Movement 3xx STORE
5xx LOAD
Input/Output 901 INPUT
Machine Control 000 HALT
(coffee break) COB

Any output specified in the input file by 902 will be displayed on screen

Computer specification:
· Two digits memory (mail box) address: 00-99

· Three digits instruction or data in each memory slot

· One calculator, one program counter

· The program in the input file needs to be loaded into memory first and stored in consecutive slots starting from address 00

· 901 instruction will ask user's input from keyboard, 902 displays content in calculator

Other requirements:
Your program should accept any length of input program that can be fit in little man's 100 memory slots and generate correct result and/or output on screen.

Submit the source code together with readme file with instruction to compile, build and use your program.

Input file contains following code (return positive difference):
Running of the program with this input will ask user to input 2 numbers, let's say 5 and 10, the program will output the positive difference on the screen, which is 5.

Reference no: EM1333930

Previous Q& A

  Elucidate how an increase in your nominal income

Elucidate how an increase in your nominal income and a decrease in your real income might occur simultaneously.

  Analyze the business strategy of kodak and wal-mart blockbus

Analyze the business strategy of Kodak, Wal-Mart and Blockbuster.

  How is employment-at-will applied in your organization

How is employment-at-will applied in your organization or in one with which you are familiar and what extent do the exceptions to employment-at-will limit its application in the organization

  Addressing the confidentiality of medical records

What interests are served by maintaining confidentiality of medical records?

  Risk premium on the market

Assume an ExxonMobil Corporation bond will pay $4,500 ten years from now. If the going interest rate on safe 10-year bonds is 4.25%, how much is the bond?

  Elucidate these factors in terms of the production curve

Illustrate what is the efficiency factor. Elucidate these factors in terms of the production possibilities curve.

  Programmed decision and non programmed decision

Explain programmed decision and non programmed decision.

  Define what a cache is and what its purpose

define what a cache is and what its purpose is. Also describe what data gets placed into the cache, and when it is put there.

  What specific benefit plans does this offer

Incentive plan - what performance based incentives does this offer include and Benefits plan - what specific benefit plans does this offer include?

  Preservation of the confidentiality

How does technology affect the preservation of confidentiality?


Write a Review


Similar Q& A

  What is autonomic relational database management system

In regards to Autonomic RDBMS, is it important to utilize a user-centered design (UCD) approach when designing a database for a small to medium size company. Why or why not.

  Program to find smaller between num1 and num2 to output

Program to find smaller between num1 and num2 to output

  What technologies must be used to secure those areas

The employees have hopes of making the breakthrough and bringing the company public in next two years. You have been hired as a security consultant to assess the company's needs.

  Prepare a use case diagram

Prepare a Use Case Diagram based on the given problem description.

  Write down mips program that prompts user for a string

Write down MIPS program that prompts user for a string

  Integrated services architecture

Explain how has the integrated services architecture is being provided a solution to growing variety and volume of traffic experienced within the Internet and Intranets? Describe in scholarly detail.

  Explain the sum of the inverses of all positive integers

though , when we compute the sum in Java's floating point arithmetic the largest value we get is 15.403683, regardless of how many terms we add. Explain the possible reasons for this anomaly.

  Define which option you prefer and why

Write down a paper describing the steps involved in publishing a Web site.

  Plan an algorithm that prompts

Design an algorithm that prompts the user to enter a secret word. The secret word must be at least 8 characters long. Validate the input.

  Make use the vb.net programming to write statement

imagine that the array has a data type of frmMdiChildList having subscripts from 0 to 9. Configure the forms so that they appear as child forms of the MDI parent form named frmMdiParent.

  Designing the calculator program

Develop a calculator program which will subtract, add, multiply, or divide two numbers input given by a user. If user selects division, do not permit the user to divide by 0

  Functional specifications for the software at workplace

what are two of the most important methods to examine and why.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd