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

  Network and the different types of networks available

This is an insurance agency that has over 100,000 customers nationwide. They now have about 5,000 employees and 2,000 of them are agents in the field with their own offices. This agency primarily sells life, auto and home policies.

  Write down a program on visual basic format

Write down a program on visual basic format

  Implementing different functions

Function celsius returns the Celsius equivalent of the Fahrenheit temperature utilizing the calculation C= 5.0/9.0 * (F-32);

  Decreasing risk of malicious attacks

While a large percentage of the information technology security budgets is devoted to decreasing the risk of malicious attacks, there exist other ways in which systems or data become damaged.

  Determining the output of code

Provide the output of the following given program:#include using namespace std; void fun1 (int *p, int *&q) {*p = 100;p = p + 2;*p = *q; *q = *(p+1);

  How many tasks real-time application contain

How many tasks real-time application contain In this particular real-time application, there are many tasks; each runs exact same code except with different data each time.

  Method of collision resolution

Utilize the linear probing method of the collision resolution. Print out the tables after the data values have been stored. Search for ten several values in each of the three hash tables

  Read and follow the directions in creating an archive

How do the algorithm techniques of fragmentation affect the end result of sorting by larger amounts.

  Transmitting the rtp stream

Consider that a sender transmits a silence suppressed the RTP stream of G.711 audio to the receiver (G.711 refers to the name of standard for 64Kbps PCM we discussed in class).

  What is green computing and green communication technology

What is Green Computing and Green Communication technology.

  Companies still fail in their use of information technology

Why do big companies still fail in their use of information technology? What should they be doing differently.

  The most important roles in systems development

How have the roles of systems analysts and end users changed in the past 20 years? What are the benefits and drawbacks to these changes.

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