How we can implement a cardiac machine simulator in c++

Assignment Help Computer Engineering
Reference no: EM1331500

Implement a CARDIAC machine simulator in C++, that will:

- Keep track of CARDIAC memory cells in an array of 100 integers (0-99).
- Keep track of the bug location; which could be an index into the memory array. Watch out for cells 0 and 99; they are special.
- Read the input tape from a file that starts with a number telling you how many items are on the tape.
- Output to the screen.

Running instruction 9xx exits the program.

An example run of your application would look something like this.

input.txt (This is our first CARDIAC program with 946 instead of 900 and 002 instead of the blank.)
18
002
800
030
004
020
130
021
200
022
631
023
531
024
321
025
946
002
820

Acceptable screen output:
3
2
1
0

Operation codes are as follows:

Code Abbreviation Meaning
0 INP Copy input to memory.
1 CLA Copy memory to accumulator.
2 ADD Add memory to accumulator.
3 TAC Move bug if accumulator < 0.
4 SFT Shift accumulator left then right.
5 OUT Copy memory to output.
6 STO Copy accumulator to memory.
7 SUB Subtract memory from accumulator.
8 JMP Backup bug to 99 then move bug.
9 HRS move bug and stop computing.

Reference no: EM1331500

Questions Cloud

Explain how the below game should be set-up : Explain how the below game should be set-up, played and solved a consumer decide.
Write down a not so bad cardiac simulator : The user has to be prompted to type in a 3 digit number, and then the program should print to the screen whatever the CARDIAC Instruction Decoder box would show had that been the instruction.
Evaluating strategy : Identify the types of organizations that may need to evaluate strategy more frequently than others.
Incremental cash flows : Discuss qualitatively how you might have incorporated the likely growth of digital photography in the sales projections developed above?  (Remember hindsight is 20-20.)
How we can implement a cardiac machine simulator in c++ : Keep track of the bug location; which could be an index into the memory array. Watch out for cells 0 and 99; they are special. Read the input tape from a file that starts with a number telling you how various items are on the tape.
Explaining individualism and collectivism affectivity : Define the following relationships: Individualism v collectivism affectivity
Use the nadler tushman congruence model : Using the Nadler-Tushman Congruence Model, conduct an analysis of this chosen company's outputs. Remember that outputs exist at the individual, group and organizational levels and that there are often differences between the output goals an organizat..
Assume the price of every old edition microeonomic book : Assume the price of every old edition microeonomic book. Determine the values of B and T that maximize Sam's utility.
Literature review on organizational behaviour theories : Literature Review on Organizational Behaviour Theories - prepare a literature review to highlight how organizational behavioral theories apply to professional practice

Reviews

Write a Review

Computer Engineering Questions & Answers

  Create an announcement of the new system roll out

There are five centers with about 650 members and 30 employees in each location. The system will be used by both members and fitness consultants to track participation. The primary purpose is to assist the fitness center in obtaining the competiti..

  Create java console program using the class fraction

plan the class Fraction that can be used to manipulate fractions in a program. Among others, class Fraction must include methods to add, subtract, multiply, and divide fractions. When you add, subtract, multiply, or divide fractions, your rply nee..

  What is proficient by page buffering

What is proficient by page buffering

  Implementing the stack using dynamically allocated array

Write down the C++ class which implements the stack utilizing the dynamically allocated array. The initial size of the particular stack must be evaluated when it is generated.

  Left most derivation

A->a|aS|bAA, B->b|bS|aBB, For the string “aaabbabbba” determine a Left most derivation.

  The application must have at least one class

A salesperson can also receive a commission as a sales incentive. Commission is a percentage of the salesperson's annual sales. The current commission is 5 percentof total sales.

  Procedure to generate indexes for foreign keys

Procedure to generate indexes for foreign keys.

  Telecommunications planning model

Discuss how to utilize the telecommunications planning model in detail and also explain the significance of the strategic management in order to support this model.

  Network cable planning

The company is very concerned with the network errors. State the advice you would provide regarding the design of the building and network cable planning which would help in order to decrease the network errors.

  Recognizing the threats in the code

State two recent virus threats; whether they are minor or the major threats?

  Define how you feel unit testing should be conducted

define how you feel unit testing should be conducted for a program with lots of conditional expressions.

  Binary hypercube and a barrel shifter

Consider an illiacmesh (8*8) ,a binary hypercube and a barrel shifter, all with the 64 nodes labelled n0,n1…n63.all network links are bidirectional.

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